Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FATAL SIGNAL 11 (Sigsegv) at 0x00000000 (code=1)?

Why does this problem occur?

public static String path;
private VideoView mVideoView;


mVideoView = (VideoView) findViewById(R.id.surface_view);
mVideoView.setVideoPath(path);
mVideoView.setMediaController(new MediaController(this));
mVideoView.requestFocus();

//...

    private int mLayout = VideoView.VIDEO_LAYOUT_ZOOM;

    @Override
    public void onConfigurationChanged(Configuration newConfig) {
        if (mVideoView != null)
            mVideoView.setVideoLayout(mLayout, 0);
        super.onConfigurationChanged(newConfig);
    }

this is error

like image 870
Ersin Gülbahar Avatar asked May 28 '12 16:05

Ersin Gülbahar


3 Answers

The error message you are seeing is caused by dereferencing a null pointer in native code. From what you show it's hard to guess what may be the cause.

In your place I'd double check that you're not passing a null references to a system or library method.

like image 193
Nicola Musatti Avatar answered Nov 11 '22 17:11

Nicola Musatti


As mentioned by Nicola, this is most likely caused by dereferencing a null pointer in the native code. I had a similar issue and resolved it by debugging the stack trace.

If you turn off filtering in your log cat, you will see the entire stack trace. This will give you detailed information at where the crash occurred, I used the following python script in order to find the exact cause; https://code.google.com/p/android-ndk-stacktrace-analyzer/wiki/Usage

In my case a null pointer was occurring due to running a custom android build.

Good luck

like image 5
Lunar Avatar answered Nov 11 '22 16:11

Lunar


Most likely a threading problem... I once ran in a Fatal Signal 11 as well, when I was doing stuff on the wrong thread...

Probably the setVideoLayout()-call in you onConfigurationChanged() implementation.

Would be helpful tho, if you could post some more code...

like image 4
Sambuca Avatar answered Nov 11 '22 17:11

Sambuca