Closed Waleedasim closed 3 weeks ago
I found a few problems with this issue:
Hi @Waleedasim, thank you for reaching out. I tried reproducing the issue with the dependencies and code snippet you shared, however, I did not not encounter any exception in using only throw RuntimeException("Test crash")
.
Here's how I implement on button click:
binding.button.setOnClickListener {
throw RuntimeException("Test crash")
//Also working
// GlobalScope.launch(Dispatchers.IO)
// {
// throw RuntimeException("Test crash")
// }
}
Are you constantly experiencing this error? Or does the issue occur on certain devices and/or android versions? If by any chance, could you share an MCVE to help us investigate the issue? Thanks!
Hi @lehcar09, Thanks for the quick reply.
Yes, I am always facing this issue, and I also tried it on Android 14, but the issue persists. I want to share the gradle file with you. How can I share it with you considering privacy concerns?
If by any chance, can you share an MCVE? You just need to remove the google-services.json file and replace your application ID (if applicable).
I would suggest try using our quickstart app and make incremental changes to reproduce the issue.
You can share the Github repository link of your MCVE.
@lehcar09 I have identified the issue, which lies within JNIHelp.
Below is the stack trace (the app has become unresponsive due to an overload of warnings on the main thread when crashed):
JNIHelp W Discarding pending exception (java.lang.StackOverflowError: stack size 8188KB) to throw java/lang/RuntimeException
I believe this is the cause of the crash in Crashlytics.
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
I have an issue with Crashlytics. When I force a crash on the main thread as described in the documentation (on button click), I get the following exception:
Steps to reproduce:
What happened? How can we make the problem occur? I am using Android 9 and have just integrated Crashlytics. I am using the latest Gradle plugin, Firebase BOM, and Crashlytics Gradle.
Relevant Code: