Bug? Not stopping at breakpoint in debug mode

Tim Chapman

Active Member
Licensed User
Longtime User
Breakpoints have worked on my project in the past, but are not now. My project is large and requires external files in File.DirRootExternal. I would be happy to use teamviewer to help troubleshoot this.
 

Tim Chapman

Active Member
Licensed User
Longtime User
It does not break on breakpoint in Activity_Create of the main activity.

Latest unfiltered logs are here:

After accept
java.net.SocketTimeoutException
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:99)
at java.net.ServerSocket.implAccept(ServerSocket.java:217)
at java.net.ServerSocket.accept(ServerSocket.java:141)
at anywheresoftware.b4a.debug.DebugConnector.mainLoop(DebugConnector.java:122)
at anywheresoftware.b4a.debug.DebugConnector.run(DebugConnector.java:73)
at java.lang.Thread.run(Thread.java:818)
Caused by: android.system.ErrnoException: accept failed: EAGAIN (Try again)
at libcore.io.Posix.accept(Native Method)
at libcore.io.BlockGuardOs.accept(BlockGuardOs.java:63)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:89)
... 5 more
ClassLoader referenced unknown path: /data/app/com.tecrov.dnd-1/lib/arm
Starting remote logger. Port: 49205
After accept
** Activity (main) Create, isFirst = true **
false false
false true
~w:1004,main,263
ignoring event: tabhost1_tabchanged
ignoring event: tabhost1_tabchanged
** Activity (main) Resume **
-1 received
writer error
java.lang.InterruptedException
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:1988)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2022)
at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:357)
at anywheresoftware.b4a.remotelogger.Connector$Writer.run(Connector.java:160)
at java.lang.Thread.run(Thread.java:818)
Starting remote logger. Port: 49205
-1 received
** Activity (main) Pause, UserClosed = false **
After accept
ClassLoader referenced unknown path: /data/app/com.tecrov.dnd-2/lib/arm
Starting remote logger. Port: 49205
After accept
** Activity (main) Create, isFirst = true **
false false
false true
~w:1004,main,263
ignoring event: tabhost1_tabchanged
ignoring event: tabhost1_tabchanged
** Activity (main) Resume **
 

Tim Chapman

Active Member
Licensed User
Longtime User
I unchecked use legacy debugger. Still no break for breakpoint in Activity_Create.
Lastest unfiltered log:

at anywheresoftware.b4a.remotelogger.Connector$Writer.run(Connector.java:160)
at java.lang.Thread.run(Thread.java:818)
Starting remote logger. Port: 49205
-1 received
** Activity (main) Pause, UserClosed = false **
After accept
ClassLoader referenced unknown path: /data/app/com.tecrov.dnd-2/lib/arm
Starting remote logger. Port: 49205
After accept
** Activity (main) Create, isFirst = true **
false false
false true
~w:1004,main,263
ignoring event: tabhost1_tabchanged
ignoring event: tabhost1_tabchanged
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
-1 received
Log reader error: java.io.IOException: read failed: EBADF (Bad file descriptor)
writer error
java.net.SocketException: sendto failed: EBADF (Bad file descriptor)
at libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:542)
at libcore.io.IoBridge.sendto(IoBridge.java:511)
at java.net.PlainSocketImpl.write(PlainSocketImpl.java:500)
at java.net.PlainSocketImpl.-wrap1(PlainSocketImpl.java)
at java.net.PlainSocketImpl$PlainSocketOutputStream.write(PlainSocketImpl.java:266)
at java.io_OutputStream.write(OutputStream.java:82)
at anywheresoftware.b4a.remotelogger.Connector$Writer.run(Connector.java:161)
at java.lang.Thread.run(Thread.java:818)
Caused by: android.system.ErrnoException: sendto failed: EBADF (Bad file descriptor)
at libcore.io.Posix.sendtoBytes(Native Method)
at libcore.io.Posix.sendto(Posix.java:211)
at libcore.io.BlockGuardOs.sendto(BlockGuardOs.java:278)
at libcore.io.IoBridge.sendto(IoBridge.java:509)
... 6 more
System.exit called, status: 0
VM exiting with result code 0, cleanup skipped.
ClassLoader referenced unknown path: /data/app/com.tecrov.dnd-1/lib/arm
Starting remote logger. Port: 49205
After accept
** Activity (main) Create, isFirst = true **
ignoring event: tabhost1_tabchanged
ignoring event: tabhost1_tabchanged
Skipped 42 frames! The application may be doing too much work on its main thread.
** Activity (main) Resume **
 

Tim Chapman

Active Member
Licensed User
Longtime User
I have tried it on the latest Nexus 7 2013 32gb device and my galaxy note s3 phone. Both skip the breakpoint.
 

Tim Chapman

Active Member
Licensed User
Longtime User
Now also, when there is an error in my code, the app crashes instead of showing the error location with the yellow line in the code. So, I switched to the legacy debugger. With that, the yellow line appears in the code when there is an error and I can hover over variables to see their values. It still skips the breakpoint when using either debugger.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
the app crashes instead of showing the error location with the yellow line in the code
This is the expected behavior. It should crash and show the error message in the logs.

If you like you can send me the project. As it doesn't stop on the first line, there is no need to send any other file.
 

Tim Chapman

Active Member
Licensed User
Longtime User
I tried the DialogsDemo in non-legacy mode. It stopped at a breakpoint in Activity_Create with no problem.
 

Tim Chapman

Active Member
Licensed User
Longtime User
I just tried a breakpoint in legacy debug mode on my project and it worked. I found that I have to have the breakpoint on a line of code. It can't be between lines of code. Did not know that. Might have done this wrong before.
I also just tried the same breakpoint using non-legacy debug mode. Worked properly and gave me the yellow line and variables to hover over. Sorry if I caused a problem here. I might have had a breakpoint on a blank line between code before. I don't remember.
 

Rusty

Well-Known Member
Licensed User
Longtime User
Erel,
this looks like the same problem I've been dealing with for over a year.
I can not compile with breakpoints set...
Regards,
Rusty
 
Top