breakpoints crash ICS

RichyK68

Active Member
Licensed User
Longtime User
Hi, I'm having heaps of problems debugging an app in Basic4Android running under ICS. All I have to do to reproduce the problem is set up a dummy Up event handler for a button called button1.

Sub button1_Up

dim x as string

x="dummy"

End Sub

Running this without a breakpoint, the interface continues running after clicking the button. If I put a breakpoint within the button1_Up procedure, the debugger stops at that point when the button is pressed, but when F5 is pressed to resume, the application never recovers and after about twenty seconds the message "Unfortunately, xxx has stopped."

Has anybody else experienced this? I am using B4A v1.9

Richy
 

agraham

Expert
Licensed User
Longtime User
Yes, it happens reliably repeatedly for me on ICS 4.0.4 on my Xoom. Look at the unfiltered logs, its the same problem as http://www.b4x.com/forum/basic4android-updates-questions/16584-can-some-one-help-me-error-code.html and probably has the same cause as DoEvents and the debugger wait both pump the message queue. I have already mentioned to Erel that it looks like he is recycling an in use message in his message pump - maybe that's the cause.
GC_CONCURRENT freed 431K, 11% free 7379K/8199K, paused 5ms+3ms
[1] 5.onFinished: Installation state replication succeeded.
Shutting down VM
threadid=1: thread exiting with uncaught exception (group=0x40a441f8)
java.lang.RuntimeException: MotionEvent { action=ACTION_UP, id[0]=0, x[0]=227.5, y[0]=301.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=66149495, downTime=66148683, deviceId=2, source=0x1002 } recycled twice!
at android.view.MotionEvent.recycle(MotionEvent.java:1659)
at android.view.ViewRootImpl.finishMotionEvent(ViewRootImpl.java:2904)
at android.view.ViewRootImpl.deliverPointerEvent(ViewRootImpl.java:2895)
at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2466)
at android.view.ViewRootImpl.processInputEvents(ViewRootImpl.java:845)
at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2475)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4424)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
EDIT :- although for me the problem occurs the instant I press F5, there is no 20 second delay.
 
Last edited:
Upvote 0

Woinowski

Active Member
Licensed User
Longtime User
Upvote 0

RichyK68

Active Member
Licensed User
Longtime User
I got it around it

It was easy enough and the solution worked for me, the problem doesn't happen if your code responds to the Click event instead of the Up event.
 
Upvote 0

wl

Well-Known Member
Licensed User
Longtime User
I'm at version 2.0.2 and I'm experiencing the same kind of problems while debugging on ICS.

Wim
 
Upvote 0

wl

Well-Known Member
Licensed User
Longtime User
Found it.

It was caused by a java stack overflow. Not sure exactly where it did come from, but modified the code. Nor, why I did not encounter the stackoverflow when not debugging.

It was not related to ICS.
 
Upvote 0
Top