Closed Bug 721344 Opened 8 years ago Closed 8 years ago

java.lang.RuntimeException: Unable to pause activity {org.mozilla.fennec_aurora/org.mozilla.fennec_aurora.App}: java.lang.NullPointerException at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2475) at android.app.ActivityThread.per

Categories

(Firefox for Android :: General, defect, P1, critical)

12 Branch
ARM
Android
defect

Tracking

()

RESOLVED FIXED
Firefox 14
Tracking Status
firefox11 --- affected
firefox12 --- affected
firefox13 --- unaffected
blocking-fennec1.0 --- -

People

(Reporter: nhirata, Assigned: sriram)

References

Details

(Keywords: crash, Whiteboard: [native-crash])

Crash Data

Attachments

(1 file, 1 obsolete file)

java.lang.RuntimeException: Unable to pause activity {org.mozilla.fennec_aurora/org.mozilla.fennec_aurora.App}: java.lang.NullPointerException
	at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2475)
	at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2432)
	at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:2412)
	at android.app.ActivityThread.access$1700(ActivityThread.java:123)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:946)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:130)
	at org.mozilla.gecko.GeckoApp$33.run(GeckoApp.java:1513)
	at android.os.Handler.handleCallback(Handler.java:587)
	at android.os.Handler.dispatchMessage(Handler.java:92)
	at android.os.Looper.loop(Looper.

Aurora only?

50acba6d-a4e9-4fad-b706-60fd92120101
java.lang.RuntimeException: Unable to pause activity {org.mozilla.fennec/org.mozilla.fennec.App}: java.lang.NullPointerException
	at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2475)
	at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2432)
	at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:2412)
	at android.app.ActivityThread.access$1700(ActivityThread.java:123)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:946)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:130)
	at org.mozilla.gecko.GeckoApp$33.run(GeckoApp.java:1517)
	at android.os.Handler.handleCallback(Handler.java:587)
	at android.os.Handler.dispatchMessage(Handler.java:92)
	at android.os.Looper.loop(Looper.java:130)
	at android

Nightly version : 22c6c86b-4b15-47f2-a66d-1e0452120118
Crash Signature: [@ mozalloc_abort | __swrite | dexDataMapAlloc]
tracking-fennec: --- → ?
Priority: -- → P1
tracking-fennec: ? → ---
Java crash; nom-ing for blocking fennec
blocking-fennec1.0: --- → ?
Not a top crash, not blocking. Still good to fix though.
blocking-fennec1.0: ? → -
Attached patch Patch (obsolete) — Splinter Review
This should hopefully fix it. This crash would happen when GeckoApp goes to onPause() before onResume() is called -- which is where we are registering the receivers.

As per http://stackoverflow.com/questions/2682043/how-to-check-if-receiver-is-registered-in-android , we cannot find if a receiver has been registered or not. So, we need to have a temporary variable and handle things with it.
Attachment #609493 - Flags: review?(mark.finkle)
Comment on attachment 609493 [details] [diff] [review]
Patch

Would it be nicer to add a start() / stop() to GeckoConnectivityReceiver and track the mRegistered boolean in that class?
I hit this pretty often, just leaving my device idle, and occasionally waking up the screen.. to find the crash reporter is fired.

Started seeing this from 3-23-2012 nightly, Galaxy Nexus - Android 4.0.2

https://crash-stats.mozilla.com/report/index/bp-4176407d-0051-43a1-95f4-175922120327
https://crash-stats.mozilla.com/report/index/bp-3ac9c353-2bc0-4322-afa7-930172120327
This crash is actually quite frequent, but does not rank high on the topcrash charts because Socorro is not correctly matching the crash signatures.
Blocks: 739747
Comment on attachment 609493 [details] [diff] [review]
Patch

Add a start() / stop() to GeckoConnectivityReceiver and track the mRegistered boolean in that class. I don't like having too many data members floating around GeckoApp. Wrap up the functionality into GeckoConnectivityReceiver.
Attachment #609493 - Flags: review?(mark.finkle) → review-
(In reply to Tony Chung [:tchung] from comment #6)
> I hit this pretty often, just leaving my device idle, and occasionally
> waking up the screen.. to find the crash reporter is fired.
(In reply to Chris Peterson (:cpeterson) from comment #7)
> This crash is actually quite frequent, but does not rank high on the
> topcrash charts because Socorro is not correctly matching the crash
> signatures.
You are hitting bug 733142 which is an Illegal Argument Exception and was #2 top crasher in 14.0a1.
This one is a Null Pointer Exception that no longer happens.
Crash Signature: [@ mozalloc_abort | __swrite | dexDataMapAlloc] → Unable to pause activity {org.mozilla.fennec/org.mozilla.fennec.App}: java.lang.NullPointerException at android.app.ActivityThread.performPauseActivity(ActivityThread.java)] [@ java.lang.RuntimeException: Unable to pause activity {org.mozilla.fennec_auror…
Attached patch PatchSplinter Review
I didn't see we are having a GeckoConnectivityReceiver! :sigh:

I've moved the code into GeckoConnectivityReceiver, which takes care of guarded checks. The filter is also moved into GeckoConnectivityReceiver, as it was stranded in GeckoApp.

I somehow felt, receiver.registerFor(activity) to be more convincing than start() and used that approach.
Attachment #609493 - Attachment is obsolete: true
Attachment #610943 - Flags: review?(mark.finkle)
Attachment #610943 - Flags: review?(mark.finkle) → review+
https://hg.mozilla.org/mozilla-central/rev/d5100996fcc5
Assignee: nobody → sriram
Target Milestone: --- → Firefox 14
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Duplicate of this bug: 740602
No longer blocks: 740602
You need to log in before you can comment on or make changes to this bug.