question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't open Activity when try to forceCrash from debug panel

See original GitHub issue

I’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:closed
  • Created a year ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
l1onProcommented, Oct 26, 2022

Thank you! I looked at this moment and it turns out that initialization was not called during the new process.

0reactions
pandulapetercommented, Oct 26, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android app crashes when launched in debug mode
My solution was to launch the app normally (with the green arrow), navigate just after the place it used to crash and then...
Read more >
Detect and diagnose crashes - Android Developers
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java...
Read more >
Diagnosing issues using crash reports and device logs
To debug a problem using a crash report: Build your app with symbol information and retain the Xcode archive before distributing the app....
Read more >
Debugging Exceptions within your App - CodePath Cliffnotes
Debugging Procedure · Witnessing the Crash · Setting Up Error Filter · Find the Stack Trace · Identify the Exception · Open the...
Read more >
Debugging - Expo Documentation
Learn about different techniques and tools available to debug your Expo project.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found