Hi ,
the code below runs a while and then i comes up with an error (below the code)
i do not know what is wrong
i get this error
the code below runs a while and then i comes up with an error (below the code)
i do not know what is wrong
B4X:
Sub timerw_Tick
timerwc=timerwc+1
Log(timerwc)
If timerwc=50 Then
sql1.ExecNonQuery("UPDATE 094_synclic SET syncl=0")
logfile("SYNC ACTIVE")
' reset tables
resettable=DateTime.GetHour(DateTime.Now)& DateTime.GetMinute(DateTime.Now)
resettablc=sql1.ExecQuerySingleResult("SELECT synctime from 094_synclic")
Log("resettables" & resettablc)
Log("resettables" & resettable)
If resettable=resettablc Then
resettabla=1
logfile("RESET ACTIVE")
End If
sql1.ExecNonQuery("UPDATE 094_synclic SET syncl=1")
logfile("SYNC DEACTIVE")
timerx.Enabled=True
timerw.Enabled=False
timerwc=0
else if timerwc=25 Then
logfile("UPDATE USERS")
Try
Dim userlic As Int=sql1.ExecQuerySingleResult("SELECT count(DISTINCT useract) from 093_totalusers")
Log(userlic)
DateTime.DateFormat="yyyy-MM-dd"
sql1.ExecNonQuery2("INSERT INTO 092_tlicusage VALUES(NULL,?,?,?)", Array As String(DateTime.Date(DateTime.Now),DateTime.Time(DateTime.Now), userlic))
logfile("UPDATED LICUSEAGE")
Catch
Log("Error Update users " & LastException)
End Try
End If
StartMessageLoop
End Sub
i get this error
B4X:
MessageLoop.java:30)
at anywheresoftware.b4a.StandardBA.startMessageLoop(StandardBA.java:26)
at anywheresoftware.b4a.keywords.Common.StartMessageLoop(Common.java:131
)
at b4j.example.main._timerw_tick(main.java:594)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
at anywheresoftware.b4a.objects.Timer$TickTack$1.run(Timer.java:118)
at anywheresoftware.b4a.keywords.SimpleMessageLoop.runMessageLoop(Simple
MessageLoop.java:30)
at anywheresoftware.b4a.StandardBA.startMessageLoop(StandardBA.java:26)
at anywheresoftware.b4a.keywords.Common.StartMessageLoop(Common.java:131
)
at b4j.example.main._timerw_tick(main.java:594)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
... 9 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.Run
timeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang
.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.
lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: j
ava.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeExceptio
n: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeExce
ption: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.Runtime
Exception: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.Run
timeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang
.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.
lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: j
ava.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeExceptio
n: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeExce
ption: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.Runtime
Exception: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.Run
timeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang
.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.
lang.StackOverflowError
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:114)
at anywheresoftware.b4a.objects.Timer$TickTack$1.run(Timer.java:118)
at anywheresoftware.b4a.keywords.SimpleMessageLoop.runMessageLoop(Simple
MessageLoop.java:30)
at anywheresoftware.b4a.StandardBA.startMessageLoop(StandardBA.java:26)
at anywheresoftware.b4a.keywords.Common.StartMessageLoop(Common.java:131
Last edited: