New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App Crash when forcefully closed in iOS - NS 7.0.11 #8995
Comments
|
Experiencing the same. Also only for a release build (deployed via TestFlight). I guess if it was installed from the AppStore you wouldn't even notice because you wouldn't see the TestFlight "your app has crahed, do you want to notify the developer?" notice. But yeah, it's hard to get your app past QA this way. |
Thanks for the confirmation Eddy. I noticed you have done a few extensions and probably know a bit more about the inner workings of Nativescript, can you think of any suggestions / quick fix around main.m that I can try? I'm not a C literate, but with some guidance / suggestions I'm sure I can put something together to try and avoid this crash, even if not pretty it will likely allow others to overcome this, at least until the root cause is found and a proper solution is identified. |
|
To help narrowing this down I just created a TestFlight build of the exact same app and dependencies, but only changed So a change between 7.0.1 and 7.0.4 is causing this "crash on kill" bug. I can easily narrow this down further, so we know if it was caused in either 7.0.2 (rc, there was no official version), 7.0.3, or 7.0.4. I'll try 7.0.3 first. UPDATE: narrowed it down to some change between |
|
Thanks for the update, I had a look into the commit logs, but can't really figure out what could be causing it. |
|
Could this be related: A few changes to Isolate seem to have been introduced after 7.0.1 . |
|
Seems I missed this being reported on the ns-v8ios-runtime project, there was a fix, but doesn't seem to fix it, someone else has reiterated that: |
|
This was introduced on iOS runtime 7.0.4, works for me on 7.0.3. |
|
I have the same problem running on 7.1.2 |
|
Same problem on 7.1.4 |
Environment
Describe the bug
Runtime error. App installed on iPad Pro 11 (2018), iPad Air, iPhone SE and iPhone X via TestFlight, when forcefully closing the App (via swipe up and swipe out the app to kill it) the App crashes, the Apple log, posted below, suggests either V8 isn't handling this type of App closure, or the main.m . By looking into the main.m source it feels like some sort of handling could potentially go there wrapping the start method. I'm not a C developer otherwise I'd take a stab at it and do a pull request.
Tested it in different conditions and it only crashes if you are in the App and then try to close it.
If you go to the Desktop or another App and then close the App it doesn't show the crash.
It feels like either Apple looses the context and the App still crashes but goes into oblivion, or somehow when the App is put to background goes into some safe condition that allows it to be forcefully shutdown without crashing.
I've wrapped my code in the main function within try catches to ensure it wasn't a crash on our code, but no change.
From the crash report feels like I should be able to do something globally to enable a graceful shutdown.
Outside of this crash the App works as intended in both iOS and Android.
Looking for guidance / ideas on how I can determine the root cause and fix this issue.
Let me know what else could be useful to provide.
I've done:
And here is main part of the crash report from Apple:
To Reproduce
Build, submit to App Store, load it via Test Flight, run App, forcefully close it by swiping up and swiping the App out.
Expected behavior
No crash.
Sample project
Will put a sample project together to share as I can't share this one due to IP, but if you have any ideas / suggestions I could take in to identify the cause and fix it would be great.
Additional context
Added the latest xcode params to the build.xcconfig
File: build.xcconfig
Using a top level Podfile:
File: Info.plist
File: Package.json
The text was updated successfully, but these errors were encountered: