Android Question [SOLVED]Error when trying to run app on my tablet or phone in debug mode

jayel

Active Member
Licensed User
Longtime User
I get :
Installing file.
PackageAdded: package:be.robotronic.robocars
maininitializeProcessGlobals (java line: 1499)
java.lang.RuntimeException: java.lang.NullPointerException
at be.robotronic.robocars.main.initializeProcessGlobals(main.java:1499)
at be.robotronic.robocars.main.afterFirstLayout(main.java:96)
at be.robotronic.robocars.main.access$100(main.java:17)
at be.robotronic.robocars.main$WaitForLayout.run(main.java:78)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5479)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at be.robotronic.robocars.cars._process_globals(cars.java:796)
at be.robotronic.robocars.main.initializeProcessGlobals(main.java:1493)
... 12 more

And on my tbalet screen I get = RoboCars has stopped

Can somebody please help me?

Greets John
 

DonManfred

Expert
Licensed User
Longtime User
What is the content of your Process_Global sub?
 
Upvote 0

jayel

Active Member
Licensed User
Longtime User
B4X:
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.

    Dim pubGebruiker As gebruiker
    Dim Const POSITION_TOP_LEFT As Int  = 1
    Dim Const POSITION_TOP_RIGHT As Int = 2
    Dim Const POSITION_BOTTOM_LEFT As Int = 3
    Dim Const POSITION_BOTTOM_RIGHT As Int = 4
    Dim Const POSITION_CENTER As Int = 5
    
    Dim URLstring As String = "http://bla.bla.bla/"
 
    Dim buttonresult As List
    Dim carchoice As Map
End Sub

I got the error in debug (legacy) but not in debug (rapid).
And also in release mode my apk doesn't start it put RoboCars has stopped
 
Upvote 0

jayel

Active Member
Licensed User
Longtime User
curly lines solved (complained because a bal file was not used).
But i the error remains, i cannot run my app under debug (legacy) and release.

Strange, I am e newbie and succesfully made 2 apps for my compagnie.
This one works in debug (rapid) mode but in all other modes I get an error?
 
Upvote 0

jayel

Active Member
Licensed User
Longtime User
Ok thanks Erel, I have posted (#3) my code of process globals...
Is there something wrong there?
 
Upvote 0

jayel

Active Member
Licensed User
Longtime User
Erel,
You rock, it was the cars module, didn't see that.
I had the same variable in process_globals and globals....

thanks Erel.

And you have a great product !!!!
 
Upvote 0
Top