Skip to main content
 首页 » 编程设计

Android 应用程序崩溃并显示 QMI_LOC_EVENT_POSITION_REPORT_IND_V02

2024年07月26日12youxin

我正在运行 Android 4.4.2 的 LG G Pad 8.3 上的应用程序。该应用程序使用 OpenCV 处理视频输入,还使用 ​​GPS 信息。启动后 20-30 秒,应用程序崩溃且没有任何消息。调试输出粘贴在下面。似乎这一行: E/LocSvc_ApiV02(865):I/<---无效globalEventCb(locClientHandleType,uint32_t,locClientEventIndUnionType,void *)第81行QMI_LOC_EVENT_POSITION_REPORT_IND_V02 是最重要的,紧接着是“位置监听器死亡”。我无法找到有关这些的足够信息。 另外有趣的是,在我的三星 Galaxy S3 mini(Android 4.2.2)上,相同的应用程序运行没有任何问题。

E/mm-camera-intf(  347): VIDEO_DENOISER_PROCESSING  = 6439.000000us 1920x1080 
E/QCameraHWI_Preview(  347): Qandroid::status_t android::QCameraStream_preview::processPreviewFrameWithDisplay(mm_camera_super_buf_t*): PCB callback enabled 
E/QCameraHWI_Preview(  347):  void android::QCameraStream_preview::resizePreviewFrame(camera_memory_t*) : E   
D/QCameraHWI_Preview(  347):  void android::QCameraStream_preview::resizePreviewFrame(camera_memory_t*) : X   
D/CameraClient(  347): dataCallback(16) 
D/CameraClient(  347): frame is copied 
D/CameraClient(  347): copyFrameAndPostCopiedFrame 
D/CameraClient(  347): setPreviewCallbackFlag(0) (pid 28124) 
E/QualcommCamera(  347): Qvoid android::disable_msg_type(camera_device*, int32_t): E 
I/QCameraHWI(  347): disableMsgType: E 
I/QCameraHWI(  347): disableMsgType: X, msgType =0x10, mMsgEnabled=0xc0d 
D/JavaCameraView(28124): Preview Frame received. Frame size: 3110400 
D/CameraClient(  347): setPreviewCallbackFlag(5) (pid 28124) 
I/QCameraHWI(  347): enableMsgType: E, msgType =0x10 
I/QCameraHWI(  347): enableMsgType: X, msgType =0x10, mMsgEnabled=0xc1d 
E/mm-camera-intf(  347): VIDEO_DENOISER_PROCESSING  = 10711.000000us 1920x1080 
E/QCameraHWI_Preview(  347): Qandroid::status_t android::QCameraStream_preview::processPreviewFrameWithDisplay(mm_camera_super_buf_t*): PCB callback enabled 
E/QCameraHWI_Preview(  347):  void android::QCameraStream_preview::resizePreviewFrame(camera_memory_t*) : E   
D/QCameraHWI_Preview(  347):  void android::QCameraStream_preview::resizePreviewFrame(camera_memory_t*) : X   
D/CameraClient(  347): dataCallback(16) 
D/CameraClient(  347): frame is copied 
D/CameraClient(  347): copyFrameAndPostCopiedFrame 
D/CameraClient(  347): setPreviewCallbackFlag(0) (pid 28124) 
E/QualcommCamera(  347): Qvoid android::disable_msg_type(camera_device*, int32_t): E 
I/QCameraHWI(  347): disableMsgType: E 
I/QCameraHWI(  347): disableMsgType: X, msgType =0x10, mMsgEnabled=0xc0d 
D/JavaCameraView(28124): Preview Frame received. Frame size: 3110400 
D/CameraClient(  347): setPreviewCallbackFlag(5) (pid 28124) 
I/QCameraHWI(  347): enableMsgType: E, msgType =0x10 
I/QCameraHWI(  347): enableMsgType: X, msgType =0x10, mMsgEnabled=0xc1d 
E/mm-camera-intf(  347): VIDEO_DENOISER_PROCESSING  = 8362.000000us 1920x1080 
E/QCameraHWI_Preview(  347): Qandroid::status_t android::QCameraStream_preview::processPreviewFrameWithDisplay(mm_camera_super_buf_t*): PCB callback enabled 
E/QCameraHWI_Preview(  347):  void android::QCameraStream_preview::resizePreviewFrame(camera_memory_t*) : E   
D/QCameraHWI_Preview(  347):  void android::QCameraStream_preview::resizePreviewFrame(camera_memory_t*) : X   
D/CameraClient(  347): dataCallback(16) 
D/CameraClient(  347): frame is copied 
D/CameraClient(  347): copyFrameAndPostCopiedFrame 
D/CameraClient(  347): setPreviewCallbackFlag(0) (pid 28124) 
E/QualcommCamera(  347): Qvoid android::disable_msg_type(camera_device*, int32_t): E 
I/QCameraHWI(  347): disableMsgType: E 
I/QCameraHWI(  347): disableMsgType: X, msgType =0x10, mMsgEnabled=0xc0d 
D/JavaCameraView(28124): Preview Frame received. Frame size: 3110400 
D/CameraClient(  347): setPreviewCallbackFlag(5) (pid 28124) 
I/QCameraHWI(  347): enableMsgType: E, msgType =0x10 
I/QCameraHWI(  347): enableMsgType: X, msgType =0x10, mMsgEnabled=0xc1d 
E/mm-camera-intf(  347): VIDEO_DENOISER_PROCESSING  = 7751.000000us 1920x1080 
E/QCameraHWI_Preview(  347): Qandroid::status_t android::QCameraStream_preview::processPreviewFrameWithDisplay(mm_camera_super_buf_t*): PCB callback enabled 
E/QCameraHWI_Preview(  347):  void android::QCameraStream_preview::resizePreviewFrame(camera_memory_t*) : E   
D/QCameraHWI_Preview(  347):  void android::QCameraStream_preview::resizePreviewFrame(camera_memory_t*) : X   
D/CameraClient(  347): dataCallback(16) 
D/CameraClient(  347): frame is copied 
D/CameraClient(  347): copyFrameAndPostCopiedFrame 
E/LocSvc_ApiV02(  865): I/<--- void globalEventCb(locClientHandleType, uint32_t, locClientEventIndUnionType, void*) line 81 QMI_LOC_EVENT_POSITION_REPORT_IND_V02 
E/mm-camera(  379): afd_algo_run: AFD success, std_width -1, flicker_freq 60 
I/Vold    (  336): [LGE][VOLD][NetlinkHandler.cpp][onEvent()] subsys:cpu, action:0 
I/Vold    (  336): [LGE][VOLD][NetlinkHandler.cpp][onEvent()] subsys:cpu, action:0 
D/LocationManagerService(  865): Location listener died 
I/LocationManagerService(  865): remove 42e000a8 
I/ActivityManager(  865): Process com.example.opencvhello (pid 28124) has died. 
I/WindowState(  865): WIN DEATH: Window{42acb930 u0 com.example.opencvhello/com.example.opencvhello.MainActivity} 
W/ActivityManager(  865): Force removing ActivityRecord{42b66ae0 u0 com.example.opencvhello/.MainActivity t56}: app died, no saved state 
W/CameraService(  347): Disconnecting camera client 0xb8d926a0 since the binder for it died (this pid 347) 
D/CameraClient(  347): disconnect E (pid 347) 
D/CameraClient(  347): hardware teardown 
E/QualcommCamera(  347): Qvoid android::disable_msg_type(camera_device*, int32_t): E 
I/QCameraHWI(  347): disableMsgType: E 
I/QCameraHWI(  347): disableMsgType: X, msgType =0xffff, mMsgEnabled=0x0 
E/QualcommCamera(  347): Qvoid android::stop_preview(camera_device*): E 
I/QCameraHWI(  347): void android::QCameraHardwareInterface::stopPreview(): stopPreview: E 

请您参考如下方法:

已回答here ,尝试在 onCameraFrame() 中手动调用垃圾收集器,如下所示:

System.gc(); 

这解决了我的问题,应用程序在一分钟左右后关闭,没有任何错误。