Note: There are a few cases of duplicates in user autocompletion which are being worked on.

java.lang.IllegalStateException: at android.widget.ListView.layoutChildren(ListView.java) with Adapter(class org.mozilla.gecko.AllPagesTab$AwesomeBarCursorAdapter)

RESOLVED FIXED in Firefox 17

Status

()

Firefox for Android
General
--
critical
RESOLVED FIXED
5 years ago
a year ago

People

(Reporter: Scoobidiver (away), Assigned: bnicholson)

Tracking

({crash, steps-wanted, topcrash})

16 Branch
Firefox 19
ARM
Android
crash, steps-wanted, topcrash
Points:
---

Firefox Tracking Flags

(firefox16+, firefox17+ fixed, firefox18 fixed, fennec+)

Details

(Whiteboard: [native-crash][startupcrash], crash signature)

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
It's similar to bug 732902 but this one is #5 top crasher in 16.0.

java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread. [in ListView(-1, class android.widget.ListView) with Adapter(class org.mozilla.gecko.AllPagesTab$AwesomeBarCursorAdapter)]
	at android.widget.ListView.layoutChildren(ListView.java:1538)
	at android.widget.AbsListView.onTouchEvent(AbsListView.java:3445)
	at android.view.View.dispatchTouchEvent(View.java:5717)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1956)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1717)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1962)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1731)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1962)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1731)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1962)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1731)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1962)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1731)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1962)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1731)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1962)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1731)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1962)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1731)
	at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2064)
	at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1400)
	at android.app.Activity.dispatchTouchEvent(Activity.java:2369)
	at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2012)
	at android.view.View.dispatchPointerEvent(View.java:5897)
	at android.view.ViewRootImpl.deliverPointerEvent(ViewRootImpl.java:3115)
	at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2657)
	at android.view.ViewRootImpl.processInputEvents(ViewRootImpl.java:1021)
	at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2666)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:137)
	at android.app.ActivityThread.main(ActivityThread.java:4511)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:511)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:986)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:753)
	at dalvik.system.NativeStart.main(Native Method)

More reports at:
https://crash-stats.mozilla.com/report/list?signature=java.lang.IllegalStateException%3A+at+android.widget.ListView.layoutChildren%28ListView.java%29
Scoobidiver - Do we have any correlations to devices or kernels ?
Keywords: needURLs, qawanted, steps-wanted
(Reporter)

Comment 2

