Android Question CallSubDelayed - HeartBeat

wonder

Expert
Licensed User
Longtime User
B4X:
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Any idea what this is?

App:
Project Ryu (see my signature)
Libs: LibGDX, Audio, Core, Reflection, Generic Motion Event, JavaObject
Compile: Release (Obfuscated)
B4A: 4.00

My game runs fine, no crashes or whatsoever, but I'm getting this strange message in the log window.

Log Window:
B4X:
LogCat connected to: B4A-Bridge: asus ME173X-[/INDENT]
--------- beginning of /dev/log/main
Installing file.
GC_CONCURRENT freed 1931K (8281), 40% free 3274K/5400K, paused 5ms+3ms, total 46ms
GC_FOR_ALLOC freed 1833K (937), 42% free 3242K/5528K, paused 24ms, total 25ms
GC_FOR_ALLOC freed 1841K (920), 42% free 3242K/5528K, paused 25ms, total 25ms
GC_FOR_ALLOC freed 1840K (915), 42% free 3242K/5528K, paused 23ms, total 23ms
GC_FOR_ALLOC freed 1840K (915), 42% free 3242K/5528K, paused 25ms, total 25ms
GC_FOR_ALLOC freed 1840K (915), 42% free 3242K/5528K, paused 23ms, total 23ms
GC_FOR_ALLOC freed 1841K (915), 42% free 3242K/5528K, paused 24ms, total 24ms
GC_FOR_ALLOC freed 1841K (914), 42% free 3242K/5528K, paused 25ms, total 25ms
GC_FOR_ALLOC freed 1841K (915), 42% free 3242K/5528K, paused 23ms, total 23ms
create interp thread : stack size=32KB
create new thread
new thread created
update thread list
threadid=15: interp stack at 0x55363000
threadid=15: created from interp
start new thread
** Activity (main) Pause, UserClosed = false **
[CDS]close[48194]
threadid=15: notify debugger
threadid=15 (Thread-514): calling run()
java.net.SocketException: Socket closed
    at libcore.io.Posix.recvfromBytes(Native Method)
    at libcore.io.Posix.recvfrom(Posix.java:136)
    at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:164)
    at libcore.io.IoBridge.recvfrom(IoBridge.java:560)
    at java.net.PlainDatagramSocketImpl.doRecv(PlainDatagramSocketImpl.java:161)
    at java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:169)
    at java.net.DatagramSocket.receive(DatagramSocket.java:253)
    at anywheresoftware.b4a.objects.SocketWrapper$UDPSocket$UDPReader.run(SocketWrapper.java:414)
    at java.lang.Thread.run(Thread.java:838)
threadid=10: exiting
threadid=10: bye!
sending message to waiting queue (CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
sending message to waiting queue (CallSubDelayed - HeartBeat)
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
PackageAdded: package:com.ninjadynamics.bulldozer
Flushing caches (mode 0)
Flushing caches (mode 1)
running waiting messages (21)
** Activity (main) Resume **
create interp thread : stack size=32KB
create new thread
new thread created
update thread list
threadid=10: interp stack at 0x55242000
threadid=10: created from interp
start new thread
threadid=10: notify debugger
threadid=10 (Thread-515): calling run()
from settings cache , name = install_non_market_apps , value = 1
onWindowFocus: null softInputMode=290 first=true flags=#1810100
START INPUT: com.android.internal.policy.impl.PhoneWindow$DecorView{413e9c60 V.E..... R.....ID 0,0-1280,736} ic=null tba=android.view.inputmethod.EditorInfo@414b9270 controlFlags=#104
Starting input: Bind result=InputBindResult{com.android.internal.view.IInputMethodSession$Stub$Proxy@413e5028 com.nuance.xt9.input/.IME #29}
 

Troberg

Well-Known Member
Licensed User
Longtime User
I once got that message when I had messed up, so the caller was stuck in a loop, and the recipient didn't get time to answer.

On second thought, I don't think I got the heartbeat part. Could that be something from your code?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
There are events which should be called but the activity is in background (due to this events cannot be raised in this activity). The event is put then into the messagequeue and will be called if the activity is running again....
 
Upvote 0

thedesolatesoul

Expert
Licensed User
Longtime User
Heartbeat is probably a sub in the app code.

Infact this message is self explanatory:
B4X:
Ignoring event (too many queued events: CallSubDelayed - HeartBeat)
Your timer is running faster than the code it can process.

EDIT:
Infact Don is right, your activity is paused, yet your timer/thread is still running in the background raising events.
 
Upvote 0

thedesolatesoul

Expert
Licensed User
Longtime User
I've searched for HeartBeat (Ctrl + F) and found nothing. Might be the timer, though. I'll check it out. Thanks!! :)
You are right, its possibly an internal B4A thing (for the timer?)
Just wondering if you have a timer and disable it in Activity_Pause?
 
Upvote 0

wonder

Expert
Licensed User
Longtime User
Indeed, it might be one of Erel's hidden secrets... ;)

In my specific case, I almost sure it was related to the OnGenericMotionEvent.
I was unnecessarily retrieving my gamepad's device info.

Once I've changed to code, the HeartBeat thing stopped.

Before:
B4X:
Sub Activity_OnGenericMotionEvent(event As Object)

        Controller.Input = event

        Controller.Device_Name = getDevice(False)
        Controller.Device_Info = getDevice(True)

        Controller.L_Analog_X  = getAxisValue(Controller.AXIS_X)
        Controller.L_Analog_Y  = getAxisValue(Controller.AXIS_Y)

        Controller.R_Analog_X  = getAxisValue(Controller.AXIS_Z)
        Controller.R_Analog_Y  = getAxisValue(Controller.AXIS_RZ)

        Controller.L_Trigger   = getAxisValue(Controller.AXIS_LTRIGGER)
        Controller.R_Trigger   = getAxisValue(Controller.AXIS_RTRIGGER)
End Sub


After:
B4X:
Sub Activity_OnGenericMotionEvent(event As Object)

        Controller.Input = event

        If Controller.Device_Name = "" Then Controller.Device_Name = getDevice(False)
        If Controller.Device_Info = "" Then Controller.Device_Info = getDevice(True)

        Controller.L_Analog_X  = getAxisValue(Controller.AXIS_X)
        Controller.L_Analog_Y  = getAxisValue(Controller.AXIS_Y)

        Controller.R_Analog_X  = getAxisValue(Controller.AXIS_Z)
        Controller.R_Analog_Y  = getAxisValue(Controller.AXIS_RZ)

        Controller.L_Trigger   = getAxisValue(Controller.AXIS_LTRIGGER)
        Controller.R_Trigger   = getAxisValue(Controller.AXIS_RTRIGGER)
End Sub
 
Upvote 0
Top