3.4RC1 QOI thumbnail parsing fails on SBC
-
I'm now running 3.4RC1 on my Duet2Wifi with SBC.
This input file generated by Cura with the Cura-DuetRRF plugin:
CFFFP_Dont_Panic.gcodeCauses M36 to fail with an error, and the SBC throws an exception:
[debug] Waiting for execution of M36 "CFFFP_Dont_Panic.gcode" [debug] Processing M36 "CFFFP_Dont_Panic.gcode" [debug] Found Prusa Slicer QOI Image [debug] Failed to return file information DuetControlServer.Files.ImageProcessing.ImageProcessingException: Exception of type 'DuetControlServer.Files.ImageProcessing.ImageProcessingException' was thrown. at DuetControlServer.Files.ImageProcessing.PrusaSlicerImageParser.ProcessAsync(StreamReader reader, CodeParserBuffer codeParserBuffer, GCodeFileInfo parsedFileInfo, Code code, Boolean readThumbnailContent, ThumbnailInfoFormat format) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Files/ImageProcessing/PrusaSlicerImageParser.cs:line 77 at DuetControlServer.Files.InfoParser.ParseThumbnails(StreamReader reader, Code code, CodeParserBuffer codeParserBuffer, GCodeFileInfo parsedFileInfo, Boolean readThumbnailContent) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Files/InfoParser.cs:line 538 at DuetControlServer.Files.InfoParser.ParseHeader(StreamReader reader, Boolean readThumbnailContent, GCodeFileInfo partialFileInfo) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Files/InfoParser.cs:line 105 at DuetControlServer.Files.InfoParser.Parse(String fileName, Boolean readThumbnailContent) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Files/InfoParser.cs:line 51 at DuetControlServer.Codes.MCodes.Process(Code code) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Codes/MCodes.cs:line 363 [debug] Waiting for finish of M36 "CFFFP_Dont_Panic.gcode" => {"err":1} [debug] Completed M36 "CFFFP_Dont_Panic.gcode" => {"err":1}
I believe this is due to the incorrect thumbnail end tag parsing at https://github.com/Duet3D/DuetSoftwareFramework/blob/v3.4-dev/src/DuetControlServer/Files/ImageProcessing/PrusaSlicerImageParser.cs#L80.
The correct end tag is the same as the beginning tag:
thumbnail_QOI begin
andthumbnail_QOI end
See RRF change here: https://github.com/Duet3D/RepRapFirmware/commit/2f5da09e7dda9b8c95fffb572ce9a2c202b06673Also nitpick: It identifies the thumbnail as "Prusa Slicer QOI Image", while this gcode file was generated with Cura (which doesn't matter either way, so I suggest renaming the DCS source code classes to a generic name and changing the log output).
@chrishamm I've sent a PR with both changes and included a new unit test for QOI thumbnails:
https://github.com/Duet3D/DuetSoftwareFramework/pull/179 -
@resam yes we know about this. RRF and DSF source code have both been updated and we will release an update soon.
-
@dc42 Cura-DuetRRF Plugin to embed thumbnails just landed on the public Ultimaker Cura Marketplace - but due to this issue it is not yet compatible with 3.4-rc1.
So, with the next RC it should immediately work with the latest Cura plugin version v1.2.5.