Android Question Unable to create service ... [solved]

JDS

Active Member
Licensed User
When compiling I don't get an error. However when the app runs I get "Unfortunately, PeetersMaatwerkbox has stopped". In the logging I see the following.
I can't find any problem in the source (but there has to be one). Attached you'll find the unfiltered logfile.

If needed I can also post the complete project.



B4X:
java.lang.RuntimeException: Unable to create service b4a.example.starter: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:2771)
    at android.app.ActivityThread.access$1800(ActivityThread.java:151)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1386)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:135)
    at android.app.ActivityThread.main(ActivityThread.java:5254)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:908)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:703)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at b4a.example.starter.onCreate(starter.java:38)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:2761)
    ... 9 more
Caused by: java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at b4a.example.starter.onCreate(starter.java:36)
    ... 10 more
Caused by: java.lang.RuntimeException: java.lang.NumberFormatException: Invalid double: ""
    at b4a.example.main.initializeProcessGlobals(main.java:667)
    ... 13 more
Caused by: java.lang.NumberFormatException: Invalid double: ""
    at java.lang.StringToReal.invalidReal(StringToReal.java:63)
    at java.lang.StringToReal.parseDouble(StringToReal.java:267)
    at java.lang.Double.parseDouble(Double.java:301)
    at b4a.example.global._process_globals(global.java:519)
    at b4a.example.main.initializeProcessGlobals(main.java:649)
    ... 13 more
 

Attachments

DonManfred

Expert
Licensed User
To export a project: Use File->Export as Zip
Upload the generated ZIP.

Caused by: java.lang.RuntimeException: java.lang.NumberFormatException: Invalid double: ""
at b4a.example.main.initializeProcessGlobals(main.java:667)
...
13 more
Caused by: java.lang.NumberFormatException: Invalid double:
""
at java.lang.StringToReal.invalidReal(StringToReal.java:63)
at java.lang.StringToReal.parseDouble(StringToReal.java:
267)
at java.lang.Double.parseDouble(Double.java:
301)
at b4a.example.global._process_globals(global.java:
519)
at b4a.example.main.initializeProcessGlobals(main.java:
649)
Check your code... There is a invalid double....
 

JDS

Active Member
Licensed User
Thanks. It wasn't a double (didn't use one in this project) but then I started checking al the variables.
I found a integer which was getting assigned an ""

Thanks for giving me the little push. Had been searching for 2-3 hours :S
 
Top