Android Question Problem Running B4A and Installing App in Debug Mode through USB

walterf25

Expert
Licensed User
Longtime User
Hi everyone, I am facing a very weird issue, everything had been working as expected until a few days ago, I have not made any changes to the USB Driver or anything else for that matter.

The problem is that I am trying to finish an app, but I can not install the app in debug mode, If I install the app in release Mode then everything seems to work, but I need to do it in debug mode as there's some things I need to add/change.

The error I am seeing is the following:
java.net.SocketTimeoutException: Poll timed out
at libcore.io.IoBridge.poll(IoBridge.java:869)
at java.net.PlainSocketImpl.socketAccept(PlainSocketImpl.java:196)
at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:451)
at java.net.ServerSocket.implAccept(ServerSocket.java:547)
at java.net.ServerSocket.accept(ServerSocket.java:515)
at anywheresoftware.b4a.shell.ShellConnector.connect(ShellConnector.java:153)
at anywheresoftware.b4a.shell.ShellConnector.run(ShellConnector.java:119)
at java.lang.Thread.run(Thread.java:920)
Shutting down VM
FATAL EXCEPTION: main
Process: ergonimics.strom, PID: 19835
java.lang.RuntimeException: Unable to create service ergonimics.strom.starter: java.lang.RuntimeException: java.lang.NullPointerException: Attempt to invoke virtual method 'void java.io_OutputStream.write(byte[])' on a null object reference
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4953)
at android.app.ActivityThread.access$1900(ActivityThread.java:310)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2300)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8663)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
Caused by: java.lang.RuntimeException: java.lang.NullPointerException: Attempt to invoke virtual method 'void java.io_OutputStream.write(byte[])' on a null object reference
at anywheresoftware.b4a.shell.Shell.virtualAssets(Shell.java:164)
at anywheresoftware.b4a.shell.Shell.start(Shell.java:102)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:105)
at ergonimics.strom.starter.onCreate(starter.java:34)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4940)
... 9 more
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void java.io_OutputStream.write(byte[])' on a null object reference
at anywheresoftware.b4a.shell.ShellConnector.sendControlMessage(ShellConnector.java:61)
at anywheresoftware.b4a.shell.Shell.virtualAssets(Shell.java:124)
... 13 more
I also tried using the Legacy Debugger and it also works fine when I enable that, Also my computer seems to take up a lot of the cpu usage when compiling the app, maybe this is a separate issue.

Has anyone had this issue where you are not able to install the app in debug mode?

Does anyone have any ideas?

Walter
 

walterf25

Expert
Licensed User
Longtime User
1. Have you tried to restart the PC?
2. Does it happen if you start a new app and run it?
Hi Erel, Yes I have tried restarting the PC, and it works right after I restart the PC, but if I unplug the USB cable from the phone, and then plug it back it then it stops working, meaning I start seeing the issue describe on my post above. It also happens with any Project I try to install, I have tested with several and I see the same issue.

I don't recall ever having this issue before.

Another thing I noticed is that my PC's fan starts spinning really fast as soon as I plug my USB cable and I hit Connect in the IDE, also when the app is compiling, seems like the for some reason B4A is taking up a lot of cpu resources.

Thanks,
Walter
 
Upvote 0

walterf25

Expert
Licensed User
Longtime User
I seem to have the problem, not sure why this is happening but I looked at the Task Manager and I see the OpenJDK Platform Binary the cause of the issue I am seeing, as you can see in the image below, that process is taking around 16 to 18 percent of the CPU usage, when I right click on it and End Task, then I am able to compile and run the app just fine. Not sure why this is happening but at least I can now move on with my app development in debug mode.
 

Attachments

  • Capture.JPG
    Capture.JPG
    29.4 KB · Views: 56
Upvote 0
Top