Closed Bug 706449 Opened 8 years ago Closed 8 years ago

Fennec crashes due to SMS receiver unregister call

Categories

(Core :: Widget: Android, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla11

People

(Reporter: mfinkle, Assigned: mounir)

References

Details

Attachments

(1 file)

I/GeckoApp(31779): pause
E/GeckoApp(31779): top level exception
E/GeckoApp(31779): java.lang.RuntimeException: Unable to pause activity {org.mozilla.fennec_mfinkle/org.mozilla.fennec_mfinkle.App}: java.lang.IllegalArgumentException: Receiver not registered: org.mozilla.gecko.GeckoSmsManager@4056c920
E/GeckoApp(31779): 	at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2354)
E/GeckoApp(31779): 	at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2311)
E/GeckoApp(31779): 	at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:2291)
E/GeckoApp(31779): 	at android.app.ActivityThread.access$1700(ActivityThread.java:117)
E/GeckoApp(31779): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:938)
E/GeckoApp(31779): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/GeckoApp(31779): 	at android.os.Looper.loop(Looper.java:130)
E/GeckoApp(31779): 	at org.mozilla.gecko.GeckoApp$24.run(GeckoApp.java:1332)
E/GeckoApp(31779): 	at android.os.Handler.handleCallback(Handler.java:587)
E/GeckoApp(31779): 	at android.os.Handler.dispatchMessage(Handler.java:92)
E/GeckoApp(31779): 	at android.os.Looper.loop(Looper.java:130)
E/GeckoApp(31779): 	at android.app.ActivityThread.main(ActivityThread.java:3683)
E/GeckoApp(31779): 	at java.lang.reflect.Method.invokeNative(Native Method)
E/GeckoApp(31779): 	at java.lang.reflect.Method.invoke(Method.java:507)
E/GeckoApp(31779): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/GeckoApp(31779): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/GeckoApp(31779): 	at dalvik.system.NativeStart.main(Native Method)
E/GeckoApp(31779): Caused by: java.lang.IllegalArgumentException: Receiver not registered: org.mozilla.gecko.GeckoSmsManager@4056c920
E/GeckoApp(31779): 	at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:610)
E/GeckoApp(31779): 	at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:823)
E/GeckoApp(31779): 	at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:331)
E/GeckoApp(31779): 	at org.mozilla.gecko.GeckoApp.onPause(GeckoApp.java:1496)
E/GeckoApp(31779): 	at android.app.Activity.performPause(Activity.java:3851)
E/GeckoApp(31779): 	at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1191)
E/GeckoApp(31779): 	at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2341)
E/GeckoApp(31779): 	... 16 more
I/ActivityManager(   98): Process org.mozilla.fennec_mfinkle (pid 31779) has died.
I/WindowManager(   98): WIN DEATH: Window{40928418 org.mozilla.fennec_mfinkle/org.mozilla.fennec_mfinkle.App paused=true}
I/ActivityManager(   98): Start proc org.mozilla.fennec_mfinkle for activity org.mozilla.fennec_mfinkle/org.mozilla.gecko.AwesomeBar: pid=31806 uid=10064 g
Original code landed from bug 674725
Blocks: websms
Brad pushed a fix:
https://hg.mozilla.org/projects/birch/rev/c77033ad9656
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
This is not what was intended. I wanted to unregister in onDestroy as the patch in bug 674725 shows. I must have failed to merge the patch...
Status: RESOLVED → REOPENED
Component: General → Widget: Android
OS: Linux → All
Product: Fennec Native → Core
QA Contact: general → android
Hardware: x86 → All
Resolution: FIXED → ---
Version: unspecified → Trunk
Correction: mozilla-central is ok.
Things were different on birch because of a merge: https://hg.mozilla.org/projects/birch/rev/79608738a7e8
Attached patch Patch v1Splinter Review
Assignee: nobody → mounir
Status: REOPENED → ASSIGNED
Attachment #578046 - Flags: review?(blassey.bugs)
Comment on attachment 578046 [details] [diff] [review]
Patch v1

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

::: mobile/android/base/GeckoApp.java
@@ +1583,5 @@
>          mFavicons.close();
>  
>          super.onDestroy();
>  
> +        unregisterReceiver(mSmsReceiver);

what is the consequence of these not being unregistered of we don't get onDestroy() called?
AFAIK, onDestroy() not being called can only happen when the application in killed by the system. Anyhow, AFAICT, if the application quits, not unregistering has no impact.
Attachment #578046 - Flags: review?(blassey.bugs) → review+
Flags: in-testsuite?
Target Milestone: --- → mozilla11
Attachment #578046 - Flags: checkin+
https://hg.mozilla.org/mozilla-central/rev/8a7fa0fd9e76
Status: ASSIGNED → RESOLVED
Closed: 8 years ago8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.