Android: Crash in Crashlytics stack track generation covers real error
hansemannn opened this issue · comments
We see an error that cannot be tracked because Crashlytics crashes before reporting it, during stack trace generation. A possible "fix" would be a null-check, although it's not clear why it's null here.
AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.app, PID: 4423
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.app/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException: Declaring class is null
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3676)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3813)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2308)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7898)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Caused by: java.lang.NullPointerException: Declaring class is null
at java.util.Objects.requireNonNull(Objects.java:245)
at java.lang.StackTraceElement.<init>(StackTraceElement.java:71)
--> at ti.crashlytics.TitaniumCrashlyticsModule.generateStackTrace(TitaniumCrashlyticsModule.java:98) <--
at ti.crashlytics.TitaniumCrashlyticsModule$1.handleException(TitaniumCrashlyticsModule.java:158)
at org.appcelerator.kroll.KrollRuntime.dispatchException(KrollRuntime.java:541)
at org.appcelerator.titanium.TiApplication$1.uncaughtException(TiApplication.java:366)
at io.intercom.android.sdk.errorreporting.IntercomExceptionHandler.uncaughtException(IntercomExceptionHandler.java:37)
at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:769)
at org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:47)
at android.app.Activity.performCreate(Activity.java:8290)
at android.app.Activity.performCreate(Activity.java:8269)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1384)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3657)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3813)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2308)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7898)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Works! Now we see the real crash (which now also does not kill the app directly):
E/TiExceptionHandler: (main) [4,19670] The specified child already has a parent. You must call removeView() on the child's parent first.
android.view.ViewGroup.addViewInner(ViewGroup.java:5248)
android.view.ViewGroup.addView(ViewGroup.java:5077)
android.view.ViewGroup.addView(ViewGroup.java:5017)
android.view.ViewGroup.addView(ViewGroup.java:4989)
ti.slidingpanel.ViewProxy$ContainerView.handleProperty(ViewProxy.kt:123)
ti.slidingpanel.ViewProxy$ContainerView.processProperties(ViewProxy.kt:105)
org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1305)
org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:492)
org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:482)
org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:435)
org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:499)
org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:482)
org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:435)
org.appcelerator.titanium.proxy.TiViewProxy.add(TiViewProxy.java:622)
ti.modules.titanium.ui.WindowProxy.windowCreated(WindowProxy.java:317)
org.appcelerator.titanium.TiActivityWindows.windowCreated(TiActivityWindows.java:57)
org.appcelerator.titanium.TiBaseActivity.windowCreated(TiBaseActivity.java:600)
org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:767)
org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:47)
android.app.Activity.performCreate(Activity.java:8290)
android.app.Activity.performCreate(Activity.java:8269)
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1384)
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3657)
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3813)
android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2308)
android.os.Handler.dispatchMessage(Handler.java:106)
android.os.Looper.loopOnce(Looper.java:201)
android.os.Looper.loop(Looper.java:288)
android.app.ActivityThread.main(ActivityThread.java:7898)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)