Random crashes in iOS simulator
Since switching from Ti SDK 1.6.2 to 1.7.x I have been experiencing seemingly random application crashes with the following stack trace.
Thread 4 Crashed:
0 myapp 0x002633cb TiObjectSetProperty + 107 (APICast.h:75)
1 myapp 0x00040685 -[KrollObject noteObject:forTiString:context:] + 357 (KrollObject.m:1304)
2 myapp 0x0003cbbf KrollGetProperty + 833 (KrollObject.m:481)
3 myapp 0x002663bf TI::TiCallbackObject<TI::TiObject>::getOwnPropertySlot(TI::TiExcState*, TI::Identifier const&, TI::PropertySlot&) + 467 (TiCallbackObjectFunctions.h:139)
4 myapp 0x002444ba TI::TiValue::get(TI::TiExcState*, TI::Identifier const&, TI::PropertySlot&) const + 210 (TiObject.h:387)
5 myapp 0x00241ab6 cti_op_get_by_id_generic + 86 (JITStubs.cpp:1094)
6 ??? 0x0b5ec410 0 + 190759952
7 myapp 0x001ff4c2 TI::Interpreter::execute(TI::ProgramExecutable*, TI::TiExcState*, TI::ScopeChainNode*, TI::TiObject*, TI::TiValue*) + 648 (JITCode.h:84)
8 myapp 0x001ceef4 TI::evaluate(TI::TiExcState*, TI::ScopeChain&, TI::SourceCode const&, TI::TiValue) + 388 (Completion.cpp:67)
9 myapp 0x00248cd9 TiEvalScript + 297 (TiBase.cpp:61)
10 myapp 0x000324dc -[KrollBridge evalFileOnThread:context:] + 1470 (KrollBridge.mm:418)
11 myapp 0x000351a2 -[KrollInvocation invoke:] + 118 (KrollContext.mm:97)
12 myapp 0x00034419 -[KrollContext invokeOnThread:method:withObject:callback:selector:] + 187 (KrollContext.mm:896)
13 myapp 0x0002fb59 -[KrollBridge evalFile:callback:selector:] + 97 (KrollBridge.mm:440)
14 myapp 0x00031df4 -[KrollBridge didStartNewContext:] + 1902 (KrollBridge.mm:570)
15 myapp 0x00036a73 -[KrollContext main] + 2445 (KrollContext.mm:1054)
16 Foundation 0x006aad4c -[NSThread main] + 81
17 Foundation 0x006aacd8 __NSThread__main__ + 1387
18 libSystem.B.dylib 0x926c9259 _pthread_start + 345
19 libSystem.B.dylib 0x926c90de thread_start + 34
This is sometimes caused by something as trivial as adding a line of log code (Ti.API.log()). Commenting it out makes the app run again.
Any pointers as to what is causing this?
My environment (this also happened with Xcode 3.2.5 and iOS SDK 4.x:
- Xcode 4.2
- iOS SDK 5
- Ti SDK 1.7.3
- OSX 1.6.8
3 Answers
-
To give some sort of answer here …. There was another post on this yesterday, where nothing was resolved but the random code breaking occurred.
I have come across exactly the same and I think it is down to the javascript interpreter getting slightly confused. No evidence of this.
It is really random and sometimes just putting a blank line in resolves the issue.
What I think needs to happen is Appcelerator made aware, which I can do I will get the two Q&A's and send them to the support team and see what they make of it.
If ou could post a little code which works and fails randomly that would be great.
T.
-
This is a really critical bug that I also have very often and randomly.
Simulator seems to crash more frequently with this stack error than real device.
Uncommting Ti.API.log('xxx') and Ti.API.info('xxx') seems to help a little bit, but this can't be the solution.
-
1.6.x has also serious memory problems. Seems like 1.8.0 solves the crashes, but unfortunately it is not stable enough to publish a public app with this SDK.