baka3k / RTSPRecorder

IJKPlayer Android with Recorder & Filter
8 stars 3 forks source link

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 #1

Closed adigest closed 3 years ago

adigest commented 3 years ago
public void buttonCaptureOnClicked(View view) {
        new AsyncTask<Void, Void, Boolean>() {
            @Override
            protected Boolean doInBackground(Void... voids) {
                Bitmap bitmap = Bitmap.createBitmap(1280, 720, Bitmap.Config.ARGB_8888);
                boolean result = false;
                mVideoView.getCurrentFrame(bitmap);

                if (bitmap != null) {
                    File f = new File(mOutPutCaptureFrame);
                    if (f.exists()) {
                        f.delete();
                    }
                    result = BitmapUtils.saveBitmap(bitmap, mOutPutCaptureFrame);
                } else {
                    Log.w("VideoActivity", "bitmap null");
                }
                return result;
            }

            @Override
            protected void onPostExecute(Boolean aVoid) {
                super.onPostExecute(aVoid);
                if (aVoid) {
                    Toast.makeText(getApplicationContext(), "file save to " + mOutPutCaptureFrame, Toast.LENGTH_SHORT).show();
                } else {
                    Toast.makeText(getApplicationContext(), "err, can not save frame" + mOutPutCaptureFrame, Toast.LENGTH_SHORT).show();
                }

            }
        }.execute();
    }

mVideoView.getCurrentFrame(bitmap); following crash:

2021-05-20 16:38:26.600 6300-6300/com.hi.recorderijkplayersample A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 6300 (ijkplayersample)
2021-05-20 16:38:26.645 6399-6399/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2021-05-20 16:38:26.645 6399-6399/? A/DEBUG: Build fingerprint: 'Android/rk3399_all/rk3399_all:7.1.2/NHG47K/yu09012103:userdebug/test-keys'
2021-05-20 16:38:26.645 6399-6399/? A/DEBUG: Revision: '0'
2021-05-20 16:38:26.645 6399-6399/? A/DEBUG: ABI: 'arm64'
2021-05-20 16:38:26.645 6399-6399/? A/DEBUG: pid: 6300, tid: 6300, name: ijkplayersample  >>> com.hi.recorderijkplayersample <<<
2021-05-20 16:38:26.645 6399-6399/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
2021-05-20 16:38:26.645 6399-6399/? A/DEBUG:     x0   00000000787fc00c  x1   0000000000000000  x2   0000000000002780  x3   0000000000000003
2021-05-20 16:38:26.645 6399-6399/? A/DEBUG:     x4   0000000000000000  x5   0000000000000000  x6   00000000787fc00c  x7   0000000000eda3e6
2021-05-20 16:38:26.645 6399-6399/? A/DEBUG:     x8   0000000000000000  x9   000000000000002b  x10  0000007fd0da18a0  x11  0000000000000021
2021-05-20 16:38:26.645 6399-6399/? A/DEBUG:     x12  0000000000000018  x13  0000000060a62002  x14  0023949499e637f4  x15  00002920289ac0dd
2021-05-20 16:38:26.645 6399-6399/? A/DEBUG:     x16  000000761fe99660  x17  0000007649092908  x18  0000000000000000  x19  0000000000000000
2021-05-20 16:38:26.645 6399-6399/? A/DEBUG:     x20  00000000787fe80c  x21  0000000000000001  x22  0000000000002800  x23  00000000000005a0
2021-05-20 16:38:26.645 6399-6399/? A/DEBUG:     x24  0000000000000000  x25  000000761fe75000  x26  0000007647495a98  x27  9bcb2fdeb7c5fbfa
2021-05-20 16:38:26.645 6399-6399/? A/DEBUG:     x28  0000000000000002  x29  0000007fd0da1f98  x30  000000761fe484f0
2021-05-20 16:38:26.646 6399-6399/? A/DEBUG:     sp   0000007fd0da1e10  pc   0000007649092a40  pstate 0000000020000000
2021-05-20 16:38:26.648 6399-6399/? A/DEBUG: backtrace:
2021-05-20 16:38:26.648 6399-6399/? A/DEBUG:     #00 pc 000000000001aa40  /system/lib64/libc.so (memcpy+312)
2021-05-20 16:38:26.648 6399-6399/? A/DEBUG:     #01 pc 000000000001b4ec  /data/app/com.hi.recorderijkplayersample-1/lib/arm64/libijkplayer.so (ffp_get_current_frame_l+192)
2021-05-20 16:38:26.648 6399-6399/? A/DEBUG:     #02 pc 0000000000029cc8  /data/app/com.hi.recorderijkplayersample-1/lib/arm64/libijkplayer.so
2021-05-20 16:38:26.648 6399-6399/? A/DEBUG:     #03 pc 000000000061e6ec  /data/app/com.hi.recorderijkplayersample-1/oat/arm64/base.odex (offset 0x587000)
adigest commented 3 years ago

your lib is very fast to show video, can give the ijkplayer src or build config? Thank you very much .

baka3k commented 3 years ago

@adigest : what's device you met that issue? some time, memory issue is occurred while you capture image continuous. or when you call getCurrentFrame before video play of course, it's not good solution to capture video frame, I will update soon(OpenGL or Vulkan is better)

can give the ijkplayer src or build config?

you can get from below link https://github.com/baka3k/IjkPlayerRecorder

adigest commented 3 years ago

Thanks,All right now