How can I resolve crash Thread SIGSEGV 0x0000000000000010 in react native - firebase

I have an application published in Play Store,
I got a crash report but I can't figure out how to resolve it,
Trace:
Crashed: Thread: SIGSEGV 0x0000000000000010
at (Manquant)()
at (Manquant)()
at (Manquant)()

Related

Flutter Firebase Crashlytics reports stack trace as Java class files and not as Dart files

I have integrated Flutter Crashlytics in our app, but it is reporting crashes stack trace in Java class files and not in Dart files. So it is difficult to infer what is the file and line number where this issue occurred in the flutter codebase.
Here is an example of one such crash report from Firebase Crashltytics of an Uncaught exception:
Non-fatal Exception: java.lang.Exception: NoSuchMethodError: The method 'markNeedsBuild' was called on null.
Receiver: null
Tried calling: markNeedsBuild()
at State.setState(State.java:1168)
at _ArgonButtonState.initState.<fn>(initState.java:107)
at AnimationLocalStatusListenersMixin.notifyStatusListeners(AnimationLocalStatusListenersMixin.java:193)
at AnimationController._checkStatusChanged(AnimationController.java:773)
at AnimationController._tick(AnimationController.java:789)
at Ticker._tick(Ticker.java:237)
at SchedulerBinding._invokeFrameCallback(SchedulerBinding.java:1102)
at SchedulerBinding.handleBeginFrame.<fn>(handleBeginFrame.java:1017)
at SchedulerBinding.handleBeginFrame(SchedulerBinding.java:1015)
at SchedulerBinding._handleBeginFrame(SchedulerBinding.java:949)
Here is how Crashlytics is initialized:
// Pass all uncaught errors from the framework to Crashlytics.
FlutterError.onError = Crashlytics.instance.recordFlutterError;
runZoned(() {
runApp(AppMain(homeWidget));
}, onError: Crashlytics.instance.recordError);
I am reporting caught exceptions as such:
Crashlytics.instance.recordError(error, stack);
How can I configure Crashlytics to report stack trace in dart? Does Crashlytics show erroneous file names and line numbers for Dart source code?
Todd from Crashlytics. This is a known behavior and we are looking into possible options moving forward. Kotlin users will see a similar behavior.
I would suggest to move on to Sentry.
I am doing it for my app now. And while just testing it, I can say that sentry is much better than Crashlytics!

Firebase Strictmode resource leak

