prusa3d / PrusaSlicer

G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)
https://www.prusa3d.com/prusaslicer/
GNU Affero General Public License v3.0
7.76k stars 1.93k forks source link

Limit M486 A line length #13314

Open DerMouse opened 2 months ago

DerMouse commented 2 months ago

When slicing some STL with a very long file name, the M486 A lines written by PrusaSlicer will trigger a printer reboot when sent through firmware side checksum validation. Problem is discussed here :

https://github.com/prusa3d/Prusa-Firmware-Buddy/issues/4123 https://github.com/prusa3d/Prusa-Firmware-Buddy/issues/4123#issuecomment-2320276339 https://github.com/prusa3d/Prusa-Firmware-Buddy/issues/4123#issuecomment-2320309150

The slicer should at least warn the user if the sliced filename is too long, or truncate/shorten the file name in the M486 line. This will avoid triggering the problem for the normal user.

foosel commented 2 months ago

when sent through Octoprint

Correction, when going through firmware side checksum validation. This is not a problem caused or in any way related to OctoPrint.

DerMouse commented 2 months ago

when sent through Octoprint

Correction, when going through firmware side checksum validation. This is not a problem caused or in any way related to OctoPrint.

Corrected in my original post.

Jan-Soustruznik commented 1 month ago

Hello, @DerMouse , What maximum limit of the name is expected? Thank you

DerMouse commented 1 month ago

Hello, @DerMouse , What maximum limit of the name is expected? Thank you

Hello Jan. Since the M486 lines written by PrusaSlicer use the sliced filename, theoretically the sky is (almost) the limit. But I guess that, reasonably, something around 50-60 chars should be good (who in his right mind has filenames consistently longer than 60 chars, except me and this was a very very edge-case ?)