Last Comment Bug 706449 - Fennec crashes due to SMS receiver unregister call
: Fennec crashes due to SMS receiver unregister call
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Widget: Android (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla11
Assigned To: Mounir Lamouri (:mounir)
:
: Jim Chen [:jchen] [:darchons]
Mentors:
Depends on:
Blocks: websms
  Show dependency treegraph
 
Reported: 2011-11-30 05:44 PST by Mark Finkle (:mfinkle) (use needinfo?)
Modified: 2011-12-10 20:38 PST (History)
3 users (show)
mounir: in‑testsuite?
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (3.89 KB, patch)
2011-11-30 12:27 PST, Mounir Lamouri (:mounir)
blassey.bugs: review+
mounir: checkin+
Details | Diff | Splinter Review

Description Mark Finkle (:mfinkle) (use needinfo?) 2011-11-30 05:44:11 PST
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
Comment 1 Mark Finkle (:mfinkle) (use needinfo?) 2011-11-30 05:47:13 PST
Original code landed from bug 674725
Comment 2 Mark Finkle (:mfinkle) (use needinfo?) 2011-11-30 05:48:07 PST
Brad pushed a fix:
https://hg.mozilla.org/projects/birch/rev/c77033ad9656
Comment 3 Mounir Lamouri (:mounir) 2011-11-30 11:53:58 PST
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...
Comment 4 Mounir Lamouri (:mounir) 2011-11-30 12:23:53 PST
Correction: mozilla-central is ok.
Things were different on birch because of a merge: https://hg.mozilla.org/projects/birch/rev/79608738a7e8
Comment 5 Mounir Lamouri (:mounir) 2011-11-30 12:27:42 PST
Created attachment 578046 [details] [diff] [review]
Patch v1
Comment 6 Brad Lassey [:blassey] (use needinfo?) 2011-12-02 11:08:22 PST
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?
Comment 7 Mounir Lamouri (:mounir) 2011-12-02 14:04:34 PST
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.
Comment 8 Ed Morley [:emorley] 2011-12-10 20:38:07 PST
https://hg.mozilla.org/mozilla-central/rev/8a7fa0fd9e76

Note You need to log in before you can comment on or make changes to this bug.