After converting from Crashlytics via Fabric to Crashlytics via Firebase, I started seeing the below call stack in debug runs where StrictMode is enabled looking for resource leaks.
StrictMode is in use with this code, only on debug builds:
StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
.detectLeakedClosableObjects()
.penaltyLog()
.build());
I'm using this versions of Fabric's gradle tools in project-level gradle:
classpath "io.fabric.tools:gradle:1.27.0"
and these versions of Firebase and Crashlytics in module-level gradle:
implementation "com.google.firebase:firebase-core:16.0.7"
implementation "com.crashlytics.sdk.android:crashlytics:2.9.8"
During initialization, the Firebase instrumentation kicks off a background thread that is doing settings calls using okhttp. When it does, StrictMode causes this call stack to pop:
W/CrashlyticsCore: Received null settings, skipping report submission!
D/StrictMode: StrictMode policy violation: android.os.strictmode.LeakedClosableViolation: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
at android.os.StrictMode$AndroidCloseGuardReporter.report(StrictMode.java:1786)
at dalvik.system.CloseGuard.warnIfOpen(CloseGuard.java:264)
at java.util.zip.Inflater.finalize(Inflater.java:398)
at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:250)
at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:237)
at java.lang.Daemons$Daemon.run(Daemons.java:103)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.Throwable: Explicit termination method 'end' not called
at dalvik.system.CloseGuard.open(CloseGuard.java:221)
at java.util.zip.Inflater.<init>(Inflater.java:114)
at com.android.okhttp.okio.GzipSource.<init>(GzipSource.java:62)
at com.android.okhttp.internal.http.HttpEngine.unzip(HttpEngine.java:473)
at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:648)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:471)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:407)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:538)
at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105)
at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:26)
at io.fabric.sdk.android.services.network.HttpRequest.code(HttpRequest.java:1357)
at io.fabric.sdk.android.services.settings.DefaultSettingsSpiCall.handleResponse(DefaultSettingsSpiCall.java:104)
at io.fabric.sdk.android.services.settings.DefaultSettingsSpiCall.invoke(DefaultSettingsSpiCall.java:88)
at io.fabric.sdk.android.services.settings.DefaultSettingsController.loadSettingsData(DefaultSettingsController.java:90)
at io.fabric.sdk.android.services.settings.DefaultSettingsController.loadSettingsData(DefaultSettingsController.java:67)
at io.fabric.sdk.android.services.settings.Settings.loadSettingsData(Settings.java:153)
at io.fabric.sdk.android.Onboarding.retrieveSettingsData(Onboarding.java:126)
at io.fabric.sdk.android.Onboarding.doInBackground(Onboarding.java:99)
at io.fabric.sdk.android.Onboarding.doInBackground(Onboarding.java:45)
at io.fabric.sdk.android.InitializationTask.doInBackground(InitializationTask.java:63)
at io.fabric.sdk.android.InitializationTask.doInBackground(InitializationTask.java:28)
at io.fabric.sdk.android.services.concurrency.AsyncTask$2.call(AsyncTask.java:311)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764) 
D/FA: Event not sent since app measurement is disabled
I see this happening on pretty much every debug run of my app, during the initial activity startup in the app. However support claims they don't see this.
Does anyone know what conditions cause Fabric to kick off this onboarding/settings thread?
I've seen similar StrictMode call stacks in these other posts. I can't tell if this leak is in Fabric code, or in the okhttp library they are using. Here are links to similar cases where people are seeing what looks to me like the same underlying resource leak:
StrictMode penalising for Firebase Ads
Crashlytics with StrictMode enabled (detect all) gives "untagged socket detected"
https://github.com/cloudant/sync-android/issues/577

Better exception call stack in Firebase Crashlytics for React Native app

I' receiving some crash reports in my Firebase Crashlytics dashboard. However, the report only shows native code call stacks, and JS stack is minimized and un-readable. For example:
Fatal Exception: com.facebook.react.common.JavascriptException: undefined is not a function (evaluating 'r[n]()'), stack:
<unknown>#284:210
value#36:1363
value#23:3582
<unknown>#23:1067
value#23:3009
value#23:1039
at com.facebook.react.modules.core.ExceptionsManagerModule.showOrThrowError(ExceptionsManagerModule.java:54)
at com.facebook.react.modules.core.ExceptionsManagerModule.reportFatalException(ExceptionsManagerModule.java:38)
at java.lang.reflect.Method.invoke(Method.java)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:160)
at com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
at android.os.Looper.loop(Looper.java:164)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
at java.lang.Thread.run(Thread.java:764)
The only thing I can get from the above report is that the JS code is trying to invoke an undefined object, but it's hard to locate where exactly the issue is at.
Is it possible to submit a symbol file or mapping file of some kind, so that this report can be more useful to help me see which function is having the problem?
Thank you.

React Native app crashes when login

I'm having troble with my app, this app is react native and everything is works well, but in production it's crashes on login. On Dev mode, on my phone it's okay, only on production crashes.
I tried some solutions that I found here in stackOverflow but none of them helped in fixing the bug.
The first error is a normal firebase connection and get uid for user. I can't fix this and it's a simple connection... help please!!
This is the error:
com.facebook.react.common.JavascriptException: null is not an object (evaluating 'l.currentUser.uid'), stack:
value#306:2672
onPress#306:6430
touchableHandlePress#174:1566
_performSideEffectsForTransition#167:8505
_receiveSignal#167:7292
touchableHandleResponderRelease#167:4757
g#41:296
invokeGuardedCallback#41:496
invokeGuardedCallbackAndCatchFirstError#41:611
A#41:2410
D#41:3172
U#41:2969
<unknown>#41:15497
batchedUpdates#41:72147
Ie#41:14848
ze#41:15343
receiveTouches#41:16180
value#18:3582
<unknown>#18:1067
value#18:3009
value#18:1039
at com.facebook.react.modules.core.ExceptionsManagerModule.showOrThrowError(ExceptionsManagerModule.java:54)
at com.facebook.react.modules.core.ExceptionsManagerModule.reportFatalException(ExceptionsManagerModule.java:38)
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:160)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
at android.os.Looper.loop(Looper.java:207)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
at java.lang.Thread.run(Thread.java:818)
Thanks
Anderson - LógikaWeb
old version problem!
First the problem it's a empty variable. I changed a route and fix the code error in props.
I update my ambient and all works fine with 0.61 version.

