pebble / pebblekit

Pebble's app development toolkit for the Pebble smartwatch, Android and iOS
199 stars 13 forks source link

Scheduling an already-scheduled animation reboots the watch #13

Open Katharine opened 11 years ago

Katharine commented 11 years ago

According to the documentation, calling animation_schedule on an animation which is already scheduled should unschedule the animation (calling its appropriate handlers if any), then reschedule the animation.

What actually happens is that the watch reboots. While this could be argued to have unscheduled the animation, I don't think it's quite what was intended.

Calling animation_unschedule followed by animation_schedule appears to behave as intended (though I had plenty of other animation-related crashes I didn't track down; I gave up and used timers instead).

Here is sample program. You can also grab a compiled pbw, but running it will just immediately reboot your watch. The sample code uses the layer property animation for brevity, but user-implemented animations behave the same.

Kernald commented 11 years ago

I have the same problem, trying to reschedule an animation when it ends, with a random delay. A call to animation_schedule in my teardown handler make the watch reboot.