Linux build made with 2016r1 throws exception at startup

I just built my app (which builds fine with 2015r4.1) with 2016r1, only to find that the compiled binary doesn’t work. It throws a NIL exception right of the bat (I tried CentOS and Ubuntu). My app implements the ‘UnhandledException’ even which should display a custom feedback dialog if an unhandled exception occurs). However, with the latest build I’m seeing the standard warning (“An unhandled NIL exception has occurred. The application must shut down”) instead of the custom dialog. It also seems that the app.open even never fires as I have a System.DebugLog statement at the beginning that should write to stdout. It would appear that the app never really starts. From the documentation provided with Xojo 2016r1 I was unable to determine what (or if) changed explain this. Any ideas? It’s not complaining about dependencies or missing libraries.

32bit/64bit?

Run ldd against the binary to look for new requirements?

If you start the app from the command line it may show you additional error messages.

Thanks, guys. ldd didn’t reveal any difference in requirements, i.e. both the 2015r4 and the 2016r1 builds list the same requirements. I have always been starting my app form the command line to ensure I see DebugLog messages. The very first line of the App.Open even is a DebugLog command. It appears the app.Open event never fires as I don’t see any of the DebugLog messages.

I’m at a complete loss here. If anybody wants to see for themselves, here a links to the two different builds:

2015r41: https://www.dropbox.com/s/0zc29pb3z9bo97m/CoolTerm2015r41.zip?dl=0
2016R1: https://www.dropbox.com/s/6ipxyu5nywir8go/CoolTerm2016r1.zip?dl=0

What am I missing?

There appears to be a NilObjectException being raised during the creation of the app’s menubar. It relates to Newsmall_Icon somehow, though I didn’t dig any further than that.

Thanks for digging. May I ask how you determined this? The image resources needed for the menubar are all present in the resources folder. Is it possible it can’t be loaded?

Well, Joe, I think you hit the nail on the head. I think there is something different with how 2016r1 builds handle menu icons and toolbar icons compared to 2015r4. After I removed all menu icons, I got at least the App.Open event to fire before it threw another Nil Object Exception. I went ahead and created a small test project with a menu item and a toolbar. The menu item has an icon, and the Toolbar has one button with an icon. The 2016r1 build throws the exception right away. The 2015r4 build works just fine. Removing the menu icon gets the App.open even to fire for the 2016r1 build before throwing the exception. The Window.Open event doesn’t fire. Removing the toolbar button icon gets the window.open even to fire and the app starts fine. I don’t know if this is an actual bug in the latest Xojo release, or if there is something wrong with my BMPs. I don’t want to file a bug report just yet.
In any case, the link to the test project is below if someone wants to play around with it.

https://www.dropbox.com/s/r0k66238csgl1d4/IconTest.zip?dl=0

[quote=259277:@Roger Meier]Well, Joe, I think you hit the nail on the head. I think there is something different with how 2016r1 builds handle menu icons and toolbar icons compared to 2015r4. After I removed all menu icons, I got at least the App.Open event to fire before it threw another Nil Object Exception. I went ahead and created a small test project with a menu item and a toolbar. The menu item has an icon, and the Toolbar has one button with an icon. The 2016r1 build throws the exception right away. The 2015r4 build works just fine. Removing the menu icon gets the App.open even to fire for the 2016r1 build before throwing the exception. The Window.Open event doesn’t fire. Removing the toolbar button icon gets the window.open even to fire and the app starts fine. I don’t know if this is an actual bug in the latest Xojo release, or if there is something wrong with my BMPs. I don’t want to file a bug report just yet.
In any case, the link to the test project is below if someone wants to play around with it.

https://www.dropbox.com/s/r0k66238csgl1d4/IconTest.zip?dl=0[/quote]

There is a bug with the Linux framework in 2016r1 that causes BMPs dragged into the project to fail to load correctly at runtime. If you switch to a different image format, the issue should disappear.

Thanks!

I’m curious as to how you figured out that the exception was related to Newsmall_Icon. Are you using a particular analysis or profiling tool on Linux?

[quote=259428:@Roger Meier]Thanks!

I’m curious as to how you figured out that the exception was related to Newsmall_Icon. Are you using a particular analysis or profiling tool on Linux?[/quote]

A combination of strace, gdb, and a familiarity of the framework’s internals.

Thanks!

And probably a enormous amount of what Germans call “Fingerspitzengefuel” :smiley:

Is there a feedback ID yet that one could sign on to? Although I’ve gotten my project working again by painstakingly converting all my Icon/Mask BMP pairs to PNGs with transparency, I would like to see this bug fixed.