Android Question Debugger no longer connects after update to V12

VTSinLincoln

Member
Licensed User
Longtime User
I've updated from B4A V11.5 to V12. Even after a total uninstall/reinstall, I have an issue where the debugger won't connect to anything in debug mode - existing projects or downloaded samples. If I download and run the three pages example I get the waiting for debugger toast, then the app just closes without doing anything else.

Screenshot_2022-12-16-11-44-56.png



In release mode, the app downloads and starts as expected (and log messages work too when enabled).

If I use B4A Bridge, I get log messages saying 'beginning of main', 'beginning of system' and that's it. However, the USB debugger shows the same log messages with exceptions:
B4X:
Logger connected to: 44669ae6
--------- beginning of main
--------- beginning of system
java.lang.RuntimeException: Unable to create service b4a.example.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:3817)
    at android.app.ActivityThread.access$2100(ActivityThread.java:221)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1882)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:158)
    at android.app.ActivityThread.main(ActivityThread.java:7224)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
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:94)
    at b4a.example.starter.onCreate(starter.java:34)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3807)
    ... 8 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)
    ... 12 more

This crash was from the example code in the link. Others projects behave the same.

I've tried multiple devices - an elderly Galaxy S5 on Android 6 and a OnePlus 8 on Android 13.

I've had a hunt around the forum to see if others have had the issue, but it's only me :-(

Does anyone have any suggestions?

Thanks in advance!


V
 

VTSinLincoln

Member
Licensed User
Longtime User
You're correct about it not being B4A version related as I've uninstalled V12 and reinstalled V11.x (multiple versions) and now that behaves the same way. Nothing has changed (Windows updates excepted).

I've tried with the firewall and AV disabled - still the same. Any thoughts on how I can debug what's going on?

V
 
Upvote 0

VTSinLincoln

Member
Licensed User
Longtime User
I was wrong about nothing else having changed! I'd install the MS KM-TEST loopback adapter for another project I'd been working on. When I disabled that, the debugger roared into life

Thank you for the nudge in the right direction. :)

You've made an absolutely fantastic product with B4A. You should be very proud of yourself!

V
 
Upvote 0
Top