StackOverflowError on Activity.onCreate
<p>I have two activities with same name on two different packages. One is just a subclass of another. I do this to use two different themes, depending on devices. (We use Theme.Dialog for larger screen device, and regular for others.) The inherited class only overrides <code>onCreate</code> to call its super method and set some window flags.</p>

<p>This works very well on all my devices, but I get very weird crash reports a few time.</p>

<pre><code>java.lang.StackOverflowError
    at *****.activities.Register.onCreate(SourceFile)
    at *****.tablet.Register.onCreateRegister(SourceFile)
    (a lot of repeats)
    at *****.activities.Register.onCreate(SourceFile)
    at *****.tablet.Register.onCreateRegister(SourceFile)
    at *****.activities.Register.onCreate(SourceFile)
    at *****.tablet.Register.onCreateRegister(SourceFile)
    at *****.tablet.Register.onCreate(SourceFile)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
    at android.app.ActivityThread.access$1500(ActivityThread.java:117)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:130)
    at android.app.ActivityThread.main(ActivityThread.java:3683)
    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:850)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:608)
    at dalvik.system.NativeStart.main(Native Method)
</code></pre>

<p>I did not create <code>onCreateRegister</code> so I assume it's an internal name, but I am not sure. I use ProGuard but the line numbers should be showing if the recursive calls are by my code.</p>

<p>I can't replicate it in any of my devices, and I get this report even from the same model I already test on, so it's probably not a device-specific problem.</p>

<p>Does anybody have any idea why this is happening, or have a better way to handle this?</p>
