Android Question for Christmas, I've got an ANR ....

aeropic

Active Member
Licensed User
Hi All,

First of all, merry Christmas to B4A community.
On my side, Santa Clauss brought me an ANR on my application ;)

As I did not know what this meant, I've seen on google it is an application not responding... Now the question is: how can I debbug this ?

Here is the log found on Play store.
Am I right to understand the problem occured while trying to use AutoFocus on CameraEx class ?

Cheers
Alain


----- pid 3766 at 2013-12-22 10:23:28 -----
Cmd line: com.aeropic.CameraUnlockFree

DALVIK THREADS:
(mutexes: tll=0 tsl=0 tscl=0 ghl=0 hwl=0 hwll=0)
"main" prio=5 tid=1 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x40025308 self=0xd168
| sysTid=3766 nice=0 sched=0/0 cgrp=default handle=-1344994080
| schedstat=( 3660205588 7773902407 14086 )
at android.hardware.Camera.native_autoFocus(Native Method)
at android.hardware.Camera.autoFocus(Camera.java:837)
at anywheresoftware.b4a.objects.CameraW.AutoFocus(CameraW.java:191)
at com.aeropic.CameraUnlockFree.cameraexclass._vvvv5(cameraexclass.java:224)
at com.aeropic.CameraUnlockFree.a01._btnfocus_click(a01.java:509)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:538)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:170)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:158)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:154)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:64)
at android.view.View.performClick(View.java:2535)
at android.view.View$PerformClick.run(View.java:9129)
at android.os.Handler.handleCallback(Handler.java:618)
at android.os.Handler.dispatchMessage(Handler.java:123)
at android.os.Looper.loop(SourceFile:351)
at android.app.ActivityThread.main(ActivityThread.java:3822)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:538)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:969)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:727)
at dalvik.system.NativeStart.main(Native Method)

"android.hardware.SensorManager$SensorThread" prio=5 tid=10 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x405249d8 self=0x22f468
| sysTid=3990 nice=-8 sched=0/0 cgrp=default handle=2453144
| schedstat=( 1458770 2285308 19 )
at android.hardware.SensorManager.sensors_data_poll(Native Method)
at android.hardware.SensorManager$SensorThread$SensorThreadRunnable.run(SensorManager.java:477)
at java.lang.Thread.run(Thread.java:1050)

.....
 

Attachments

  • ANR.txt
    50.3 KB · Views: 93

aeropic

Active Member
Licensed User
HI Erel,

Not sure... I've used the cameraEX code:
B4X:
'Calls AutoFocus and then takes the picture if focus was successfull.
Public Sub FocusAndTakePicture
    cam.AutoFocus
End Sub

Private Sub Camera_FocusDone (Success As Boolean)
a01.PictureProgress = False
    If Success Then
        TakePicture
    Else
        Log("AutoFocus error.")
        'ToastMessageShow("unable to focus...", False)
        TakePicture
    End If
   
End Sub

Is it enough ?
 
Upvote 0
Top