Camera App freezing

padvou

Active Member
Licensed User
Longtime User
Camera app is freezing.
The error in the logs is the same as described here
Log is also attached.
 

Attachments

  • log.zip
    3.5 KB · Views: 116

padvou

Active Member
Licensed User
Longtime User
Yes, it's a similar project which I could post here.
The device is an 8" tablet.
The freezing occurs either after taking the 1st picture, the 2nd or whenever. I haven't managed to take more than three pictures.
 
Upvote 0

padvou

Active Member
Licensed User
Longtime User
dear Erel, it freezes also.
however the built-in camera app don't freeze..
did you figure out anything from the link and the log?
 
Upvote 0

padvou

Active Member
Licensed User
Longtime User
It'a "Made in PRC" tablet.
How do i disable this?


B4X:
Log(camEx.GetSupportedFocusModes)
give me this:
B4X:
(ArrayList) [fixed]
I added this code:
B4X:
Sub Camera1_Ready (Success As Boolean)
   If Success Then
      camEx.SetJpegQuality(90)
      camEx.SetFocusMode("fixed")
      camEx.CommitParameters
      camEx.StartPreview
      Log(camEx.GetPreviewSize)
   Else
      ToastMessageShow("Cannot open camera.", True)
   End If
End Sub
but still freezing...
And camera is unusable until i reboot.. which poses another question: How could I somehow "restart something" so that I don't restart the whole device?
 
Last edited:
Upvote 0

padvou

Active Member
Licensed User
Longtime User
This is the error:
B4X:
E/V4LCameraAdapter(2321): hardware/amlogic/camera/V4LCameraAdapter/V4LCameraAdapter.cpp:834 GetFrame - GetFrame: No buff for Dequeue

E/V4LCameraAdapter(2321): hardware/amlogic/camera/V4LCameraAdapter/V4LCameraAdapter.cpp:993 previewThread - Preview thread get frame fail, need sleep:33333

this is the solution ( the callback must be removed):
B4X:
camera.setPreviewCallback(new PreviewCallback() {
      public void onPreviewFrame(byte[] data, Camera arg1) {
    //invalidate surfaceview
}
 });
(article from Stackoverflow, but I don't know how to implement it..)
 
Upvote 0

padvou

Active Member
Licensed User
Longtime User
I tried as you suggested.
Seems to have good results.
I attach the zipped project, if you 'd like to take a look.
 

Attachments

  • _CameraTest.zip
    14.3 KB · Views: 168
Upvote 0
Top