A process serving application pool 'X' suffered a fatal communication error with the Windows Process Activation Service

I'm running an ASP.NET 4.0 application under IIS 7.5. Several times a day, our application pool is recycling unexpectedly. Our system log shows the following event when this occurs:
A process serving application pool 'X' suffered a fatal communication error with the Windows Process Activation Service. The process id was '5768'. The data field contains the error number.
OR
A process serving application pool 'X' failed to respond to a ping. The process id was '1032'.
Almost always, there is a corresponding event at the exact same time in the Application log like this:
Faulting application name: w3wp.exe, version: 7.5.7600.16385, time stamp: 0x4a5bcd2b
Faulting module name: clr.dll, version: 4.0.30319.269, time stamp: 0x4ee9ae83
Exception code: 0xc00000fd
Fault offset: 0x00001916
Faulting process id: 0x508
Faulting application start time: 0x01cd4d8958ecf9ad
Faulting application path: C:\Windows\SysWOW64\inetsrv\w3wp.exe
Faulting module path: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Report Id: 8dcc413b-b98a-11e1-8075-001c23d6d910
So I installed IIS Debugging Tools and set up a crash rule, specified "A specific IIS web application pool", no logging for first chance exceptions, and nothing under "Advanced Settings" (exceptions, breakpoints, events).
I'm also (concurrently) running ADPlus from the Windows Debugging Tools with the following command line:
adplus -crash -pn w3wp.exe -NoDumpOnFirst -o c:\logs
However, since I've attached the debuggers, I've gotten several "warning" level messages in the System log (the ones regarding the "Process serving application pool 'X' suffered a fatal communication error..."), but I am NOT getting the corresponding Error level event in the Application log anymore.
The only thing I've been able to get is the following (there were about 50 of these):
[6/18/2012 7:50:25 PM] Thread exited. Exiting thread system id - System ID: 3300. Exit code - 0x800703e9
[6/18/2012 7:50:25 PM] Thread exited. Exiting thread system id - System ID: 4992. Exit code - 0x800703e9
[6/18/2012 7:50:25 PM] Thread exited. Exiting thread system id - System ID: 5456. Exit code - 0x800703e9
[6/18/2012 7:50:25 PM] Thread exited. Exiting thread system id - System ID: 4924. Exit code - 0x800703e9
Exit code 0x800703e9 indicates a stack overflow somewhere, which is fortunate because that should be easy to fix once I can find it.
However, in order to do so, I need more information from my crash dumps so that I can open them with WinDbg and use the "!clrstack" command to pinpoint my problem.
My question is: Do I have the debugging tools configured incorrectly or am I misunderstanding the event logs? It seems our app pool is recycling whenever I see the event in the System log regarding the "fatal communication error with Windows Process Activation Service", however I'm not getting any crash dump info from IIS Debugging Tools or ADPlus when those events occur. And for some reason, since I've attached the debuggers, I'm not getting any more "Error" events in the Application log that correspond with my System log warning events. Not sure why. I somehow need to get the full crash dump with CLR information in it so I can figure out where my problem is.
The only other thing I can think to mention is that the Windows Error Reporting service is not running. Not sure if it needs to be or not.
Thanks for any help.
Both the exception code you were getting in the Application log, and thread exit code indicate you have stack overflow. It is puzzling why process is not crashing when thread exits with stack overflow error though. Anyways, to enable break on stack overflow exception, the command is:
sxe sov
Please note that you will need to use x86 version of the debugger in your case, because your application pool is configured as 32 bit process.

Resources