Android Question Debub Mode not possible

Walter Brunmueller

Member
Licensed User
Longtime User
My Application crashes in Debug Mode

** Receiver (widget) OnReceive **
Cannot start from a receiver in debug mode.
java.lang.RuntimeException: Unable to create service at.SUWolfsbach.APP.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:3767)
at android.app.ActivityThread.access$1400(ActivityThread.java:236)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1800)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7037)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
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:92)
at at.SUWolfsbach.APP.starter.onCreate(starter.java:34)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:3755)
... 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

Anyone who has an idea?
 

Walter Brunmueller

Member
Licensed User
Longtime User
Files01.png
Yes, release Mode is OK.There are 82 Files
There are 83 Files

The largest one has 774 kByte
Most of them has less than 50 kByte
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
I have the same issue with an app that has a widget. I just assumed that you can't run a widget in debug mode, so I test in release mode.

- Colin.
 
Upvote 0

Walter Brunmueller

Member
Licensed User
Longtime User
I tested the debug mode with an very very small programm (only one Button on the activity)
Also with this project I have the same problem

- debug mode crashes
- release mode is OK
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
Might be an issue related to an over aggressive anti virus.
I don't think so (at least in my case), as I don't run any antivirus apps on my devices. Tbh I haven't really looked too deeply into it because as I said in my earlier post, I thought this was just normal behavior when you try to run an app with a widget in debug.

- Colin.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I don't think so (at least in my case), as I don't run any antivirus apps on my devices. Tbh I haven't really looked too deeply into it because as I said in my earlier post, I thought this was just normal behavior when you try to run an app with a widget in debug.
I was replying to the OP which encountered this issue with a new, empty project. It has nothing to do with widgets.
 
Upvote 0
Top