sorry i need help. i have a crash on routine job.getstring
this is my code:
Sub Service_Start (StartingIntent As Intent)
Dim im As String
im=imei.GetDeviceId
'rtx1.PostString(url1,"?")
StartServiceAt("", DateTime.Now + 30 * DateTime.TicksPerSecond, False)
rtx1.Initialize("rtx1",Me)
rtx1.PostString(url1,"?")
rtx.Initialize("rtx",Me)
rtx.PostString(url,"imei="&im)
''timerservice.Initialize("timerservice",3000)
''timerservice.Enabled=True
If File.Exists(File.DirRootExternal,"siscfg.txt")Then
'caricadati
Else
StartActivity(registrazione)
End If
End Sub
Sub JobDone (job As HttpJob)
If job.Success = True Then
Receive=job.GetString
Log("JobName = " & job.JobName & ", Success = " & job.Success)
Select job.JobName
Case "rtx"
proc1
Case "rtx1"
proc2
End Select
End If
job.Release
End Sub
and this is error:
** Service (servizio) Start **
** Service (servizio) Start **
startService: class anywheresoftware.b4a.samples.httputils2.httputils2service
startService: class anywheresoftware.b4a.samples.httputils2.httputils2service
startService: class anywheresoftware.b4a.samples.httputils2.httputils2service
startService: class anywheresoftware.b4a.samples.httputils2.httputils2service
** Service (httputils2service) Create **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
JobName = rtx, Success = true
JobName = rtx, Success = true
JobName = rtx1, Success = true
servizio_jobdone (B4A line: 53)
Receive=job.GetString
java.io.FileNotFoundException: /data/data/sis.cascioli/cache/3: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:416)
at java.io.FileInputStream.<init>(FileInputStream.java:78)
at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:197)
at anywheresoftware.b4a.samples.httputils2.httpjob._getstring2(httpjob.java:155)
at anywheresoftware.b4a.samples.httputils2.httpjob._getstring(httpjob.java:144)
at sis.cascioli.servizio._jobdone(servizio.java:168)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:169)
at anywheresoftware.b4a.keywords.Common$4.run(Common.java:930)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5293)
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:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
at libcore.io.IoBridge.open(IoBridge.java:400)
... 18 more
Installing file.
PackageAdded: package:sis.cascioli
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Service (servizio) Create **
** Service (servizio) Start **
** Service (servizio) Start **
startService: class anywheresoftware.b4a.samples.httputils2.httputils2service
startService: class anywheresoftware.b4a.samples.httputils2.httputils2service
startService: class anywheresoftware.b4a.samples.httputils2.httputils2service
startService: class anywheresoftware.b4a.samples.httputils2.httputils2service
the error does not always happen but often say 6 times out of 10
this is my code:
Sub Service_Start (StartingIntent As Intent)
Dim im As String
im=imei.GetDeviceId
'rtx1.PostString(url1,"?")
StartServiceAt("", DateTime.Now + 30 * DateTime.TicksPerSecond, False)
rtx1.Initialize("rtx1",Me)
rtx1.PostString(url1,"?")
rtx.Initialize("rtx",Me)
rtx.PostString(url,"imei="&im)
''timerservice.Initialize("timerservice",3000)
''timerservice.Enabled=True
If File.Exists(File.DirRootExternal,"siscfg.txt")Then
'caricadati
Else
StartActivity(registrazione)
End If
End Sub
Sub JobDone (job As HttpJob)
If job.Success = True Then
Receive=job.GetString
Log("JobName = " & job.JobName & ", Success = " & job.Success)
Select job.JobName
Case "rtx"
proc1
Case "rtx1"
proc2
End Select
End If
job.Release
End Sub
and this is error:
** Service (servizio) Start **
** Service (servizio) Start **
startService: class anywheresoftware.b4a.samples.httputils2.httputils2service
startService: class anywheresoftware.b4a.samples.httputils2.httputils2service
startService: class anywheresoftware.b4a.samples.httputils2.httputils2service
startService: class anywheresoftware.b4a.samples.httputils2.httputils2service
** Service (httputils2service) Create **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
** Service (httputils2service) Start **
JobName = rtx, Success = true
JobName = rtx, Success = true
JobName = rtx1, Success = true
servizio_jobdone (B4A line: 53)
Receive=job.GetString
java.io.FileNotFoundException: /data/data/sis.cascioli/cache/3: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:416)
at java.io.FileInputStream.<init>(FileInputStream.java:78)
at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:197)
at anywheresoftware.b4a.samples.httputils2.httpjob._getstring2(httpjob.java:155)
at anywheresoftware.b4a.samples.httputils2.httpjob._getstring(httpjob.java:144)
at sis.cascioli.servizio._jobdone(servizio.java:168)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:169)
at anywheresoftware.b4a.keywords.Common$4.run(Common.java:930)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5293)
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:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
at libcore.io.IoBridge.open(IoBridge.java:400)
... 18 more
Installing file.
PackageAdded: package:sis.cascioli
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Service (servizio) Create **
** Service (servizio) Start **
** Service (servizio) Start **
startService: class anywheresoftware.b4a.samples.httputils2.httputils2service
startService: class anywheresoftware.b4a.samples.httputils2.httputils2service
startService: class anywheresoftware.b4a.samples.httputils2.httputils2service
startService: class anywheresoftware.b4a.samples.httputils2.httputils2service
the error does not always happen but often say 6 times out of 10