Closed Bug 1093098 Opened 10 years ago Closed 10 years ago

crash in java.lang.UnsupportedOperationException: JNI Function called before it was loaded at org.mozilla.gecko.ANRReporter.requestNativeStack(Native Method)

Categories

(Firefox for Android Graveyard :: General, defect)

36 Branch
ARM
Android
defect
Not set
critical

Tracking

(firefox36 affected)

RESOLVED FIXED
Firefox 36
Tracking Status
firefox36 --- affected

People

(Reporter: aaronmt, Assigned: jchen)

Details

(Keywords: crash)

Crash Data

Attachments

(1 file, 1 obsolete file)

This bug was filed from the Socorro interface and is 
report bp-0adc85fb-4d8c-4c33-acac-bb3112141102.
=============================================================

java.lang.UnsupportedOperationException: JNI Function called before it was loaded
	at org.mozilla.gecko.ANRReporter.requestNativeStack(Native Method)
	at org.mozilla.gecko.ANRReporter.onReceive(ANRReporter.java:586)
	at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:755)
	at android.os.Handler.handleCallback(Handler.java:615)
	at android.os.Handler.dispatchMessage(Handler.java:92)
	at android.os.Looper.loop(Looper.java:137)
	at org.mozilla.gecko.ANRReporter$1.run(ANRReporter.java:96)
	at java.lang.Thread.run(Thread.java:856)
Only two crashes, so I guess nchen can look at this when he's back.
Assignee: nobody → nchen
Status: NEW → ASSIGNED
Quietly skip getting the native stack if libs are not loaded.
Attachment #8518393 - Flags: review?(snorp)
Comment on attachment 8518393 [details] [diff] [review]
Don't get native stack before libs are loaded (v1)

Review of attachment 8518393 [details] [diff] [review]:
-----------------------------------------------------------------

::: mobile/android/base/ANRReporter.java
@@ +474,5 @@
> +        boolean haveNativeStack = false;
> +        try {
> +            // Unwinding is memory intensive; only unwind if we have enough memory.
> +            haveNativeStack = requestNativeStack(/* unwind */ SysInfo.getMemSize() >= 640);
> +        } catch (final UnsupportedOperationException e) {

Maybe you could just use GeckoThread.checkLaunchState() to make sure we're running? Not really sure what the advantage would be. Maybe requestNativeStack() could crash if we are in some sorta-running-but-not-really state?
Attachment #8518393 - Flags: review?(snorp) → review+
Changed to using GeckoThread.checkLaunchState().
Attachment #8524689 - Flags: review+
Attachment #8518393 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/48e460577514
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 36
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: