Note that there are some explanatory texts on larger screens.

plurals
  1. POMy android application crashes at second time I open it
    primarykey
    data
    text
    <p>I use a contentView "gameView" it extends a SurfaceView and I use a thread to have a permanent loop to my game, my onCreate() method is</p> <pre><code>public class mainclass extends Activity { GameView game; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); game = new GameView(this); setContentView(game); } </code></pre> <p>the crash logcat is </p> <pre><code>05-09 09:35:06.378: W/dalvikvm(9664): threadid=1: thread exiting with uncaught exception (group=0x40015560) 05-09 09:35:06.388: E/AndroidRuntime(9664): FATAL EXCEPTION: main 05-09 09:35:06.388: E/AndroidRuntime(9664): java.lang.OutOfMemoryError: bitmap size exceeds VM budget 05-09 09:35:06.388: E/AndroidRuntime(9664): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) 05-09 09:35:06.388: E/AndroidRuntime(9664): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:460) 05-09 09:35:06.388: E/AndroidRuntime(9664): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:336) 05-09 09:35:06.388: E/AndroidRuntime(9664): at android.graphics.BitmapFactory.decodeResource(BitmapFactory.java:359) 05-09 09:35:06.388: E/AndroidRuntime(9664): at android.graphics.BitmapFactory.decodeResource(BitmapFactory.java:385) 05-09 09:35:06.388: E/AndroidRuntime(9664): at superBill.Mbiz.Egypt.GameView.&lt;init&gt;(GameView.java:87) 05-09 09:35:06.388: E/AndroidRuntime(9664): at superBill.Mbiz.Egypt.SuperBillActivity.onCreate(SuperBillActivity.java:20) 05-09 09:35:06.388: E/AndroidRuntime(9664): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 05-09 09:35:06.388: E/AndroidRuntime(9664): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611) 05-09 09:35:06.388: E/AndroidRuntime(9664): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663) 05-09 09:35:06.388: E/AndroidRuntime(9664): at android.app.ActivityThread.access$1500(ActivityThread.java:117) 05-09 09:35:06.388: E/AndroidRuntime(9664): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931) 05-09 09:35:06.388: E/AndroidRuntime(9664): at android.os.Handler.dispatchMessage(Handler.java:99) 05-09 09:35:06.388: E/AndroidRuntime(9664): at android.os.Looper.loop(Looper.java:130) 05-09 09:35:06.388: E/AndroidRuntime(9664): at android.app.ActivityThread.main(ActivityThread.java:3683) 05-09 09:35:06.388: E/AndroidRuntime(9664): at java.lang.reflect.Method.invokeNative(Native Method) 05-09 09:35:06.388: E/AndroidRuntime(9664): at java.lang.reflect.Method.invoke(Method.java:507) 05-09 09:35:06.388: E/AndroidRuntime(9664): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 05-09 09:35:06.388: E/AndroidRuntime(9664): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 05-09 09:35:06.388: E/AndroidRuntime(9664): at dalvik.system.NativeStart.main(Native Method) </code></pre> <p>Note: this crash happens at second time but third one is ok, fourth one crashes, five is ok and so on.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload