S Scantech Well-Known Member Licensed User Longtime User Apr 6, 2019 #1 Code: CallSub2(Main, "ProcessOBDData_SelfTestMessage", FilterType) Code: Sub ProcessOBDData_SelfTestMessage(FilterType As String) 'Remove Self Test Message If FilterType = 602 Then 'FORD SELF TEST MESSAGE If lstView(VP.CurrentPage).GetSize >= 2 Then lstView(VP.CurrentPage).RemoveAt(1) End If End Sub ====Timer_RequestOBD: Mode1=============== CheckOBDModeAll: Main.Attempt 1 CheckOBDModeAll: SendOBDData 010C ====Timer_RequestOBD: Mode3=============== CheckOBDModeAll: Main.Attempt 1 CheckOBDModeAll: SendOBDData 03 CheckOBDModeAll: Datarecieved 486B10430440000000004A > ProcessOBDData: Ret - 0 Error occurred on line: 1645 (Communication) java.lang.reflect.InvocationTargetException at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.keywords.Common.CallSubDebug2(Common.java:1056) at scantech.cardiagnosticpro.communication._processobddata(communication.java:2765) at scantech.cardiagnosticpro.communication._checkobdmodeall(communication.java:5192) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144) at anywheresoftware.b4a.debug.Debug.delegate(Debug.java:262) at scantech.cardiagnosticpro.communication._requestobdgeneric(communication.java:13916) at scantech.cardiagnosticpro.communication._timer_requestobd_tick(communication.java:17674) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144) at anywheresoftware.b4a.objects.Timer$TickTack.run(Timer.java:105) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6682) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410) Caused by: java.lang.RuntimeException: java.lang.Exception: Sub ProcessOBDData_SelfTestMessage signature does not match expected signature. at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:336) at anywheresoftware.b4a.debug.Debug.CallSubNew2(Debug.java:285) ... 27 more Caused by: java.lang.Exception: Sub ProcessOBDData_SelfTestMessage signature does not match expected signature. at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:321) ... 28 more Click to expand... This had me pulling my hair. It crashes only with my large project. I test the code above with new project and will not duplicate the error. I can correct it by adding a return line below it or add logs. Weird stuff happening.
Code: CallSub2(Main, "ProcessOBDData_SelfTestMessage", FilterType) Code: Sub ProcessOBDData_SelfTestMessage(FilterType As String) 'Remove Self Test Message If FilterType = 602 Then 'FORD SELF TEST MESSAGE If lstView(VP.CurrentPage).GetSize >= 2 Then lstView(VP.CurrentPage).RemoveAt(1) End If End Sub ====Timer_RequestOBD: Mode1=============== CheckOBDModeAll: Main.Attempt 1 CheckOBDModeAll: SendOBDData 010C ====Timer_RequestOBD: Mode3=============== CheckOBDModeAll: Main.Attempt 1 CheckOBDModeAll: SendOBDData 03 CheckOBDModeAll: Datarecieved 486B10430440000000004A > ProcessOBDData: Ret - 0 Error occurred on line: 1645 (Communication) java.lang.reflect.InvocationTargetException at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.keywords.Common.CallSubDebug2(Common.java:1056) at scantech.cardiagnosticpro.communication._processobddata(communication.java:2765) at scantech.cardiagnosticpro.communication._checkobdmodeall(communication.java:5192) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144) at anywheresoftware.b4a.debug.Debug.delegate(Debug.java:262) at scantech.cardiagnosticpro.communication._requestobdgeneric(communication.java:13916) at scantech.cardiagnosticpro.communication._timer_requestobd_tick(communication.java:17674) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144) at anywheresoftware.b4a.objects.Timer$TickTack.run(Timer.java:105) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6682) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410) Caused by: java.lang.RuntimeException: java.lang.Exception: Sub ProcessOBDData_SelfTestMessage signature does not match expected signature. at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:336) at anywheresoftware.b4a.debug.Debug.CallSubNew2(Debug.java:285) ... 27 more Caused by: java.lang.Exception: Sub ProcessOBDData_SelfTestMessage signature does not match expected signature. at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:321) ... 28 more Click to expand... This had me pulling my hair. It crashes only with my large project. I test the code above with new project and will not duplicate the error. I can correct it by adding a return line below it or add logs. Weird stuff happening.
AnandGupta Expert Licensed User Longtime User Apr 6, 2019 #2 Maybe adding a sleep will fix it. Regards Anand Upvote 0
S Scantech Well-Known Member Licensed User Longtime User Apr 6, 2019 #3 At first i thought it was related to the service name (Communication) then i renamed it but still an error. I think we need a new version for this fix. It is probably related to the name of ProcessOBDData_SelfTestMessage depending where the location of the underscore is will cause it to crash. Try Process_OBDDataSelfTestMessage it crashes. Also unused variable in the sub will not be detected using Underscore and also using same variable name in the sub will cause errors. See attach Attachments Bug.zip Bug.zip 9 KB · Views: 617 Last edited: Apr 6, 2019 Upvote 0
At first i thought it was related to the service name (Communication) then i renamed it but still an error. I think we need a new version for this fix. It is probably related to the name of ProcessOBDData_SelfTestMessage depending where the location of the underscore is will cause it to crash. Try Process_OBDDataSelfTestMessage it crashes. Also unused variable in the sub will not be detected using Underscore and also using same variable name in the sub will cause errors. See attach
XbNnX_507 Active Member Licensed User Longtime User Apr 6, 2019 #4 You should try CallSubDelayed2 Code: CallSubDelayed2(Main, "ProcessOBDData_SelfTestMessage", FilterType ) Upvote 0
You should try CallSubDelayed2 Code: CallSubDelayed2(Main, "ProcessOBDData_SelfTestMessage", FilterType )
S Scantech Well-Known Member Licensed User Longtime User Apr 6, 2019 #5 XbNnX_507 said: You should try CallSubDelayed2 Code: CallSubDelayed2(Main, "ProcessOBDData_SelfTestMessage", FilterType ) Click to expand... Have you tested the attached file? Upvote 0
XbNnX_507 said: You should try CallSubDelayed2 Code: CallSubDelayed2(Main, "ProcessOBDData_SelfTestMessage", FilterType ) Click to expand... Have you tested the attached file?
XbNnX_507 Active Member Licensed User Longtime User Apr 6, 2019 #6 is not a bug in your Testing Service you have: Code: Sub ProcessOBDData(FilterType As Int, Index As Int, DataReceived As String, WhatMode As String, OptByte As String, lData As List) CallSub2(Main, "ProcessOBDData_SelfTestMessage", FilterType) End Sub FilterType declare as Int In your Main Activity you have Code: ProcessOBDData_SelfTestMessage(FilterType As String) FilterType Declare as String That's why it crashes. Upvote 0
is not a bug in your Testing Service you have: Code: Sub ProcessOBDData(FilterType As Int, Index As Int, DataReceived As String, WhatMode As String, OptByte As String, lData As List) CallSub2(Main, "ProcessOBDData_SelfTestMessage", FilterType) End Sub FilterType declare as Int In your Main Activity you have Code: ProcessOBDData_SelfTestMessage(FilterType As String) FilterType Declare as String That's why it crashes.
S Scantech Well-Known Member Licensed User Longtime User Apr 6, 2019 #7 XbNnX_507 said: is not a bug in your Testing Service you have: Code: Sub ProcessOBDData(FilterType As Int, Index As Int, DataReceived As String, WhatMode As String, OptByte As String, lData As List) CallSub2(Main, "ProcessOBDData_SelfTestMessage", FilterType) End Sub FilterType declare as Int In your Main Activity you have Code: ProcessOBDData_SelfTestMessage(FilterType As String) FilterType Declare as String That's why it crashes. Click to expand... Leave it the way it was and change ProcessOBDData_SelfTestMessage (remove underscore) to ProcessOBDDataSelfTestMessage and it will not crash. Try it Its not related to int. Last edited: Apr 6, 2019 Upvote 0
XbNnX_507 said: is not a bug in your Testing Service you have: Code: Sub ProcessOBDData(FilterType As Int, Index As Int, DataReceived As String, WhatMode As String, OptByte As String, lData As List) CallSub2(Main, "ProcessOBDData_SelfTestMessage", FilterType) End Sub FilterType declare as Int In your Main Activity you have Code: ProcessOBDData_SelfTestMessage(FilterType As String) FilterType Declare as String That's why it crashes. Click to expand... Leave it the way it was and change ProcessOBDData_SelfTestMessage (remove underscore) to ProcessOBDDataSelfTestMessage and it will not crash. Try it Its not related to int.
XbNnX_507 Active Member Licensed User Longtime User Apr 6, 2019 #8 it does crashes here: Code: java.lang.IllegalArgumentException: method b4a.example.main._processobddataselftestmessage argument 1 has type java.lang.String, got java.lang.Integer Upvote 0
it does crashes here: Code: java.lang.IllegalArgumentException: method b4a.example.main._processobddataselftestmessage argument 1 has type java.lang.String, got java.lang.Integer
S Scantech Well-Known Member Licensed User Longtime User Apr 6, 2019 #9 XbNnX_507 said: it does crashes here: Code: java.lang.IllegalArgumentException: method b4a.example.main._processobddataselftestmessage argument 1 has type java.lang.String, got java.lang.Integer Click to expand... Like i said something is weird. It does not crash with mine. LOL Upvote 0
XbNnX_507 said: it does crashes here: Code: java.lang.IllegalArgumentException: method b4a.example.main._processobddataselftestmessage argument 1 has type java.lang.String, got java.lang.Integer Click to expand... Like i said something is weird. It does not crash with mine. LOL
S Scantech Well-Known Member Licensed User Longtime User Apr 6, 2019 #10 what version b4a are u using? Upvote 0
S Scantech Well-Known Member Licensed User Longtime User Apr 6, 2019 #11 Update: Crash is random. Weird. Upvote 0
S Scantech Well-Known Member Licensed User Longtime User Apr 6, 2019 #13 XbNnX_507 said: it does crashes here: Code: java.lang.IllegalArgumentException: method b4a.example.main._processobddataselftestmessage argument 1 has type java.lang.String, got java.lang.Integer Click to expand... You should clean the project and retry it Upvote 0
XbNnX_507 said: it does crashes here: Code: java.lang.IllegalArgumentException: method b4a.example.main._processobddataselftestmessage argument 1 has type java.lang.String, got java.lang.Integer Click to expand... You should clean the project and retry it
S Scantech Well-Known Member Licensed User Longtime User Apr 6, 2019 #14 After cleaning project and removed Underscore it does crash. Why is my error message different then XbNnX? *** Service (starter) Create *** ** Service (starter) Start ** ** Activity (main) Create, isFirst = true ** ** Activity (main) Resume ** *** Service (testing) Create *** Error occurred on line: 30 (Testing) java.lang.reflect.InvocationTargetException at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.keywords.Common.CallSubDebug2(Common.java:1056) at b4a.example.testing._processobddata(testing.java:140) at b4a.example.testing._service_create(testing.java:163) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144) at anywheresoftware.b4a.BA.raiseEvent(BA.java:176) at b4a.example.testing.onCreate(testing.java:56) at android.app.ActivityThread.handleCreateService(ActivityThread.java:3162) at android.app.ActivityThread.-wrap5(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1550) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6077) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756) Caused by: java.lang.RuntimeException: java.lang.Exception: Sub ProcessOBDDataSelfTestMessage signature does not match expected signature. at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:336) at anywheresoftware.b4a.debug.Debug.CallSubNew2(Debug.java:285) ... 21 more Caused by: java.lang.Exception: Sub ProcessOBDDataSelfTestMessage signature does not match expected signature. at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:321) ... 22 more ** Service (testing) Start ** Click to expand... Changing String to int fixes the problem Upvote 0
After cleaning project and removed Underscore it does crash. Why is my error message different then XbNnX? *** Service (starter) Create *** ** Service (starter) Start ** ** Activity (main) Create, isFirst = true ** ** Activity (main) Resume ** *** Service (testing) Create *** Error occurred on line: 30 (Testing) java.lang.reflect.InvocationTargetException at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.keywords.Common.CallSubDebug2(Common.java:1056) at b4a.example.testing._processobddata(testing.java:140) at b4a.example.testing._service_create(testing.java:163) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144) at anywheresoftware.b4a.BA.raiseEvent(BA.java:176) at b4a.example.testing.onCreate(testing.java:56) at android.app.ActivityThread.handleCreateService(ActivityThread.java:3162) at android.app.ActivityThread.-wrap5(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1550) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6077) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756) Caused by: java.lang.RuntimeException: java.lang.Exception: Sub ProcessOBDDataSelfTestMessage signature does not match expected signature. at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:336) at anywheresoftware.b4a.debug.Debug.CallSubNew2(Debug.java:285) ... 21 more Caused by: java.lang.Exception: Sub ProcessOBDDataSelfTestMessage signature does not match expected signature. at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:321) ... 22 more ** Service (testing) Start ** Click to expand... Changing String to int fixes the problem