Can't open Activity when try to forceCrash from debug panel
See original GitHub issueI’m trying to connect a debug panel in a separate module and I get the following error
FATAL EXCEPTION: main Process: ru.kupibilet.debug_panel, PID: 13496 java.lang.RuntimeException: java.lang.RuntimeException: Test crash at com.pandulapeter.beagle.core.list.delegates.ForceCrashButtonDelegate$createCells$1.invoke(ForceCrashButtonDelegate.kt:19) at com.pandulapeter.beagle.core.list.delegates.ForceCrashButtonDelegate$createCells$1.invoke(ForceCrashButtonDelegate.kt:11) at com.pandulapeter.beagle.core.list.cells.TextCell$TextViewHolder.bind$lambda-3$lambda-2$lambda-1(TextCell.kt:54) at com.pandulapeter.beagle.core.list.cells.TextCell$TextViewHolder.$r8$lambda$0PflZ2sNu2ByAQSFUWoSyIU_IF0(Unknown Source:0) at com.pandulapeter.beagle.core.list.cells.TextCell$TextViewHolder$$ExternalSyntheticLambda0.onClick(Unknown Source:4) at android.view.View.performClick(View.java:7125) at android.view.View.performClickInternal(View.java:7102) at android.view.View.access$3500(View.java:801) at android.view.View$PerformClick.run(View.java:27336) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) Caused by: java.lang.RuntimeException: Test crash at com.pandulapeter.beagle.modules.ForceCrashButtonModule.<init>(ForceCrashButtonModule.kt:32) at ru.kupibilet.debug_panel.impl.domain.DebugPanelImpl.createDefault(DebugPanelImpl.kt:79) at ru.kupibilet.debug_panel.impl.domain.DebugPanelImpl.create(DebugPanelImpl.kt:34) at ru.kupibilet.sample.debug_panel.DebugPanelSampleActivity.onCreate(DebugPanelSampleActivity.kt:34) at android.app.Activity.performCreate(Activity.java:7802) at android.app.Activity.performCreate(Activity.java:7791) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1299) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) 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:2016) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
FATAL EXCEPTION: main Process: ru.kupibilet.debug_panel:beagleCrashReporter, PID: 13543 java.lang.RuntimeException: Unable to start activity ComponentInfo{ru.kupibilet.debug_panel/com.pandulapeter.beagle.core.view.bugReport.BugReportActivity}: kotlin.UninitializedPropertyAccessException: lateinit property implementation has not been initialized at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3270) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) 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:2016) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) Caused by: kotlin.UninitializedPropertyAccessException: lateinit property implementation has not been initialized at com.pandulapeter.beagle.BeagleCore.getImplementation(BeagleCore.kt:7) at com.pandulapeter.beagle.core.view.bugReport.BugReportActivity.onCreate(BugReportActivity.kt:82) at android.app.Activity.performCreate(Activity.java:7802) at android.app.Activity.performCreate(Activity.java:7791) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1299) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) 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:2016) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Issue Analytics
- State:
- Created a year ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
Thank you! I looked at this moment and it turns out that initialization was not called during the new process.
When your app crashes, the entire process dies. Beagle’s crash reporter spins up a brand new process (that creates a new instance of your custom Application class). That Application class must call Beagle.initialize() before the BugReport activity is opened (onCreate() is a good place to do that). I did some digging into this but the only way I can reproduce your crash is to not call Beagle.initialize(). I suggest you double-check that part.