5 years ago
(In reply to bhavana bajaj [:bajaj] from comment #1)
> Scoobidiver - Do we have any correlations to devices or kernels ?
There are crashes from Froyo to JB.
The solution is in bug 732902 comment 8.
Whiteboard: [native-crash] → [native-crash][startupcrash]
10 	about:home
1 	http://www.amazon.com/exec/obidos/subst/home/home.html/ref=topnav_storetab_gw
1 	http://memebase.cheezburger.com/
1 	about:blank
1 	http://www.totalgamesolutions.com/
1 	http://boards.4chan.org/b/res/428487825#p428491560
1 	http://www.fsryc.com.pe/SistemaWebP/
1 	https://www.facebook.com/
1 	http://www.emaxme.com/products/appliances
1 	http://www.dizimag.com/yabanci-diziler.html
1 	http://zalukaj.tv/sms
1 	https://addons.mozilla.org/de/firefox/addon/flash-video-downloader-youtube/?src=
1 	about:firefox
1 	http://z6.invisionfree.com/Mumbo_Jumbo_Gumbo/index.php?s=74bfa61cb97a67de5f677a6
1 	http://hughewilliams.com/2012/10/01/five-myths-about-hash-tables/
Keywords: needURLs

Comment 4

5 years ago
mfinkle/blassey - who would be in the best position to investigate this for mobile?
tracking-firefox16: ? → +
tracking-firefox17: --- → +
Assignee: nobody → lucasr.at.mozilla
tracking-fennec: ? → +

Updated

5 years ago
Keywords: qawanted
OS: Linux → Android
Hardware: All → ARM

Comment 5

5 years ago
Aaron - any luck with reproducing?

Lucas - any next steps from the engineering angle? Speculative fixes should land on mozilla-beta in the next week (before b4 goes to build on 10/30).
Keywords: qawanted
I have not been able to reproduce this. 

Bug 732902 comment #8 expresses a speculative fix.
Keywords: qawanted
(In reply to Aaron Train [:aaronmt] from comment #6)
> I have not been able to reproduce this. 
> 
> Bug 732902 comment #8 expresses a speculative fix.

The problem here is that the stack trace doesn't give any clue as to where the illegal change to the adapter is coming from. I'd need at least a reliable way to reproduce this in order to work on a patch.
Mark - we're out of ideas here, this is still at #5 topcrash on both 16.0.1 and 17.0b3 so a fix would be most welcome for uplift.
Assignee: lucasr.at.mozilla → mark.finkle
Assignee: mark.finkle → lucasr.at.mozilla
(Assignee)

Comment 9

5 years ago
I've been testing different phones to see if I can reproduce this crash. I've finally been able to get it to happen somewhat often on a Droid Pro by tapping on the URL bar, then quickly trying to scroll the list while mashing letters on the keyboard at the same time (if it doesn't crash within a second or two, close the AwesomeScreen and repeat). These STR are far from consistent, but it works often enough that I might be able to pin this down.
Assignee: lucasr.at.mozilla → bnicholson
(Assignee)

Comment 10

5 years ago
Created attachment 676324 [details] [diff] [review]
Call notifyDataSetChanged() after setting search engines

We add entries to the search engine at [1], and the list of search engines is used for getCount() at [2]. However, we never call notifyDataSetChanged() in between, resulting in the crash.

[1] http://hg.mozilla.org/integration/mozilla-inbound/file/b45a4dcb88c1/mobile/android/base/awesomebar/AllPagesTab.java#l522
[2] http://hg.mozilla.org/integration/mozilla-inbound/file/b45a4dcb88c1/mobile/android/base/awesomebar/AllPagesTab.java#l299
Attachment #676324 - Flags: review?(mark.finkle)
Comment on attachment 676324 [details] [diff] [review]
Call notifyDataSetChanged() after setting search engines

Good investigation!
Attachment #676324 - Flags: review?(mark.finkle) → review+
I assume we want this simple fix uplifted too
(Assignee)

Comment 13

5 years ago
Comment on attachment 676324 [details] [diff] [review]
Call notifyDataSetChanged() after setting search engines

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 
User impact if declined: awesomescreen crashes
Testing completed (on m-c, etc.): locally
Risk to taking this patch (and alternatives if risky): very low
String or UUID changes made by this patch: none
Attachment #676324 - Flags: approval-mozilla-beta?
Attachment #676324 - Flags: approval-mozilla-aurora?
(Assignee)

Comment 14

5 years ago
http://hg.mozilla.org/mozilla-central/rev/a5ab93cf9fea
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
(Assignee)

Updated

5 years ago
Target Milestone: --- → Firefox 19
Comment on attachment 676324 [details] [diff] [review]
Call notifyDataSetChanged() after setting search engines

build on trunk looks ok - approving for branches.
Attachment #676324 - Flags: approval-mozilla-beta?
Attachment #676324 - Flags: approval-mozilla-beta+
Attachment #676324 - Flags: approval-mozilla-aurora?
Attachment #676324 - Flags: approval-mozilla-aurora+
(Assignee)

Comment 16

5 years ago
http://hg.mozilla.org/releases/mozilla-aurora/rev/50c5626641e2
status-firefox18: --- → fixed
(Assignee)

Comment 17

5 years ago
http://hg.mozilla.org/releases/mozilla-beta/rev/92c8acaff4c8
status-firefox17: --- → fixed
You need to log in before you can comment on or make changes to this bug.