Bug 44576

GemBuilder for Java

3.1.1

Android

3.1.2

Android demo application GbjTest does a force close on orientation changes

The supplied Android demo application GbjTest does a force close when the orientation of the phone changes from portrait to landscape.

If the android log file is being monitored, the call stack looks like:

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.gemstone.android.gbjtest/com.gemstone.android.gbjtest.GbjTestActivity}: com.gemstone.gbj.GbjException: GbjSession already initialized
   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211)
   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
   at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3740)
   at android.app.ActivityThread.access$700(ActivityThread.java:141)
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1262)
   at android.os.Handler.dispatchMessage(Handler.java:99)
   at android.os.Looper.loop(Looper.java:137)
   at android.app.ActivityThread.main(ActivityThread.java:5103)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:525)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
   at dalvik.system.NativeStart.main(Native Method) Caused by: com.gemstone.gbj.GbjException: GbjSession already initialized
   at com.gemstone.gbj.GbjSession.initialize(GbjSession.java:793)
   at com.gemstone.android.gbjtest.GSInterface.initialize(GSInterface.java:15)
   at com.gemstone.android.gbjtest.GbjTestActivity.onCreate(GbjTestActivity.java:112)
   at android.app.Activity.performCreate(Activity.java:5133)
   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)

Workaround

Avoid turning the phone around while running the GbjTest app to avoid resetting the orientation from portrait to landscape.


Last updated: 12/10/14