Something's wrong. It might be me who has messed up (and probably is), but I have a suspicion that, just this once, it just might be Erel .
Error log:
The error occurs in this sub:
Well, here's the kicker: There is not a double involved anywhere in this. All arguments are checked, and have their proper values and are properly initialized.
Now, things get really strange: If I cut it down to a minimalistic example, it works. All the code which runs is the same, I just cut out a few thousand lines that are not even involved.
It gets even better. I've encountered the exact same problem in completely different code in another program, but there, I can't replicate it on my devices. In this case, there isn't even a double variable declared anywhere in the entire project.
See the attached file for the code. There's quite a lot of code in there, and most of it is not tested yet (I don't think I've ever done so much code without a test run before...), but it runs until the error happens. Just start the app and it will error within a second or so.
Anyone who can tell me what to do to fix this will have a serious bug fixing IOU from me. I'll really dig into any problem where I might help you. This issue is really driving me nuts.
Error log:
Installing file.
** Activity (main) Pause, UserClosed = false **
PackageAdded: package:com.troberg.dash
** Activity (main) Create, isFirst = true **
Send: MA/MainMenuUpdated
java.lang.NumberFormatException: Invalid double: "null"
at java.lang.StringToReal.invalidReal(StringToReal.java:63)
at java.lang.StringToReal.parseDouble(StringToReal.java:269)
at java.lang.Double.parseDouble(Double.java:295)
at anywheresoftware.b4a.BA.ObjectToNumber(BA.java:622)
at com.troberg.dash.cmsghub._msgsend(cmsghub.java:331)
at com.troberg.dash.cmsghub._msgsend0(cmsghub.java:371)
at com.troberg.dash.cmenupresence._setbutton(cmenupresence.java:128)
at com.troberg.dash.cscrabout._setlanguage(cscrabout.java:369)
at com.troberg.dash.cscrabout._setup(cscrabout.java:404)
at com.troberg.dash.cscrabout.callSub(cscrabout.java:424)
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:847)
at anywheresoftware.b4a.keywords.Common.CallSubNew2(Common.java:820)
at com.troberg.dash.main._addscr(main.java:452)
at com.troberg.dash.main._registerscrs(main.java:713)
at com.troberg.dash.main._activity_create(main.java:365)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:187)
at com.troberg.dash.main.afterFirstLayout(main.java:100)
at com.troberg.dash.main.access$100(main.java:17)
at com.troberg.dash.main$WaitForLayout.run(main.java:78)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4921)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
The error occurs in this sub:
B4X:
Sub MsgSend(From As Object, Recipient As Object, Msg As String, Args As cArgPackage) AsInt
IfSubExists(Recipient, "MsgRecieved") Then
Dim ThisMsg As cMsg
ThisMsg.Initialize(From, Msg, Args)
LogMsg(Msg,False)
ReturnCallSub2(Recipient, "MsgRecieved", ThisMsg) '<-- Error on this line
Else
Logs.LogError("Listener didn't answer:" & Recipient & " (" & Msg & ")")
ListenerUnRegister(Recipient)
Return -1
EndIf
End Sub
Well, here's the kicker: There is not a double involved anywhere in this. All arguments are checked, and have their proper values and are properly initialized.
Now, things get really strange: If I cut it down to a minimalistic example, it works. All the code which runs is the same, I just cut out a few thousand lines that are not even involved.
It gets even better. I've encountered the exact same problem in completely different code in another program, but there, I can't replicate it on my devices. In this case, there isn't even a double variable declared anywhere in the entire project.
See the attached file for the code. There's quite a lot of code in there, and most of it is not tested yet (I don't think I've ever done so much code without a test run before...), but it runs until the error happens. Just start the app and it will error within a second or so.
Anyone who can tell me what to do to fix this will have a serious bug fixing IOU from me. I'll really dig into any problem where I might help you. This issue is really driving me nuts.