Hard Crash on Device

The last time I ran my app on my device, which was about a month ago, all was well. Now my app runs fine in the simulator and builds without error, but hard-crashes on the device; the loading image is shown briefly but then the app drops back to SpringBoard. I’m building in 2014r3.2 and running iOS 8.1.3 on an iPhone 6. The device logs don’t have any record for my app (or even the date that I am running my app).

Would somebody point me in the right direction for troubleshooting this?

[quote=167899:@Jason Tait]The last time I ran my app on my device, which was about a month ago, all was well. Now my app runs fine in the simulator and builds without error, but hard-crashes on the device; the loading image is shown briefly but then the app drops back to SpringBoard. I’m building in 2014r3.2 and running iOS 8.1.3 on an iPhone 6. The device logs don’t have any record for my app (or even the date that I am running my app).

Would somebody point me in the right direction for troubleshooting this?[/quote]

You mean the app sort of shows the launch image and quits, and there is no record in the device log ? Are you using any declare in the open events of App or the initial view ?

[quote=167899:@Jason Tait]The last time I ran my app on my device, which was about a month ago, all was well. Now my app runs fine in the simulator and builds without error, but hard-crashes on the device; the loading image is shown briefly but then the app drops back to SpringBoard. I’m building in 2014r3.2 and running iOS 8.1.3 on an iPhone 6. The device logs don’t have any record for my app (or even the date that I am running my app).

Would somebody point me in the right direction for troubleshooting this?[/quote]
Is it doing enough at startup that it would eat up too much memory, causing the device to kill the app? There is a LowMemoryWarning event on the App object, that might help you out. http://developer.xojo.com/iosapplication$LowMemoryWarning

Maybe it is loading a file at launch that is damaged?

Yep.

I don’t think so. It creates an SQLite database in code but I’ve had that in place for some time. I log App.LowMemoryWarning if it’s called to my own app’s log file, and this isn’t being logged.

I don’t load anything from the bundle.

Yes. I added JK’s KeyChainItem. I’ll remove it and re-test.

As default, XCode gives access only to crash logs.

I have found an app that gives you access to the device console :
https://support.omnigroup.com/ios-console-log

Launch the iOSConsole app, connect the device and launch your app. You get all console message as if you were running in the simulator. My app sends a log of system.debuglog and I find them that way.

Maybe that will give you a clue as to what is happening.

Xcode give you complete access to the device console log.
Indeed, the device never stops writing.

Connect your device, open in xCode the device window, select your device click on the small triangle at window bottom border
Now you can see the console messages, you can clear the messages list and save them to a file.

Who would have thought that small triangle would show the console ? Do as I say, right. Apple rejects our apps for not complying to HIG, that’s one for the record. Nowhere else in XCode especially the debug menu is it mentioned “show console”.

Thank you Antonio.

… and you can’t resize that little list…

Yes. That is very tiny. I rather use iOSConsole :slight_smile:

Thanks for the tip on the device console log @Antonio Rinaldi - that will come in very handy! :slight_smile:

It turned out to be my bug. I’ve got 11 tables, many fields and a number of indexes in my SQLite database and one field was being defined as “BOOLEAN” instead of “BOOL” and, for some reason, attempting to assign the .BooleanValue of this field to a Boolean property did not raise an error in the iOS Simulator but it caused a hard crash on the device. Which is why, as is often said, you should always test on the device. :slight_smile:

[quote=168168:@Jason Tait]Thanks for the tip on the device console log @Antonio Rinaldi - that will come in very handy! :slight_smile:

It turned out to be my bug. I’ve got 11 tables, many fields and a number of indexes in my SQLite database and one field was being defined as “BOOLEAN” instead of “BOOL” and, for some reason, attempting to assign the .BooleanValue of this field to a Boolean property did not raise an error in the iOS Simulator but it caused a hard crash on the device. Which is why, as is often said, you should always test on the device. :)[/quote]

Please test this against 2015r1 if you have access.

I can’t yet Joe, unfortunately. I use a few declares that require conversion to 64-bit which is beyond my abilities. However I believe these will be updated soon.