knilch0r / freeshisen

Free (OSS) ShisenSho game for android.
https://github.com/knilch0r/freeshisen
GNU General Public License v2.0
13 stars 2 forks source link

IllegalStateException for setContentView in onCreate #2

Closed GoogleCodeExporter closed 6 years ago

GoogleCodeExporter commented 9 years ago
From Google Play developer console:

java.lang.RuntimeException: Unable to start activity 
ComponentInfo{de.cwde.freeshisen/de.cwde.freeshisen.ShisenShoActivity}: 
java.lang.IllegalStateException: The specified child already has a parent. You 
must call removeView() on the child's parent first.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1696)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1716)
at android.app.ActivityThread.access$1500(ActivityThread.java:124)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:968)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3806)
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:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
Caused by: 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:2117)
at android.view.ViewGroup.addView(ViewGroup.java:2012)
at android.view.ViewGroup.addView(ViewGroup.java:1992)
at 
com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:279
)
at 
com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:269
)
at android.app.Activity.setContentView(Activity.java:1727)
at de.cwde.freeshisen.ShisenShoActivity.onCreate(ShisenShoActivity.java:34)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1660)
... 11 more

Original issue reported on code.google.com by knilc...@gmail.com on 31 Mar 2013 at 4:59

GoogleCodeExporter commented 9 years ago
Don't have any clue on this one. According to some internet searches, calling 
setContentView once and inside onCreate should be the only place where it's 
sure you *won't* get an IllegalStateException...

Don't have any extra information for this one either, and for now, it only 
occured once...

Original comment by knilc...@gmail.com on 31 Mar 2013 at 5:26

knilch0r commented 7 years ago

Last report: 17. Nov. 2016 17:32, Android 6 And one on 14. Okt. 2016 17:40, Android 4.

I've wildly added "synchronized" keywords in the latest versions, maybe that helps?

knilch0r commented 6 years ago

Didn't see this for more than a year - maybe it's fixed?