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

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
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
It'a "Made in PRC" tablet.
How do i disable this?


Code:
Log(camEx.GetSupportedFocusModes)
give me this:
Code:
(ArrayList) [fixed]
I added this code:
Code:
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
This is the error:
Code:
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):
Code:
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
I tried as you suggested.
Seems to have good results.
I attach the zipped project, if you 'd like to take a look.
 

Attachments

Upvote 0
Back
Top