[TIMOB-1854] iOS: 1.4.2 - app on device crashes on launch
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:57:21.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0 |
Components | iOS |
Labels | crash, ios |
Reporter | Thomas Huelbert |
Assignee | Blain Hamon |
Created | 2011-04-15T03:04:00.000+0000 |
Updated | 2011-04-17T01:57:21.000+0000 |
Description
1.pull from head to get 1.4.2
2.create a simple iphone or ipad project
3.install and launch on device
results: crash on launch no crash logs seem to be produced.
One this I have noticed is the applications that are created for an iOS device do not contain the app.js file as a resource. The version that runs in the simulator loads app.js by using a relative path that goes outside of the actual application and it runs. However a compiled application for the device has the images and other resources but not app.js. I set a breakpoint in KrollBridge.mm / didStartNewContext around line 482 and noted that startURL is expecting that app.js is in the apps folder but the file is missing. The XCode project does not have app.js listed as a resource of the target either.
I do have a crash log if you need one.
Some additional information and crash logs if needed here: http://developer.appcelerator.com/question/64041/142-splash--crash"> http://developer.appcelerator.com/question/64041/142-splash--crash
This was fixed a while back but this needed a cleaning which the continuous build didn't do until the latest one (r5949bc72).
If you're pulling from HEAD, you MUST delete iphone/lib/7.txt, iphone/lib/8.txt AND iphone/lib/TiJSCore.a in order to revert to the working library.
Long version:
1.4.0 had TiJSCore v7, which gave those scary but harmless warnings in iOS 4.1, so I recompiled TiJSCore to use the more modern mmap functions. This recompile is known as TiJSCore v8. However, because the newer mmap functions, despite having the same args, doesn't allow for readwrite and execute on the same memory page in iOS 4.0.2 and later, v8 would crash on newer OSes. More specifically, the OS would force the app to quit as a security measure. I never saw this because, when running from xCode/debugging, the debugger overrides this security, so it'd run fine for me.
Since then, I reverted back to v7, so we have scary but harmless warnings again, but the code works. HOWEVER, the way scons works is to see that the library had been downloaded in the past. Since it sees 7.txt, it won't replace v8 with v7.
Since 1.4.1.1 was based on 1.4.0 with changes into the python used by Titanium Developer, and not the runtime, 1.4.1.1 was blissfully unaware and unaffected by this issue.
i pushed a fix also to SConstruct so this won't happen again. will clean up old txt files.