[TIMOB-25476] iOS: JSCore enabled app crashes ios app
GitHub Issue | n/a |
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Not Our Bug |
Resolution Date | 2017-11-06T07:32:51.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Anthony Chung |
Assignee | Unknown |
Created | 2017-11-03T04:57:51.000+0000 |
Updated | 2018-08-06T17:52:08.000+0000 |
Description
true
ios app crashes with the following crashlog.
Have seen on lower sdks as well.
Happens both on iOS simulator and on device.
Tested on SDK: 6.3.0.GA
Xcode 9.
iOS 11.
This is stopping our team from using jscore/and safari debugger benefits, which is meant to be default soon in Ti 7+.
Also stopping Hyperloop adoption.
device.log attached for device app crash.
Attachments
File | Date | Size |
device.log | 2017-11-03T04:56:00.000+0000 | 83992 |
Hey Anthony, I'd like to check this out asap. Does it crash immediately after starting the app and does it also reproduce with a new project? Unfortunately there is no test-case attached, so we won't be able to do much at this point. *EDIT*: It looks like being related to closing a window inside a tabgroup that fires events?
Hi [~hknoechel], I'm not sure what test case to provide because I don't understand what is going on. The app crashes about a minute into opening. I don't need to do anything. Just wait about a minute. You mentioned... "It looks like being related to closing a window inside a tabgroup that fires events?" If there is anything else that you might be able to interpret from the log - that'd be much appreciated. I had trouble understanding the log.I will trace fireevents with windows attached to the tabgroup. Thanks, Anthony
The important lines are these ones (from the bottom to the top):
It looks like the tab-groups gets closed and all tabs / windows inside it as well. Also, using an new project (actually with Hyperloop enabled to be sure). It runs since ~ 10min now and working fine. It *could* be a global event like Ti.App.fireEvent that may fire unexpectedly.
Hi [~hknoechel]! Your extra comments were much appreciated. I was able to fix the bug as a result. JScore looks like it handles setTimeout differently. I don't understand how or why, but when the app calls a setTimeout function after the tabgroup creation, it will crash... if it calls the setTimeout before the tabgroup creation it won't crash. I am using a timeout delay because the tabgroup is heavy and wanted to put some time padding to clear the password on the login screen in the background after the user sees the screen they logged into. I will need to try and find out more about how setTimeouts behave with Jscore enabled. This code has been here for a long time and doesn't crash with previous non-jscore. Thanks so much, Anthony Code snippets below.
Spoke too soon. Crash still occurring. Thank anyway for pointing me in the right direction. I'll keep digging. You can close this ticket. It must be code specific. If I can recreate the issue, I will file a separate ticket. Much appreciated [~hknoechel].
Thanks [~threethirds]. We'll still keep an eye on this one. Using JSCore actually used Apple's build-in JSCore-framework instead of our custom one, which is the future of Titanium and enables pretty interesting things like ES6 already. We may handle
setTimeout
too manual right now, so you don't need to change to much in the future. Let us know if you see any other problems!Closing as "not our bug". If you disagree, please reopen.