Skip to content Skip to sidebar Skip to footer

How To Handle Or Prevent The Fatal Error "Fatal Signal 11 (SIGSEGV)"

Perhapse I am lucky on the fatal error on different signals. For today that was the following: 02-05 20:57:21.827: D/MY_TEST_MESSAGE(4349): Engine.onVisibilityChanged() 02-05 20:57

Solution 1:

Not sure, whether it was done in correct way, but currently I resolved my issue by adding three seconds sleep. So, the onSurfaceDestroyed() has been changed with:

        @Override
    public void onSurfaceDestroyed(SurfaceHolder holder) {
        super.onSurfaceDestroyed(holder);
        Log.d("MY_TEST_MESSAGE", "Engine.onSurfaceDestroyed()");
        try{
             Thread.currentThread().sleep(500);
        }
        catch(Exception ie){ }
        mVisible = false;
        if (myDrawTask != null) {
            myDrawTask.cancel(false);
        }
    }

It works without any unexpected delays.


Post a Comment for "How To Handle Or Prevent The Fatal Error "Fatal Signal 11 (SIGSEGV)""