Closed
Bug 761706
Opened 12 years ago
Closed 12 years ago
Better fix for: java.lang.IllegalArgumentException (Receiver not registered)
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox14 affected, firefox15 affected, firefox16 affected, firefox17 affected, firefox18 fixed, blocking-fennec1.0 -, fennec17+)
VERIFIED
FIXED
Firefox 18
People
(Reporter: mfinkle, Assigned: kats)
References
Details
(Keywords: crash)
Crash Data
Attachments
(7 files, 3 obsolete files)
46.02 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
4.43 KB,
text/plain
|
Details | |
4.98 KB,
patch
|
kats
:
review+
|
Details | Diff | Splinter Review |
7.32 KB,
patch
|
kats
:
review+
|
Details | Diff | Splinter Review |
5.92 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
12.31 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
1.49 KB,
patch
|
mounir
:
review+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #744850 +++
Bug 744850 is currently used to find any way to stop the bleeding/crashing. We need to look for other ways to fix the bug in a more correct manner.
Updated•12 years ago
|
tracking-fennec: --- → 16+
blocking-fennec1.0: ? → -
Reporter | ||
Comment 1•12 years ago
|
||
Is this showing up in crash stats?
Comment 2•12 years ago
|
||
(In reply to Mark Finkle (:mfinkle) from comment #1)
> Is this showing up in crash stats?
No because it's fixed by bug 744850, but bug 760392 has a close stack trace.
Reporter | ||
Updated•12 years ago
|
Assignee: nobody → sriram
tracking-fennec: 16+ → 17+
Assignee | ||
Comment 3•12 years ago
|
||
This problem is trivial to reproduce if you turn on the "don't keep activities" checkbox. The problem occurs because we do the registration/unregistration in onApplicationPause and onApplicationResume, which are independent of the GeckoApp activity's lifecycle. Specifically, you can open the awesomebar and android could kill GeckoApp without ever unregistering the connectivity listener.
There's a whole mess of bad code here. Patches coming.
Assignee: sriram → bugmail.mozilla
Assignee | ||
Comment 4•12 years ago
|
||
Attachment #660082 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 5•12 years ago
|
||
Attachment #660083 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 6•12 years ago
|
||
This is the big scary one, but I'm pretty sure this is the right thing to be doing. The problem with the existing method is that gecko activities that have been paused by other gecko activities can be destroyed by android, and when the top activity is popped the old one is re-started from scratch. The hasStarted boolean is false at that point and screws things up.
Attachment #660085 -
Flags: feedback?(mark.finkle)
Reporter | ||
Updated•12 years ago
|
Attachment #660082 -
Flags: review?(mark.finkle) → review+
Reporter | ||
Updated•12 years ago
|
Attachment #660083 -
Flags: review?(mark.finkle) → review+
Reporter | ||
Comment 7•12 years ago
|
||
Should we be doing the same thing for the GeckoBatteryManager? GeckoScreenOrientationListener seems similar too, but I'm not sure if it needs to be associated with an Activity or not.
Lastly, we seem to use slightly different init/start/stop APIs for each of these managers/listeners. Should we file a followup to unify them a bit?
Comment 8•12 years ago
|
||
(In reply to Kartikaya Gupta (:kats) from comment #6)
> Created attachment 660085 [details] [diff] [review]
> (3/3) Simplify background detection
>
> This is the big scary one, but I'm pretty sure this is the right thing to be
> doing. The problem with the existing method is that gecko activities that
> have been paused by other gecko activities can be destroyed by android, and
> when the top activity is popped the old one is re-started from scratch. The
> hasStarted boolean is false at that point and screws things up.
How do you detect if the new activity opened is owned by us, or some other activity via Share?
Assignee | ||
Comment 9•12 years ago
|
||
(In reply to Sriram Ramasubramanian [:sriram] from comment #8)
> How do you detect if the new activity opened is owned by us, or some other
> activity via Share?
If the new activity is owned by us, it will extend from GeckoActivity, and so will call GeckoApplication.onActivityResume. If the new activity is not owned by us, then it won't extend from GeckoActivity, and GeckoApplication will not know about it. It will just know that the last activity (which *was* owned by us) got paused, so we are effectively in the background.
Assignee | ||
Comment 10•12 years ago
|
||
Whitespace changes only (and added one set of braces around a single-line if). I'll attach an ignore-ws patch as well.
Attachment #660965 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 11•12 years ago
|
||
Oh I also added LOGTAG to GeckoNetworkManager
Assignee | ||
Comment 12•12 years ago
|
||
Rebased the old patch on top of the whitespace fixing; carrying r+
Attachment #660082 -
Attachment is obsolete: true
Attachment #660969 -
Flags: review+
Assignee | ||
Comment 13•12 years ago
|
||
Rebased the old patch on top of the whitespace changes, and renamed some of methods/staticness so that the interface to use GeckoConnectivityReceiver is the same as the other classes. Carrying r+ since the bulk of the change is the same as the last patch.
Attachment #660083 -
Attachment is obsolete: true
Attachment #660970 -
Flags: review+
Assignee | ||
Comment 14•12 years ago
|
||
Attachment #660971 -
Flags: review?(mark.finkle)
Reporter | ||
Comment 15•12 years ago
|
||
Comment on attachment 660965 [details] [diff] [review]
(1/6) Fix indenting
Thanks for the ignore-ws patch
Attachment #660965 -
Flags: review?(mark.finkle) → review+
Assignee | ||
Comment 16•12 years ago
|
||
Move the broadcast receivers into GeckoApplication, and get rid of the hacky GeckoActivity code to detect if one of our activities is on the top of the stack. Note that I keep the screen orientation listener in GeckoApp because it does seem to be an activity-specific thing and not an application-wide thing.
Attachment #660085 -
Attachment is obsolete: true
Attachment #660085 -
Flags: feedback?(mark.finkle)
Attachment #660975 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 17•12 years ago
|
||
Inner classes in Java can access private functions of the outer class just fine.
Attachment #660978 -
Flags: review?(mounir)
Reporter | ||
Updated•12 years ago
|
Attachment #660971 -
Flags: review?(mark.finkle) → review+
Reporter | ||
Comment 18•12 years ago
|
||
Comment on attachment 660975 [details] [diff] [review]
(5/6) Move application-level receivers from GeckoApp to GeckoApplication
Let's just keep an eye open for any pause/resume regressions
Attachment #660975 -
Flags: review?(mark.finkle) → review+
Comment 19•12 years ago
|
||
Comment on attachment 660978 [details] [diff] [review]
(6/6) Make public function private
Review of attachment 660978 [details] [diff] [review]:
-----------------------------------------------------------------
r=me, assuming this is working.
Attachment #660978 -
Flags: review?(mounir) → review+
Assignee | ||
Comment 20•12 years ago
|
||
Try run at https://tbpl.mozilla.org/?tree=Try&rev=acce06249686 showed no new errors, so pushed to inbound:
https://hg.mozilla.org/integration/mozilla-inbound/rev/cf2e7dc4182f
https://hg.mozilla.org/integration/mozilla-inbound/rev/338823aa94a6
https://hg.mozilla.org/integration/mozilla-inbound/rev/29466c92fe44
https://hg.mozilla.org/integration/mozilla-inbound/rev/0a5e2949c8f3
https://hg.mozilla.org/integration/mozilla-inbound/rev/967eec801160
https://hg.mozilla.org/integration/mozilla-inbound/rev/ec6eab545501
This is marked as tracking 17+ but I don't really think it needs uplifting to 17 since there's no user-visible impact. I'd rather just let it ride the trains.
Assignee | ||
Comment 21•12 years ago
|
||
(In reply to Kartikaya Gupta (:kats) from comment #20)
> This is marked as tracking 17+ but I don't really think it needs uplifting
> to 17 since there's no user-visible impact.
By this I mean no crashing. There is probably some user-visible behaviour with edge cases and such, but the exceptions get caught. So at worst Gecko wouldn't be getting some battery/network/screen change notifications.
Comment 22•12 years ago
|
||
(In reply to Kartikaya Gupta (:kats) from comment #21)
> By this I mean no crashing.
Bug 760392 is #22 top crasher in 15.0.1.
Assignee | ||
Comment 23•12 years ago
|
||
I stand corrected. We should keep an eye on those crash reports and see if they still happen on 18 with this set of patches landed.
Comment 24•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/cf2e7dc4182f
https://hg.mozilla.org/mozilla-central/rev/338823aa94a6
https://hg.mozilla.org/mozilla-central/rev/29466c92fe44
https://hg.mozilla.org/mozilla-central/rev/0a5e2949c8f3
https://hg.mozilla.org/mozilla-central/rev/967eec801160
https://hg.mozilla.org/mozilla-central/rev/ec6eab545501
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 18
Comment 25•12 years ago
|
||
There's one crash in 18.0a1/20120921: bp-3b7dc71f-1bb5-47bf-b318-06b852120921.
Comment 26•12 years ago
|
||
Is this safe to uplift to Beta? We're going to build on 17 Beta 4 tomorrow and would consider uplift here to help with stability if this is known to be low risk.
Assignee | ||
Comment 27•12 years ago
|
||
I wouldn't consider these patches to be low-risk. There's a lot of changes that have the potential to interact badly with code on 17 and I wouldn't feel comfortable uplifting it this late.
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•