Closed
Bug 1354973
Opened 8 years ago
Closed 8 years ago
Crash in java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child''s parent first. at android.view.ViewGroup.addViewInner(ViewGroup.java)
Categories
(Firefox for Android Graveyard :: Awesomescreen, defect)
Tracking
(firefox52 wontfix, firefox-esr52 unaffected, firefox53 wontfix, firefox54 fixed, firefox55 fixed)
RESOLVED
FIXED
Firefox 55
Tracking | Status | |
---|---|---|
firefox52 | --- | wontfix |
firefox-esr52 | --- | unaffected |
firefox53 | --- | wontfix |
firefox54 | --- | fixed |
firefox55 | --- | fixed |
People
(Reporter: maliu, Assigned: maliu)
References
Details
(Keywords: crash)
Crash Data
Attachments
(1 file)
(deleted),
text/x-review-board-request
|
sebastian
:
review+
gchang
:
approval-mozilla-aurora+
|
Details |
This bug was filed from the Socorro interface and is
report bp-262e6399-5496-4556-86d8-12a952170409.
=============================================================
java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
at android.view.ViewGroup.addViewInner(ViewGroup.java:3881)
at android.view.ViewGroup.addView(ViewGroup.java:3734)
at android.support.v4.view.ViewPager.addView(Unknown Source)
at android.view.ViewGroup.addView(ViewGroup.java:3679)
at android.view.ViewGroup.addView(ViewGroup.java:3655)
at org.mozilla.gecko.home.activitystream.topsites.TopSitesPagerAdapter.instantiateItem(TopSitesPagerAdapter.java:71)
Looks like we store views in pages list for reuse, not actually create a new instance every time.
Comment hidden (mozreview-request) |
Updated•8 years ago
|
Assignee: nobody → max
Status: NEW → ASSIGNED
Comment 2•8 years ago
|
||
mozreview-review |
Comment on attachment 8856439 [details]
Bug 1354973 - Remove view before add to new ViewGroup,
https://reviewboard.mozilla.org/r/128396/#review131974
Thanks for fixing this!
::: mobile/android/base/java/org/mozilla/gecko/home/activitystream/topsites/TopSitesPagerAdapter.java:72
(Diff revision 1)
> + ViewParent viewParent = page.getParent();
> + if (viewParent != null && viewParent instanceof ViewGroup) {
> + ViewGroup viewGroup = (ViewGroup) viewParent;
> + viewGroup.removeView(page);
> + }
nit: final :)
Attachment #8856439 -
Flags: review?(s.kaspari) → review+
Comment hidden (mozreview-request) |
Pushed by max@mxli.us:
https://hg.mozilla.org/integration/autoland/rev/9b66674b3b80
Remove view before add to new ViewGroup, r=sebastian
Comment 5•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Comment 6•8 years ago
|
||
Goes back to Fx51 and bug 1293790 IIUC. Please request Aurora approval on this if I've got that right :)
Blocks: 1293790
status-firefox52:
--- → wontfix
status-firefox53:
--- → wontfix
status-firefox54:
--- → affected
status-firefox-esr52:
--- → unaffected
Flags: needinfo?(max)
Version: unspecified → 51 Branch
Assignee | ||
Comment 7•8 years ago
|
||
Comment on attachment 8856439 [details]
Bug 1354973 - Remove view before add to new ViewGroup,
Approval Request Comment
[Feature/Bug causing the regression]: ActivityStream
[User impact if declined]: Random timing crash when TopSite refreshed
[Is this code covered by automated tests?]: No
[Has the fix been verified in Nightly?]:Yes
[Needs manual test from QE? If yes, steps to reproduce]: No
[List of other uplifts needed for the feature/fix]: No
[Is the change risky?]: No
[Why is the change risky/not risky?]: Trivial solution on the same thread and small function block
[String changes made/needed]: No
Flags: needinfo?(max)
Attachment #8856439 -
Flags: approval-mozilla-aurora?
Comment 8•8 years ago
|
||
Comment on attachment 8856439 [details]
Bug 1354973 - Remove view before add to new ViewGroup,
Fix a crash. Aurora54+.
Attachment #8856439 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 9•8 years ago
|
||
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
•