You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2018/08/15 11:28:56 UTC

[GitHub] gustavosobral opened a new issue #96: Camera app crashing

gustavosobral opened a new issue #96: Camera app crashing
URL: https://github.com/apache/cordova-plugin-media-capture/issues/96
 
 
   Hi,
   
   I'm using the plugin version 3.0.2 with a Samsung Galaxy S7 and Android 8.0.0.
   
   Sometimes when I'm using the `capture.captureImage` function with the `limit` of 9, the camera app crashes after a couple of photos taken with the same capture operation. I noticed that if I reduce the `limit` option to 1, the camera app doesn't crash anymore.
   
   I've gathered a couple of exceptions and interesting logs that showed up on Logcat during this crashes. Those are:
   
   ```
   08-15 11:19:17.528 28237 28237 E AndroidRuntime: FATAL EXCEPTION: main
   08-15 11:19:17.528 28237 28237 E AndroidRuntime: Process: com.sec.android.app.camera, PID: 28237
   08-15 11:19:17.528 28237 28237 E AndroidRuntime: java.lang.RuntimeException: Error receiving broadcast Intent { act=android.intent.action.BATTERY_CHANGED flg=0x60000010 (has extras) } in com.sec.android.app.camera.provider.CameraTemperatureManager$1@cdd2e9f
   08-15 11:19:17.528 28237 28237 E AndroidRuntime: 	at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$-android_app_LoadedApk$ReceiverDispatcher$Args_52226(LoadedApk.java:1329)
   08-15 11:19:17.528 28237 28237 E AndroidRuntime: 	at android.app.-$Lambda$FilBqgnXJrN9Mgyks1XHeAxzSTk.$m$0(Unknown Source:4)
   08-15 11:19:17.528 28237 28237 E AndroidRuntime: 	at android.app.-$Lambda$FilBqgnXJrN9Mgyks1XHeAxzSTk.run(Unknown Source:0)
   08-15 11:19:17.528 28237 28237 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:789)
   08-15 11:19:17.528 28237 28237 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:98)
   08-15 11:19:17.528 28237 28237 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:164)
   08-15 11:19:17.528 28237 28237 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6944)
   08-15 11:19:17.528 28237 28237 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
   08-15 11:19:17.528 28237 28237 E AndroidRuntime: 	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
   08-15 11:19:17.528 28237 28237 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
   08-15 11:19:17.528 28237 28237 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'boolean com.sec.android.app.camera.interfaces.CameraContext.isDestroying()' on a null object reference
   08-15 11:19:17.528 28237 28237 E AndroidRuntime: 	at com.sec.android.app.camera.provider.CameraTemperatureManager$1.onReceive(CameraTemperatureManager.java:76)
   08-15 11:19:17.528 28237 28237 E AndroidRuntime: 	at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$-android_app_LoadedApk$ReceiverDispatcher$Args_52226(LoadedApk.java:1319)
   08-15 11:19:17.528 28237 28237 E AndroidRuntime: 	... 9 more
   ```
   
   ```
   08-15 11:59:52.650 27329 30945 E ImageFeatures: [#CMH#] applyJustShotFlag : java.io.FileNotFoundException: /storage/emulated/0/Pictures/1534327192619.jpg (No such file or directory) (/storage/emulated/0/Pictures/1534327192619.jpg (No such file or directory))
   08-15 11:59:52.650 27329 30945 E ImageFeatures: 	at java.io.FileInputStream.open0 (FileInputStream.java:-2)
   08-15 11:59:52.650 27329 30945 E ImageFeatures: 	at java.io.FileInputStream.open (FileInputStream.java:200)
   08-15 11:59:52.650 27329 30945 E ImageFeatures: 	at java.io.FileInputStream.<init> (FileInputStream.java:150)
   08-15 11:59:52.650 27329 30945 E ImageFeatures: 	at java.io.FileInputStream.<init> (FileInputStream.java:103)
   08-15 11:59:52.650 27329 30945 E ImageFeatures: 	at android.media.ExifInterface.<init> (ExifInterface.java:1329)
   08-15 11:59:52.650 27329 30945 E ImageFeatures: 	at com.samsung.cmh.features.ImageFeatures.isJustShot (ImageFeatures.java:54)
   08-15 11:59:52.650 27329 30945 E ImageFeatures: 	at com.samsung.cmh.core.Controller.processInsertAction (Controller.java:2544)
   08-15 11:59:52.650 27329 30945 E ImageFeatures: 	at com.samsung.cmh.core.Controller.execute (Controller.java:991)
   08-15 11:59:52.650 27329 30945 E ImageFeatures: 	at com.samsung.cmh.service.CMHService.onHandleIntent (CMHService.java:100)
   08-15 11:59:52.650 27329 30945 E ImageFeatures: 	at android.app.IntentService$ServiceHandler.handleMessage (IntentService.java:68)
   08-15 11:59:52.650 27329 30945 E ImageFeatures: 	at android.os.Handler.dispatchMessage (Handler.java:105)
   08-15 11:59:52.650 27329 30945 E ImageFeatures: 	at android.os.Looper.loop (Looper.java:164)
   08-15 11:59:52.650 27329 30945 E ImageFeatures: 	at android.os.HandlerThread.run (HandlerThread.java:65)
   08-15 11:59:52.650 27329 30945 E ImageFeatures:  
   ```
   
   ```
   08-15 11:56:26.329  3292 28336 E ExynosCameraMemoryAllocator: @@@@ERR(alloc):*bufHandle == NULL failed
   08-15 11:56:26.329  3292 28336 E ExynosCameraMemoryAllocator: ERR(dequeueBuffer):alloc failed
   08-15 11:56:26.329  3292 28336 E ExynosCameraBufferManager: [CAM_ID(0)][PREVIEW_BUF]-ERR(m_bufferCollectorThreadFunc[2641]):dequeueBuffer failed, dequeue(6), collected(4)
   08-15 11:56:26.329  3191  3215 E BufferQueueProducer: [SurfaceView - com.sec.android.app.camera/com.sec.android.app.camera.Camera@4c2063b@0#0] dequeueBuffer: BufferQueue has been abandoned
   08-15 11:56:26.329  3292 28336 E ExynosCameraMemoryAllocator: ERR(alloc):dequeue_buffer failed
   08-15 11:56:26.329  3191  3215 E BufferQueueProducer: [SurfaceView - com.sec.android.app.camera/com.sec.android.app.camera.Camera@4c2063b@0#0] dequeueBuffer: BufferQueue has been abandoned
   08-15 11:56:26.329  3292 28336 E ExynosCameraMemoryAllocator: ERR(alloc):dequeue_buffer failed
   08-15 11:56:26.329  3191  3215 E BufferQueueProducer: [SurfaceView - com.sec.android.app.camera/com.sec.android.app.camera.Camera@4c2063b@0#0] dequeueBuffer: BufferQueue has been abandoned
   08-15 11:56:26.330  3292 28336 E ExynosCameraMemoryAllocator: ERR(alloc):dequeue_buffer failed
   08-15 11:56:26.330  3191  3215 E BufferQueueProducer: [SurfaceView - com.sec.android.app.camera/com.sec.android.app.camera.Camera@4c2063b@0#0] dequeueBuffer: BufferQueue has been abandoned
   08-15 11:56:26.330  3292 28336 E ExynosCameraMemoryAllocator: ERR(alloc):dequeue_buffer failed
   08-15 11:56:26.330  3191  3215 E BufferQueueProducer: [SurfaceView - com.sec.android.app.camera/com.sec.android.app.camera.Camera@4c2063b@0#0] dequeueBuffer: BufferQueue has been abandoned
   08-15 11:56:26.330  3292 28336 E ExynosCameraMemoryAllocator: ERR(alloc):dequeue_buffer failed
   ```
   
   The same app with the capture limit set to 9 doesn't crash in a Samsung Galaxy J5 with Android 7.0.
   My `cordova-plugin-file`, which is a dependency of this plugin, is at version `6.0.1`.
   
   I have this permissions requested in my app: `cordova.plugins.permissions.ACCESS_FINE_LOCATION, cordova.plugins.permissions.CAMERA, cordova.plugins.permissions.READ_EXTERNAL_STORAGE, cordova.plugins.permissions.WRITE_EXTERNAL_STORAGE`.
   
   Any ideas here? I'm missing something?
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org