Log Shows App Termination But App Continues To Run
Hi All
I have very strange issue.
My app is throwing this error in Titanium as soon as the app is run:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[NSArray initWithObjects:count:]: attempt to insert nil object at objects[4]'
The app continues to run in the simulator. Although now, no log messages appear after the crash.
I have compiled via Xcode and when I attach debugger the app rarely but randomly throws the error and crashes. I have played with app in simulator and device both in debug and release mode without a change in results. The error is only ever thrown immediately when launched via Titanium.
I am unable to debug using the stack trace as its fairly generic.
Any ideas what could be causing this?
Cheers,
Nick
4 Answers
-
Okay, the plot thickens.
Even if delete the build/iphone directory and replace my app.js with the default new project app.js, Titanium throws the error when the app is launched.
Cheers,
Nick
-
check out any loops closed perfectly or not & use db.close if it is open in any function
-
check out any loops closed perfectly or not & use db.close if it is open in any function
-
I copied out my Resources directory. Deleted the project. Created a new project of same name and copied back.
It now compiles correctly and executes without error from TiDeveloper.
I note that TiDev now says "[INFO] Found 4.0.1 patch installed" which has not appeared before.
The rare crash after Xcode compile is probably due to different fault elsewhere.