App crash when the crank in taken out. (“run loop stalled for more than 10 seconds”)

,

Hi,
One user reported me that if he starts my app with the crank out, then there is no problem.
But if he starts the app with the crank in, as soon as he put it out, the app crashes with the “run loop stalled for more than 10 seconds” message.

Here is the app :

I cannot see any problem on the simulator.
I don't have a device yet to test.
Does anyone know what the problem could be ?

The following code is what I'm doing with the crank (the playdate.isCrankDocked() was added in the hope that it could solve the problem, but it is not):

function playdate.update()

    local ra = 0
    local ara = 0
    local pos = 0

    if not playdate.isCrankDocked() then
	    ra, ara = playdate.getCrankChange()
	    pos = playdate.getCrankPosition()
    end

    -- my code using those values

end

I was seeing the same thing on one of my devices, switched over to my debug unit so I could catch it in the debugger, but it wasn't happening there. I updated the other one to the current build (should be out today) and couldn't trigger it any more. I guess it's fixed? :grimacing: :crossed_fingers:

Please let us know if you hear of this happening on 1.11!

1 Like

All I can tell yet is that my builds were indeed compiled with 1.10.0
Hopefully the 1.11 release note will contain something about that.
It may to be somehow random because only 2 users reported me the problem.
Here is attached the screenshot error from one of them, in case those hex numbers can be useful to anyone.

Hi,
I've just received my playdate, and I finally managed to investigate the problem.
It looks like the (on device only) silent crash comes from the setRate method of the audio player.

In my app i use the crank to compute the audio rate, and at the start of the app, when the crank is goint out of the slot, some very small variations are generated, producing this problem.

More info here: Sampleplayer silent crash using setRate