Skip to content
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

ti.map.TiUIMapView.release Crash #306

Open
andersdp opened this issue Jun 19, 2020 · 3 comments
Open

ti.map.TiUIMapView.release Crash #306

andersdp opened this issue Jun 19, 2020 · 3 comments

Comments

@andersdp
Copy link

andersdp commented Jun 19, 2020

After updating our app to SDK 9.0.3 (from 8.3.1) we're starting to see a new crash related to ti.map (we're using 5.0.2).

The error only occurs on Android 9 according to Play Store. This is the error log from Play Store:

java.lang.RuntimeException: 
at android.app.ActivityThread.performDestroyActivity (ActivityThread.java:5176)
at android.app.ActivityThread.handleDestroyActivity (ActivityThread.java:5195)
at android.app.servertransaction.DestroyActivityItem.execute (DestroyActivityItem.java:39)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:145)
at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:70)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2199)
at android.os.Handler.dispatchMessage (Handler.java:112)
at android.os.Looper.loop (Looper.java:216)
at android.app.ActivityThread.main (ActivityThread.java:7625)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:524)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:987)
Caused by: java.lang.IllegalStateException: 
at androidx.fragment.app.FragmentManagerImpl.checkStateLoss (FragmentManagerImpl.java:1536)
at androidx.fragment.app.FragmentManagerImpl.enqueueAction (FragmentManagerImpl.java:1558)
at androidx.fragment.app.BackStackRecord.commitInternal (BackStackRecord.java:317)
at androidx.fragment.app.BackStackRecord.commit (BackStackRecord.java:282)
at org.appcelerator.titanium.view.TiUIFragment.release (TiUIFragment.java:146)
at ti.map.TiUIMapView.release (TiUIMapView.java:1263)
at org.appcelerator.titanium.proxy.TiViewProxy.releaseViews (TiViewProxy.java:542)
at org.appcelerator.titanium.proxy.TiViewProxy.releaseViews (TiViewProxy.java:538)
at org.appcelerator.titanium.proxy.TiViewProxy.releaseViews (TiViewProxy.java:538)
at org.appcelerator.titanium.proxy.TiViewProxy.releaseViews (TiViewProxy.java:538)
at org.appcelerator.titanium.proxy.TiViewProxy.releaseViews (TiViewProxy.java:538)
at org.appcelerator.titanium.proxy.TiViewProxy.releaseViews (TiViewProxy.java:538)
at org.appcelerator.titanium.proxy.TiViewProxy.releaseViews (TiViewProxy.java:538)
at org.appcelerator.titanium.proxy.TiViewProxy.release (TiViewProxy.java:557)
at org.appcelerator.titanium.proxy.ActivityProxy.release (ActivityProxy.java:352)
at org.appcelerator.titanium.TiBaseActivity.onDestroy (TiBaseActivity.java:1538)
at org.appcelerator.titanium.TiActivity.onDestroy (TiActivity.java:91)
at android.app.Activity.performDestroy (Activity.java:7737)
at android.app.Instrumentation.callActivityOnDestroy (Instrumentation.java:1327)
at android.app.ActivityThread.performDestroyActivity (ActivityThread.java:5161)

Is this SDK or ti.map related?

@andersdp
Copy link
Author

No one else is seeing this?

@m1ga
Copy link
Contributor

m1ga commented Jun 28, 2020

No, not seeing this. Any way you can reproduce it perhaps?
But searching for FragmentManager and IllegalStateException you'll find something like https://stackoverflow.com/a/17758145/5193915 which might be a problem in this line: https://github.com/appcelerator/titanium_mobile/blob/0558c28b54dfb195d7a5c22851060e416e9811f8/android/titanium/src/java/org/appcelerator/titanium/view/TiUIFragment.java#L146
so perhaps it is a combination of SDK and map in that special scenario. This problem is caused by committing a fragment after the activity is onPaused. Are you using pause events or resume events and do something with the map?
But again: blind guesses :)

@andersdp
Copy link
Author

Just checked the crash log again - 100% of the crashes happens on Huawei devices 😒 So probably nothing to do about it?
Crashes seen on Android 8.0, 8.1, 9.0 and 10.0 but only after we rolled out SDK 9.0.3, nothing before that.

100% Huawei crashes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants