Skip to content
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 Crashes with Fuzzed Input #8252

Closed
1 of 2 tasks
powpingdone opened this issue Apr 28, 2022 · 4 comments
Closed
1 of 2 tasks

GCode Viewer Crashes with Fuzzed Input #8252

powpingdone opened this issue Apr 28, 2022 · 4 comments

Comments

@powpingdone
Copy link
Contributor

Description of the bug

I was doing fuzzing for a assignment for one of my classes, and I decided to do some basic fuzzing of PrusaSlicer's GCode Viewer. I found 3 gcode files that crashed that logged with a similar message:

--------------------------------------------------------------------------
Message: 20:11:42: Starting PrusaSlicer flatpak with entrypoint script
--------------------------------------------------------------------------
[2022-04-27 20:11:42.298308] [0x00007f2db9a679c0] [trace]   Initializing StaticPrintConfigs
Gtk-Message: 20:11:42.326: Failed to load module "canberra-gtk-module"
Gtk-Message: 20:11:42.326: Failed to load module "canberra-gtk-module"
[2022-04-27 20:11:43.705691] [0x00007f2db9a679c0] [error]   Unable to create bed triangles
/usr/include/c++/11.2.0/bits/stl_vector.h:1045: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = Slic3r::Polygon; _Alloc = std::allocator<Slic3r::Polygon>; std::vector<_Tp, _Alloc>::reference = Slic3r::Polygon&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__n < this->size()' failed.

Project file & How to reproduce

for_pslicer.zip

cube.gcode is a known good gcode file, the rest are ones that crash.

To Reproduce:

  1. Open any of the bad_*.gcode files.
  2. Let PrusaSlicer GCode Viewer crash.

Checklist of files included above

  • Project file
  • Screenshot

Version of PrusaSlicer

Version 2.4.1 from flathub

Operating system

Fedora Silverblue 36.20220422

Printer model

Prusa MK3S

@powpingdone
Copy link
Contributor Author

powpingdone commented Apr 28, 2022 via email

@jmd73
Copy link
Contributor

jmd73 commented Apr 28, 2022

Doh! Of course, i feel stupid now... I read your message again... Ignore my previous post...

Deleted my previous post, since it was useless.

@powpingdone
Copy link
Contributor Author

Closing this, as it is bad practice to do these sorts of drive by issues.

@powpingdone powpingdone closed this as not planned Won't fix, can't repro, duplicate, stale Nov 4, 2022
@kubispe1
Copy link
Collaborator

kubispe1 commented Dec 17, 2022

Hi, thank you for your report. I don't get your conversation... :D :D
But I want to inform you:
We add a fix to your issue to the upcoming 2.6.0. when importing invalid or corrupted G-code, a crash of the G-Code viewer should not appear. A new warning window announces the imported file issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants