Skip to content

Conversation

@kaloyan-raev
Copy link

Avoid division by zero when time - lastTime == 0. This happenedwhen I started InfiniSim for the first time.

Avoid division by zero when `time - lastTime == 0`. This happenedwhen I
started InfiniSim for the first time.
@kaloyan-raev
Copy link
Author

The specific SIGFPE I got in the simulator was:

Thread 13 "MAIN" received signal SIGFPE, Arithmetic exception.
[Switching to Thread 0x7fffda97d640 (LWP 248941)]
0x00005555555cf7f5 in Pinetime::Controllers::MotionController::Update (this=0x5555556c12a0 <motionController>, x=0, y=0, z=0, nbSteps=0) at /home/kaloyan/git/InfiniSim/InfiniTime/src/components/motion/MotionController.cpp:61
61	                  100 / (time - lastTime);

@github-actions
Copy link

github-actions bot commented Nov 30, 2025

Build size and comparison to main:

Section Size Difference
text 382444B 16B
data 944B 0B
bss 22632B 0B

Run in InfiniEmu

@mark9064
Copy link
Member

mark9064 commented Dec 6, 2025

Thanks for the patch :)

This should have already been resolved by #2329 as this now enforces 100 ticks between each UpdateMotion call, could you try InfiniSim with the latest main?

@mark9064 mark9064 added the bug Something isn't working label Dec 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants