Closed Bug 739152 Opened 12 years ago Closed 12 years ago

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) at org.mozilla.gecko.GeckoApp$31.run

Categories

(Firefox for Android Graveyard :: General, defect)

13 Branch
ARM
Android
defect
Not set
critical

Tracking

(blocking-fennec1.0 -)

RESOLVED WORKSFORME
Tracking Status
blocking-fennec1.0 --- -

People

(Reporter: scoobidiver, Unassigned)

Details

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

Crash Data

There are two crashes. The one in 14.0a1/20120325 is: bp-e649b67d-5e66-4d71-b70b-3fff62120326.

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:1976)
	at android.view.ViewGroup.addView(ViewGroup.java:1871)
	at android.view.ViewGroup.addView(ViewGroup.java:1851)
	at org.mozilla.gecko.GeckoApp$31.run(GeckoApp.java:1387)
	at android.os.Handler.handleCallback(Handler.java:587)
	at android.os.Handler.dispatchMessage(Handler.java:92)
	at android.os.Looper.loop(Looper.java:130)
	at android.app.ActivityThread.main(ActivityThread.java:3691)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:507)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)
	at dalvik.system.NativeStart.main(Native Method)

More reports at:
https://crash-stats.mozilla.com/report/list?signature=java.lang.IllegalStateException%3A+The+specified+child+already+has+a+parent.+You+must+call+removeView%28%29+on+the+child%27%27s+parent+first.+at+android.view.ViewGroup.addViewInner%28ViewGroup.java%29
Crashes are good to fix though this is low volume enough not to block.
blocking-fennec1.0: --- → -
With this stack, there are no crashes.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
Summary: 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) → 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) at org.mozilla.gecko.GeckoApp$31.run
If you have this kind of statement..
View view = inflater.inflate(R.layout.fragment1, container);//Incorrect one
Then try this.. Add false as third argument.. this helped me too
View view = inflater.inflate(R.layout.fragment1, container, false);//correct one
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.