Closed januarydayfin closed 1 year ago
2023-02-06 17:57:42.414 A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000000 2023-02-06 17:57:42.414 A/DEBUG: Cause: null pointer dereference
There's something that isn't getting initialized somewhere. If you're trying to use multiple threads, don't do that. Try to use only a single thread, that should help.
2023-02-06 17:57:42.414 A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000000 2023-02-06 17:57:42.414 A/DEBUG: Cause: null pointer dereference
There's something that isn't getting initialized somewhere. If you're trying to use multiple threads, don't do that. Try to use only a single thread, that should help.
Tried to use it in single thread, by using Handler(getMainLooper)
public class SingleFrameGrabber {
private FFmpegFrameGrabber grabber;
private Frame frame;
private AndroidFrameConverter converter;
private Bitmap bmp;
public SingleFrameGrabber() {
converter = new AndroidFrameConverter();
}
public Runnable grabFromRtsp(String rtsp) {
return () -> {
try {
grabber = new FFmpegFrameGrabber(rtsp);
grabber.start();
frame = grabber.grabImage();
grabber.stop();
grabber.release();
} catch (FFmpegFrameGrabber.Exception e) {
}
bmp = converter.convert(frame);
};
}
}
Call by
private void loadPreview(CameraCommon camera) {
SingleFrameGrabber grabber = new SingleFrameGrabber();
Handler handler = new Handler(context().getMainLooper());
handler.postDelayed(grabber.grabFromRtsp(camera.getRtspStream()),0);
}
So we have now other stacktrace)
G: Build fingerprint: 'Xiaomi/dipper/dipper:8.1.0/OPM1.171019.011/V9.5.5.0.OEAMIFA:user/release-keys'
2023-02-07 10:05:31.406 A/DEBUG: Revision: '0'
2023-02-07 10:05:31.406 A/DEBUG: ABI: 'arm64'
2023-02-07 10:05:31.406 A/DEBUG: Timestamp: 2023-02-07 10:05:30.894388639+0700
2023-02-07 10:05:31.406 A/DEBUG: Process uptime: 4s
2023-02-07 10:05:31.406 A/DEBUG: Cmdline: org.myApp.android.app.smart_home_services
2023-02-07 10:05:31.406 A/DEBUG: pid: 15614, tid: 15614, name: t_home_services >>> org.myApp.android.app.smart_home_services <<<
2023-02-07 10:05:31.406 A/DEBUG: uid: 10195
2023-02-07 10:05:31.406 A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000000
2023-02-07 10:05:31.406 A/DEBUG: Cause: null pointer dereference
2023-02-07 10:05:31.406 A/DEBUG: x0 0000000000000000 x1 00000070655d6f35 x2 0000000000000000 x3 4b6b0b3b29900398
2023-02-07 10:05:31.406 A/DEBUG: x4 0000000080000000 x5 1c675729670e1e1b x6 1b1e0ee72957671c x7 6e66644aff6e7271
2023-02-07 10:05:31.406 A/DEBUG: x8 0000000000000072 x9 00000000000000e1 x10 0101010101010101 x11 0000000000000003
2023-02-07 10:05:31.406 A/DEBUG: x12 0000000029804ab1 x13 0000000000000000 x14 0000000000000000 x15 0000000000000000
2023-02-07 10:05:31.406 A/DEBUG: x16 00000070657b7658 x17 000000706b019e50 x18 00000073cfba4000 x19 00000070655abd58
2023-02-07 10:05:31.406 A/DEBUG: x20 0000000000000000 x21 00000070655a7a70 x22 00000070655abd58 x23 000000706574d300
2023-02-07 10:05:31.406 A/DEBUG: x24 0000000000000001 x25 0000000000000000 x26 00000070655abd3b x27 00000073cf060000
2023-02-07 10:05:31.406 A/DEBUG: x28 0000000000000000 x29 0000007ff13d7cfc
2023-02-07 10:05:31.406 A/DEBUG: lr 00000070651759a8 sp 0000007ff13d7c40 pc 000000706b019e58 pst 0000000080000000
2023-02-07 10:05:31.406 A/DEBUG: backtrace:
2023-02-07 10:05:31.406 A/DEBUG: #00 pc 0000000000017e58 /data/app/~~B5NPaTc7PXdhO_HHNtWc-A==/org.myApp.android.app.smart_home_services-EQlfsO8_afHNavdhu9d-LA==/lib/arm64/libavutil.so (av_strstart+8)
2023-02-07 10:05:31.406 A/DEBUG: #01 pc 000000000021e9a4 /data/app/~~B5NPaTc7PXdhO_HHNtWc-A==/org.myApp.android.app.smart_home_services-EQlfsO8_afHNavdhu9d-LA==/lib/arm64/libavformat.so
2023-02-07 10:05:31.406 A/DEBUG: #02 pc 000000000013189c /data/app/~~B5NPaTc7PXdhO_HHNtWc-A==/org.myApp.android.app.smart_home_services-EQlfsO8_afHNavdhu9d-LA==/lib/arm64/libavformat.so (av_probe_input_format3+344)
2023-02-07 10:05:31.406 A/DEBUG: #03 pc 0000000000131a7c /data/app/~~B5NPaTc7PXdhO_HHNtWc-A==/org.myApp.android.app.smart_home_services-EQlfsO8_afHNavdhu9d-LA==/lib/arm64/libavformat.so (av_probe_input_format2+16)
2023-02-07 10:05:31.406 A/DEBUG: #04 pc 0000000000115670 /data/app/~~B5NPaTc7PXdhO_HHNtWc-A==/org.myApp.android.app.smart_home_services-EQlfsO8_afHNavdhu9d-LA==/lib/arm64/libavformat.so (avformat_open_input+412)
2023-02-07 10:05:31.406 A/DEBUG: #05 pc 000000000007a118 /data/app/~~B5NPaTc7PXdhO_HHNtWc-A==/org.myApp.android.app.smart_home_services-EQlfsO8_afHNavdhu9d-LA==/lib/arm64/libjniavformat.so (Java_org_bytedeco_ffmpeg_global_avformat_avformat_1open_1input__Lorg_bytedeco_ffmpeg_avformat_AVFormatContext_2Ljava_lang_String_2Lorg_bytedeco_ffmpeg_avformat_AVInputFormat_2Lorg_bytedeco_ffmpeg_avutil_AVDictionary_2+344)
2023-02-07 10:05:31.406 A/DEBUG: #06 pc 000000000021a354 /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+148) (BuildId: 130fdd18a91169da4ffb397268eb5c87)
2023-02-07 10:05:31.406 A/DEBUG: #07 pc 0000000000209398 /apex/com.android.art/lib64/libart.so (nterp_helper+152) (BuildId: 130fdd18a91169da4ffb397268eb5c87)
2023-02-07 10:05:31.406 A/DEBUG: #08 pc 00000000019be0bc /data/app/~~B5NPaTc7PXdhO_HHNtWc-A==/org.myApp.android.app.smart_home_services-EQlfsO8_afHNavdhu9d-LA==/oat/arm64/base.vdex (org.bytedeco.javacv.FFmpegFrameGrabber.startUnsafe+992)
2023-02-07 10:05:31.406 A/DEBUG: #09 pc 000000000020a254 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 130fdd18a91169da4ffb397268eb5c87)
2023-02-07 10:05:31.406 A/DEBUG: #10 pc 00000000019bdc92 /data/app/~~B5NPaTc7PXdhO_HHNtWc-A==/org.myApp.android.app.smart_home_services-EQlfsO8_afHNavdhu9d-LA==/oat/arm64/base.vdex (org.bytedeco.javacv.FFmpegFrameGrabber.start+6)
2023-02-07 10:05:31.406 A/DEBUG: #11 pc 000000000020a254 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 130fdd18a91169da4ffb397268eb5c87)
2023-02-07 10:05:31.406 A/DEBUG: #12 pc 00000000019bdc72 /data/app/~~B5NPaTc7PXdhO_HHNtWc-A==/org.myApp.android.app.smart_home_services-EQlfsO8_afHNavdhu9d-LA==/oat/arm64/base.vdex (org.bytedeco.javacv.FFmpegFrameGrabber.start+2)
2023-02-07 10:05:31.406 A/DEBUG: #13 pc 000000000020a254 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 130fdd18a91169da4ffb397268eb5c87)
2023-02-07 10:05:31.406 A/DEBUG: #14 pc 0000000000031072 /data/data/org.myApp.android.app.smart_home_services/code_cache/.overlay/base.apk/classes15.dex (org.myApp.android.app.smart_home.utils.SingleFrameGrabber.lambda$grabFromRtsp$0$org-myApp-android-app-smart_home-utils-SingleFrameGrabber+14)
2023-02-07 10:05:31.406 A/DEBUG: #15 pc 000000000020a254 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 130fdd18a91169da4ffb397268eb5c87)
2023-02-07 10:05:31.406 A/DEBUG: #16 pc 0000000000031008 /data/data/org.myApp.android.app.smart_home_services/code_cache/.overlay/base.apk/classes15.dex (org.myApp.android.app.smart_home.utils.SingleFrameGrabber$$ExternalSyntheticLambda0.run+8)
2023-02-07 10:05:31.406 A/DEBUG: #17 pc 000000000020b074 /apex/com.android.art/lib64/libart.so (nterp_helper+7540) (BuildId: 130fdd18a91169da4ffb397268eb5c87)
2023-02-07 10:05:31.406 A/DEBUG: #18 pc 000000000046730c /system/framework/framework.jar (android.os.Handler.handleCallback+4)
2023-02-07 10:05:31.406 A/DEBUG: #19 pc 0000000000209334 /apex/com.android.art/lib64/libart.so (nterp_helper+52) (BuildId: 130fdd18a91169da4ffb397268eb5c87)
2023-02-07 10:05:31.406 A/DEBUG: #20 pc 0000000000467160 /system/framework/framework.jar (android.os.Handler.dispatchMessage+8)
2023-02-07 10:05:31.406 A/DEBUG: #21 pc 000000000020a254 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 130fdd18a91169da4ffb397268eb5c87)
2023-02-07 10:05:31.406 A/DEBUG: #22 pc 0000000000488dec /system/framework/framework.jar (android.os.Looper.loopOnce+324)
2023-02-07 10:05:31.406 A/DEBUG: #23 pc 0000000000209334 /apex/com.android.art/lib64/libart.so (nterp_helper+52) (BuildId: 130fdd18a91169da4ffb397268eb5c87)
2023-02-07 10:05:31.406 A/DEBUG: #24 pc 00000000004893e2 /system/framework/framework.jar (android.os.Looper.loop+162)
2023-02-07 10:05:31.406 A/DEBUG: #25 pc 0000000000209334 /apex/com.android.art/lib64/libart.so (nterp_helper+52) (BuildId: 130fdd18a91169da4ffb397268eb5c87)
2023-02-07 10:05:31.406 A/DEBUG: #26 pc 00000000001b3164 /system/framework/framework.jar (android.app.ActivityThread.main+200)
2023-02-07 10:05:31.406 A/DEBUG: #27 pc 0000000000210c00 /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+576) (BuildId: 130fdd18a91169da4ffb397268eb5c87)
2023-02-07 10:05:31.406 A/DEBUG: #28 pc 000000000027adac /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+236) (BuildId: 130fdd18a91169da4ffb397268eb5c87)
2023-02-07 10:05:31.406 A/DEBUG: #29 pc 0000000000622e14 /apex/com.android.art/lib64/libart.so (_jobject* art::InvokeMethod<(art::PointerSize)8>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1396) (BuildId: 130fdd18a91169da4ffb397268eb5c87)
2023-02-07 10:05:31.406 A/DEBUG: #30 pc 00000000005a39f0 /apex/com.android.art/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+48) (BuildId: 130fdd18a91169da4ffb397268eb5c87)
2023-02-07 10:05:31.406 A/DEBUG: #31 pc 00000000000a2148 /system/framework/arm64/boot.oat (art_jni_trampoline+120) (BuildId: a57d01be497110707f03fe3098b9ebb98b01c0ee)
2023-02-07 10:05:31.406 A/DEBUG: #32 pc 000000000020a2b0 /apex/com.android.art/lib64/libart.so (nterp_helper+4016) (BuildId: 130fdd18a91169da4ffb397268eb5c87)
2023-02-07 10:05:31.406 A/DEBUG: #33 pc 00000000003e86aa /system/framework/framework.jar (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+22)
2023-02-07 10:05:31.406 A/DEBUG: #34 pc 0000000000806dcc /system/framework/arm64/boot-framework.oat (com.android.internal.os.ZygoteInit.main+3148) (BuildId: d70eb65828572281c15ff2c605eb35f7bd79524c)
2023-02-07 10:05:31.407 A/DEBUG: #35 pc 0000000000210c00 /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+576) (BuildId: 130fdd18a91169da4ffb397268eb5c87)
2023-02-07 10:05:31.407 A/DEBUG: #36 pc 000000000027adac /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+236) (BuildId: 130fdd18a91169da4ffb397268eb5c87)
2023-02-07 10:05:31.407 A/DEBUG: #37 pc 0000000000623640 /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, std::__va_list)+448) (BuildId: 130fdd18a91169da4ffb397268eb5c87)
2023-02-07 10:05:31.407 A/DEBUG: #38 pc 0000000000623bdc /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+92) (BuildId: 130fdd18a91169da4ffb397268eb5c87)
2023-02-07 10:05:31.407 A/DEBUG: #39 pc 000000000050b554 /apex/com.android.art/lib64/libart.so (art::JNI<true>::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+644) (BuildId: 130fdd18a91169da4ffb397268eb5c87)
2023-02-07 10:05:31.407 A/DEBUG: #40 pc 00000000000bccd8 /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+120) (BuildId: 3b82f88da832d1ed136476339c04755d)
2023-02-07 10:05:31.407 A/DEBUG: #41 pc 00000000000c8c08 /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+856) (BuildId: 3b82f88da832d1ed136476339c04755d)
2023-02-07 10:05:31.407 A/DEBUG: #42 pc 0000000000002560 /system/bin/app_process64 (main+1280) (BuildId: d73f2fec3cc1b304c3da2dc971816ba5)
2023-02-07 10:05:31.407 A/DEBUG: #43 pc 000000000004b590 /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+96) (BuildId: dda6667e09f4c64aae339908c2c24a5f)
Please make sure that FFmpegLogCallback.set()
has been called.
It looks like it's crashing on a null string in avformat_open_input():
2023-02-07 10:05:31.406 A/DEBUG: #00 pc 0000000000017e58 /data/app/~~B5NPaTc7PXdhO_HHNtWc-A==/org.myApp.android.app.smart_home_services-EQlfsO8_afHNavdhu9d-LA==/lib/arm64/libavutil.so (av_strstart+8)
2023-02-07 10:05:31.406 A/DEBUG: #01 pc 000000000021e9a4 /data/app/~~B5NPaTc7PXdhO_HHNtWc-A==/org.myApp.android.app.smart_home_services-EQlfsO8_afHNavdhu9d-LA==/lib/arm64/libavformat.so
2023-02-07 10:05:31.406 A/DEBUG: #02 pc 000000000013189c /data/app/~~B5NPaTc7PXdhO_HHNtWc-A==/org.myApp.android.app.smart_home_services-EQlfsO8_afHNavdhu9d-LA==/lib/arm64/libavformat.so (av_probe_input_format3+344)
2023-02-07 10:05:31.406 A/DEBUG: #03 pc 0000000000131a7c /data/app/~~B5NPaTc7PXdhO_HHNtWc-A==/org.myApp.android.app.smart_home_services-EQlfsO8_afHNavdhu9d-LA==/lib/arm64/libavformat.so (av_probe_input_format2+16)
2023-02-07 10:05:31.406 A/DEBUG: #04 pc 0000000000115670 /data/app/~~B5NPaTc7PXdhO_HHNtWc-A==/org.myApp.android.app.smart_home_services-EQlfsO8_afHNavdhu9d-LA==/lib/arm64/libavformat.so (avformat_open_input+412)
That probably means you're passing a null string to FFmpegFrameGrabber...
build.gradle (:app) implementation group: 'org.bytedeco', name: 'javacv', version: '1.5.8' javacpp group: 'org.bytedeco', name: 'openblas-platform', version: '0.3.21-1.5.8' javacpp group: 'org.bytedeco', name: 'opencv-platform', version: '4.6.0-1.5.8' javacpp group: 'org.bytedeco', name: 'ffmpeg-platform', version: '5.1.2-1.5.8'
I have no idea. why this is crushing :(