-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gcode viewer unhandled exception loading PS-generated gcode #6730
Comments
That's not entirely true. The issue seems to be triggered by the comments added by displaylayerprogress Octoprint plugin.
|
Ah - yes, unusually I'd downloaded that gcode from octo so I was certain it was what generated a particular print (a potential FW issue that's under investigation). I'd forgotten about that, and also I had no idea that octo plugins can modify stored files. Well spotted. But I assume that ideally those additional comments shouldn't choke the gcode viewer? |
…ed by PrusaSlicer and edited by user or 3rd part post processors by appending new lines after the config section. Show instead the same error dialog as when trying to import the config into PrusaSlicer from the same gcode file
If we detect that the code was generated by Slic3r or PrusaSlicer, we are
reading the configs from the end of the file. Thus your additional block
confuses our poor slicer.
We need to think a bit about a solution to your problem, we don't see a
straightforward fix. We may ignore the config block, but then we may not
show the print bed size correctly for example.
út 20. 7. 2021 v 18:18 odesílatel Tom Glastonbury ***@***.***>
napsal:
… Ah - yes, unusually I'd downloaded that gcode from octo so I was certain
it was what generated a particular print (a potential FW issue that's under
investigation). I'd forgotten about that, and also I had no idea that octo
plugins can modify stored files. Well spotted. But I assume that ideally
those additional comments shouldn't choke the gcode viewer?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#6730 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABMPSI5SAM4QNMSRSKDQ6W3TYWOWJANCNFSM5AVU3IXA>
.
|
How about PS emits specific start and end marker comments for its block of config comments? Then when reading, comments outside this block could be ignored. If the start and end markers are absent, then fallback to the current behaviour, thus giving backwards compatibility with "well-formed" gcode generated by earlier versions of PS/Slic3r. The start and end markers could be in standard config format so that they are simply ignored by older versions of PS. I tried surrounding the config block with:
and
and this is loaded fine by the current version of the gcode viewer - this is without the original offending comment block of course, but it demonstrates backwards compatibility for this approach. |
Improved with e947a29
If you have generated G-codes with PrusaSlicer 2.4.0-alpha0 before this commit, the delimiters are missing and you will get an error message. That's the risk of using pre-alphas. |
Implemented with PrusaSlicer 2.4.0-alpha1. |
Version
2.3.0-win64
Behavior
Drag attached gcode file onto PS, it launches gcode viewer, which then pops up a warning "Unhandled unknown exception; terminating the application.":
Click OK, then you get a PrusaSlicer Error pop up: "Internal error: Suspiciously low number of configuration values extracted from...":
The attached gcode was generated by PS 2.3.0 and has not been modified in any way. 3mf also attached.
The gcode viewer should launch and show the gcode.
Files (1).zip
The text was updated successfully, but these errors were encountered: