bugfix for Invalid speed "G1 F-2147483648" #2002

Closed
opened 2026-04-05 22:24:55 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @Azio-Pantheon on 10/3/2025

Description

Fixes #10498, also might be same issue in #2067

Added non-zero safety check for feedrate calculation in slow_down_proportional and slowdown_to_minimum_feedrate.

In CoolingBuffer::process_layer sometimes we get 2 identical gcode line:
G1 F15000;_EXTRUDE_SET_SPEED G1 F15000;_EXTRUDE_SET_SPEED
This causes calculate_layer_slowdown to produce lines with -nan(ind) feedrate and results in G1 F-2147483648

Tests

invalid_gcod_line_test.zip
image

*Originally created by @Azio-Pantheon on 10/3/2025* # Description Fixes #10498, also might be same issue in #2067 Added non-zero safety check for feedrate calculation in slow_down_proportional and slowdown_to_minimum_feedrate. In CoolingBuffer::process_layer sometimes we get 2 identical gcode line: `G1 F15000;_EXTRUDE_SET_SPEED G1 F15000;_EXTRUDE_SET_SPEED` This causes calculate_layer_slowdown to produce lines with -nan(ind) feedrate and results in G1 F-2147483648 ## Tests [invalid_gcod_line_test.zip](https://github.com/user-attachments/files/22689004/invalid_gcod_line_test.zip) <img width="1057" height="686" alt="image" src="https://github.com/user-attachments/assets/a6c60994-d684-4473-aa35-e112f7e47b77" />
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/OrcaSlicer#2002