java.lang.IllegalStateException: ScrollView can host only one direct child at android.widget.ScrollView.addView(ScrollView.java)

VERIFIED FIXED in Firefox 15

Status

()

Firefox for Android
General
--
critical
VERIFIED FIXED
5 years ago
4 years ago

People

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

Tracking

({crash, regression, topcrash})

17 Branch
Firefox 17
ARM
Android
crash, regression, topcrash
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(firefox15 verified, firefox16 verified, firefox17 verified)

Details

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

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
It has been it by 4 users since 17.0a1/20120803. The regression range is:
hg.mozilla.org/mozilla-central/pushloghtml?fromchange=588424024294&tochange=89dcadd42ec4
It's likely a regression from bug 686528.

Here is a crash report: bp-a2eff7a4-6e88-4876-a39e-4e63a2120804.

java.lang.IllegalStateException: ScrollView can host only one direct child
	at android.widget.ScrollView.addView(ScrollView.java:241)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:743)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:459)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
	at org.mozilla.gecko.AboutHomeContent.inflate(AboutHomeContent.java:143)
	at org.mozilla.gecko.AboutHomeContent.init(AboutHomeContent.java:111)
	at org.mozilla.gecko.BrowserApp$AboutHomeRunnable.run(BrowserApp.java:528)
	at android.os.Handler.handleCallback(Handler.java:605)
	at android.os.Handler.dispatchMessage(Handler.java:92)
	at android.os.Looper.loop(Looper.java:137)
	at android.app.ActivityThread.main(ActivityThread.java:4424)
	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:784)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
	at dalvik.system.NativeStart.main(Native Method)

More reports at:
https://crash-stats.mozilla.com/report/list?signature=java.lang.IllegalStateException%3A+ScrollView+can+host+only+one+direct+child+at+android.widget.ScrollView.addView%28ScrollView.java%29
I saw this error while creating the patches in bug 686528. I thought I fixed it with removeAllViews() but I will investigate.
Assignee: nobody → michael.l.comella
Status: NEW → ASSIGNED
(Reporter)

Comment 2

5 years ago
It's #4 top crasher over the last 3 days.
tracking-fennec: --- → ?
Keywords: topcrash
Affected for 17.
status-firefox16: --- → unaffected
status-firefox17: --- → affected
Created attachment 649415 [details] [diff] [review]
Patch

After an OOM cleanup of BrowerApp, AboutHomeContent.inflate() would get called in AboutHomeContent.onConfigurationChanged() before AboutHomeContent.init() was called from BrowserApp.

Made GeckoApp/BrowserApp call inflate() instead of onConfigurationChanged() to ensure it's only called after init() is.
Attachment #649415 - Flags: review?(sriram)
Comment on attachment 649415 [details] [diff] [review]
Patch

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

Looks good to me.
Attachment #649415 - Flags: review?(sriram) → review+
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/fad487db4ea9
Flags: in-testsuite-
Keywords: checkin-needed

Comment 7

5 years ago
https://hg.mozilla.org/mozilla-central/rev/fad487db4ea9
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 17
(Reporter)

Updated

5 years ago
status-firefox17: affected → fixed
Comment on attachment 649415 [details] [diff] [review]
Patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 686528
User impact if declined: Inflation of about:home will crash at times.
Testing completed (on m-c, etc.): Landed in m-c on 08/07
Risk to taking this patch (and alternatives if risky): None.
String or UUID changes made by this patch: None.
Attachment #649415 - Flags: approval-mozilla-beta?
Attachment #649415 - Flags: approval-mozilla-aurora?
Comment on attachment 649415 [details] [diff] [review]
Patch

Approving for Aurora but can someone please confirm if 15 is affected by this?
Attachment #649415 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
(Reporter)

Comment 10

5 years ago
(In reply to Lukas Blakk [:lsblakk] from comment #9)
> Approving for Aurora but can someone please confirm if 15 is affected by
> this?
Aurora and Beta are currently unaffected, but will be once bug 686528 lands in branches.
As mentioned in comment #10, to land bug 686528 in beta, I would need approval for this.
Comment on attachment 649415 [details] [diff] [review]
Patch

approving then, for Beta, please make sure all this lands today so that it goes into Beta 5 and we have time to make sure there aren't any serious regressions for this.
Attachment #649415 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Keywords: checkin-needed
Please note that the patches in bug 686528 should land before this patch (and the patch in bug 780481 should also land in this series).
This didn't apply cleanly to aurora, but the unbitrotting was pretty mechanical. That said, please look it over to make sure I didn't mess anything up.

https://hg.mozilla.org/releases/mozilla-aurora/rev/0000a76dc267

https://hg.mozilla.org/releases/mozilla-beta/rev/acf8046887e0
status-firefox15: --- → fixed
status-firefox16: unaffected → fixed
Keywords: checkin-needed
This had to be backed out due to bustage from bug 686528.

https://hg.mozilla.org/releases/mozilla-aurora/rev/1b8af79d5194
https://hg.mozilla.org/releases/mozilla-beta/rev/09e2ae313229
status-firefox15: fixed → ---
status-firefox16: fixed → unaffected
Pushed to beta: https://hg.mozilla.org/releases/mozilla-beta/rev/d6cbf07e54ed
status-firefox15: --- → fixed
And to aurora: https://hg.mozilla.org/releases/mozilla-aurora/rev/e3985167ea1d
status-firefox16: unaffected → fixed
The last crash occurred almost a week ago on 17.0a1 build. I cannot reproduce it on any branch. Closing bug as verified fixed.

--
Device: Galaxy Note
OS: Android 4.0.4
Status: RESOLVED → VERIFIED
status-firefox15: fixed → verified
status-firefox16: fixed → verified
status-firefox17: fixed → verified
tracking-fennec: ? → ---
You need to log in before you can comment on or make changes to this bug.