Hello all,
I see there are a few posts on the same topic, I couldn't exactly find the solution.
Here is my scenario. I am calling a Resumable sub within a Resumable sub
Error Log :
This happens when the app is started and the first wait for is called for the first 2 times. When the first wait for is called the third time ( user tries to upload file the third time as it failed the first two times, the error disappears )
Thank you
I see there are a few posts on the same topic, I couldn't exactly find the solution.
Here is my scenario. I am calling a Resumable sub within a Resumable sub
resumable sub not completed:
wait for (ABMShared.AddAttachment1(FileName,page.ws.Session, strattachsource,stageid,False)) Complete(attachmentid As List)
Public Sub AddAttachment1(filename As String,sss As HttpSession,strattachsource As String, stageid As Int,isnew As Boolean) As ResumableSub
Wait For (GetAttachmentVersion1(recordid,strfilepath,filename)) Complete(versionnumber As Double)
Log("versionnumber1 " & versionnumber) ' << this is NOT logged
End Sub
Sub GetAttachmentVersion1(recordid As Int,filepath As String,filename As String) As ResumableSub
Dim versionnumber As Double = 0
Log("versionnumber " & versionnumber) ' << this is logged
Return versionnumber
End Sub
Error Log :
Error log:
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: Resumable sub already completed
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:496)
at anywheresoftware.b4a.keywords.Common.access$0(Common.java:467)
at anywheresoftware.b4a.keywords.Common$CallSubDelayedHelper.run(Common.java:541)
at anywheresoftware.b4a.keywords.SimpleMessageLoop.runMessageLoop(SimpleMessageLoop.java:30)
at anywheresoftware.b4a.StandardBA.startMessageLoop(StandardBA.java:26)
at anywheresoftware.b4j.object.WebSocketModule$Adapter$ThreadHandler.run(WebSocketModule.java:191)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Resumable sub already completed
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:120)
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:487)
... 10 more
Caused by: java.lang.RuntimeException: Resumable sub already completed
at anywheresoftware.b4a.keywords.Common.WaitFor(Common.java:1041)
at dmsqa.abmshared$ResumableSub_AddAttachment.resume(abmshared.java:1204)
at dmsqa.abmshared._addattachment(abmshared.java:1038)
at dmsqa.frmrecords$ResumableSub_Page_FileUploaded.resume(frmrecords.java:5891)
at dmsqa.frmrecords._page_fileuploaded(frmrecords.java:5843)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:91)
This happens when the app is started and the first wait for is called for the first 2 times. When the first wait for is called the third time ( user tries to upload file the third time as it failed the first two times, the error disappears )
Thank you
Last edited: