Hi,
In a B4J program from time to time an error occurs with the following data in the log file.
As string manipulations occur on various places in the program, I wonder whether it is possible to derive from the error message above the line number in the B4J source. This would be helpfull to find the code which causes the error.
Any possibility?
Harry
In a B4J program from time to time an error occurs with the following data in the log file.
B4X:
main._appstart (java line: 144)
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.StringIndexOutOfBoundsException: String index out of range: -47
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:489)
at anywheresoftware.b4a.keywords.Common.access$0(Common.java:460)
at anywheresoftware.b4a.keywords.Common$CallSubDelayedHelper.run(Common.java:534)
at anywheresoftware.b4a.keywords.SimpleMessageLoop.runMessageLoop(SimpleMessageLoop.java:30)
at anywheresoftware.b4a.StandardBA.startMessageLoop(StandardBA.java:26)
at anywheresoftware.b4a.keywords.Common.StartMessageLoop(Common.java:146)
at b4j.example.main._appstart(main.java:144)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:90)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:77)
at b4j.example.main.main(main.java:29)
Caused by: java.lang.RuntimeException: java.lang.StringIndexOutOfBoundsException: String index out of range: -47
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:119)
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:480)
... 13 more
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -47
at java.lang.String.substring(String.java:1967)
at b4j.example.main._stream1_newtext(main.java:1708)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:90)
... 14 more
Any possibility?
Harry