Closed Bug 721308 Opened 8 years ago Closed 8 years ago

ConcurrentModificationException when closing a tab and reopening the tabstray quickly

Categories

(Firefox for Android :: General, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 12

People

(Reporter: blassey, Assigned: blassey)

References

Details

Attachments

(1 file, 1 obsolete file)

E/AndroidRuntime( 2046): FATAL EXCEPTION: GeckoLooper Thread
E/AndroidRuntime( 2046): java.util.ConcurrentModificationException
E/AndroidRuntime( 2046): 	at java.util.HashMap$HashIterator.nextEntry(HashMap.java:796)
E/AndroidRuntime( 2046): 	at java.util.HashMap$ValueIterator.next(HashMap.java:828)
E/AndroidRuntime( 2046): 	at org.mozilla.gecko.Tabs$1.run(Tabs.java:225)
E/AndroidRuntime( 2046): 	at android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime( 2046): 	at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 2046): 	at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 2046): 	at org.mozilla.gecko.GeckoAppShell$LooperThread.run(GeckoAppShell.java:185)

So the problem is the iterator is looping over the tabs hashmap on the background thread (with bug 721216) while we're changing the contents of the hashmap on the main UI thread.
Attached patch patch (obsolete) — Splinter Review
Assignee: nobody → blassey.bugs
Attachment #591878 - Flags: review?(mark.finkle)
Attached patch patchSplinter Review
oops
Attachment #591878 - Attachment is obsolete: true
Attachment #591878 - Flags: review?(mark.finkle)
Attachment #591961 - Flags: review?(mark.finkle)
Comment on attachment 591961 [details] [diff] [review]
patch

I assume creating a few runnables quickly won't kill us
Attachment #591961 - Flags: review?(mark.finkle) → review+
Blocks: 721216
Comment on attachment 591961 [details] [diff] [review]
patch

[Approval Request Comment]
Regression caused by (bug #): 
User impact if declined: 
potential crash
Testing completed (on m-c, etc.): 
Risk to taking this patch (and alternatives if risky):
none
Attachment #591961 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/841549cbe2ff
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 12
Comment on attachment 591961 [details] [diff] [review]
patch

[Triage Comment]
Mobile only - approved for Aurora.
Attachment #591961 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.