App crashes after switching back to vertical screen

Tutorials concerning the OpenGL® ES cross-platform API for full-function 2D and 3D graphics on the Google-Android platform.

App crashes after switching back to vertical screen

Postby marcelloma » Fri Apr 03, 2009 1:59 pm

I'm making a game, when I raise the screen showing the keyboard the game works fine and it automatically adjusts itself, when I hide the keyboard again though the game terminates abnormally, any ideas why?

Edit: it seems like the game is restarted everytime you change the screen size, it's a memory problem check it out
09-10 14:32:50.342: ERROR/(1263): VM won't let us allocate 3782400 bytes
09-10 14:32:50.342: WARN/dalvikvm(1263): threadid=3: thread exiting with uncaught exception (group=0x4000fe68)
09-10 14:32:50.342: ERROR/AndroidRuntime(1263): Uncaught handler: thread main exiting due to uncaught exception
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): java.lang.RuntimeException: Unable to start activity ComponentInfo{app.android.gametemplate/app.android.gametemplate.GameTemplate}: android.view.InflateException: Binary XML file line #6: Error inflating class java.lang.reflect.Constructor
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2141)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2157)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3087)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at android.app.ActivityThread.access$1900(ActivityThread.java:112)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1585)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at android.os.Handler.dispatchMessage(Handler.java:88)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at android.os.Looper.loop(Looper.java:123)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at android.app.ActivityThread.main(ActivityThread.java:3739)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at java.lang.reflect.Method.invokeNative(Native Method)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at java.lang.reflect.Method.invoke(Method.java:515)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at dalvik.system.NativeStart.main(Native Method)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): Caused by: android.view.InflateException: Binary XML file line #6: Error inflating class java.lang.reflect.Constructor
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at android.view.LayoutInflater.createView(LayoutInflater.java:512)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:564)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:231)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at android.app.Activity.setContentView(Activity.java:1568)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at app.android.gametemplate.GameTemplate.onCreate(GameTemplate.java:97)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1122)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2104)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): ... 12 more
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): Caused by: java.lang.reflect.InvocationTargetException
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at app.android.gametemplate.GameView.<init>(GameView.java:465)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at java.lang.reflect.Constructor.constructNative(Native Method)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at java.lang.reflect.Constructor.newInstance(Constructor.java:424)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at android.view.LayoutInflater.createView(LayoutInflater.java:499)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): ... 22 more
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:290)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at android.graphics.BitmapFactory.decodeResource(BitmapFactory.java:193)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at android.graphics.BitmapFactory.decodeResource(BitmapFactory.java:213)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at app.android.gametemplate.GameField2.<init>(GameField2.java:77)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): at app.android.gametemplate.GameView$GameThread.<init>(GameView.java:153)
09-10 14:32:50.422: ERROR/AndroidRuntime(1263): ... 26 more
09-10 14:32:50.582: WARN/WindowManager(52): No window to dispatch pointer action 0
09-10 14:32:50.732: WARN/WindowManager(52): No window to dispatch pointer action 1
09-10 14:32:51.852: WARN/CheckinService(52): Checkin failed: java.net.UnknownHostException: Host is unresolved: android.clients.google.com:443
09-10 14:33:10.922: WARN/CheckinService(52): Checkin failed: java.net.UnknownHostException: Host is unresolved: android.clients.google.com:443

Any idea or doc?
marcelloma
Junior Developer
Junior Developer
 
Posts: 12
Joined: Wed Mar 18, 2009 4:31 pm

Top

Return to Android 2D/3D Graphics - OpenGL Tutorials

Who is online

Users browsing this forum: No registered users and 2 guests