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 view: 2D mode crashing on fast layer change #1315

Open
swiftgeek opened this issue Feb 10, 2023 · 4 comments
Open

Gcode view: 2D mode crashing on fast layer change #1315

swiftgeek opened this issue Feb 10, 2023 · 4 comments

Comments

@swiftgeek
Copy link
Contributor

swiftgeek commented Feb 10, 2023

Traceback (most recent call last):
  File "/home/swiftgeek/tmp/Printrun-upstream/printrun/gviz.py", line 405, in paint
    self.repaint_everything()
  File "/home/swiftgeek/tmp/Printrun-upstream/printrun/gviz.py", line 331, in repaint_everything
    dc.SelectObject(self.blitmap)
wx._core.wxAssertionError: C++ assertion "cr && cairo_status(cr) == 0" failed at /usr/src/debug/wxwidgets/wxWidgets-3.2.1/src/gtk/bitmap.cpp(1399) in CairoCreate(): 
zsh: terminated  python ./pronterface.py

First it stops rendering while displaying traceback above after attempt to change layer, and after a bit more layer change attempts crashes entire pronterface

Easiest to trigger with mouse wheel

OS: Archlinux
Python version: 3.10.9
wx-config --version: 3.2.1
wxpython: 4.2.0

@rockstorm101
Copy link
Collaborator

Hi @swiftgeek I'm unable to replicate this, does it occur with a specific .gcode file? Could you provide it? Or please be more specific on how to reproduce it

@swiftgeek
Copy link
Contributor Author

swiftgeek commented Feb 15, 2023

No specific file - I didn't find any file it doesn't occur with, simply changing layer fast with mouse wheel triggers it reliably here. Changing one layer at a time and letting it render before changing again doesn't break anything.

Similar thing happens for changing zoom level, which additionally produces following snippet as well as one above

Traceback (most recent call last):
  File "/home/swiftgeek/tmp/Printrun-upstream/printrun/gviz.py", line 405, in paint
    self.repaint_everything()
  File "/home/swiftgeek/tmp/Printrun-upstream/printrun/gviz.py", line 329, in repaint_everything
    self.blitmap = wx.Bitmap(int(width) + 1, int(height) + 1, -1)
wx._core.wxAssertionError: C++ assertion ""width > 0 && height > 0"" failed at /usr/src/debug/wxwidgets/wxWidgets-3.2.2/src/gtk/bitmap.cpp(541) in Create(): in
valid bitmap size

@rockstorm101
Copy link
Collaborator

I'm unable to replicate this then. On the "Gcode view" tool, scrolling as fast as my mouse wheel allows and changing zoom level using Ctrl+Mouse Wheel does not produce the above either.

Out of curiosity:

--
Debian Sid
Python 3.11.1
wxPython 4.2.0

@swiftgeek
Copy link
Contributor Author

swiftgeek commented Feb 15, 2023

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

No branches or pull requests

2 participants