SoftFever / OrcaSlicer

G-code generator for 3D printers (Bambu, Prusa, Voron, VzBot, RatRig, Creality, etc.)
https://discord.gg/P4VE9UY9gJ
GNU Affero General Public License v3.0
6k stars 679 forks source link

SegFault exiting from GCode expanded editor after searching for placeholders #5671

Open samv opened 3 weeks ago

samv commented 3 weeks ago

Is there an existing issue for this problem?

OrcaSlicer Version

2.1.0-beta

Operating System (OS)

Linux

OS Version

Ubuntu 24.04 LTS (noble)

Additional system information

This is a NUC8i7BEH with:

CPU: Intel(R) Core(TM) i7-8559U @ 2.70GHz (turbo up to 4.5GHz apparently) Memory: 32GB of DDR4 2400MHz as 2xKingston KHX2400C14S4/16G Graphics: CoffeeLake-U GT3e [Iris Plus Graphics 655] Monitor is a 5120x1440 49" Samsung UltraWide (32:9) going from the USB-C out to the DP. Model # : LS49A950U

Running at 5120x1440x59.98 24bpp xdpyinfo X extensions: BIG-REQUESTS Composite DAMAGE DOUBLE-BUFFER DPMS DRI2 DRI3 GLX Generic Event Extension MIT-SCREEN-SAVER MIT-SHM Present RANDR RECORD RENDER SECURITY SHAPE SYNC X-Resource XC-MISC XFIXES XFree86-DGA XFree86-VidModeExtension XINERAMA XInputExtension XKEYBOARD XTEST XVideo

Mesa:

$ dpkg -l | grep mesa
ii libegl-mesa0:amd64 24.0.3-1ubuntu4 amd64 free implementation of the EGL API -- Mesa vendor library ii libegl1-mesa:amd64 23.0.4-0ubuntu1~22.04.1 amd64 transitional dummy package ii libegl1-mesa-dev:amd64 24.0.5-1ubuntu1 amd64 free implementation of the EGL API -- development files ii libgl1-mesa-dri:amd64 24.0.3-1ubuntu4 amd64 free implementation of the OpenGL API -- DRI modules rc libgl1-mesa-dri:i386 24.0.1-1ubuntu1 i386 free implementation of the OpenGL API -- DRI modules ii libgl1-mesa-glx:amd64 23.0.4-0ubuntu1~22.04.1 amd64 transitional dummy package ii libglapi-mesa:amd64 24.0.3-1ubuntu4 amd64 free implementation of the GL API -- shared library ii libglu1-mesa:amd64 9.0.2-1.1build1 amd64 Mesa OpenGL utility library (GLU) ii libglu1-mesa-dev:amd64 9.0.2-1.1build1 amd64 Mesa OpenGL utility library -- development files ii libglx-mesa0:amd64 24.0.3-1ubuntu4 amd64 free implementation of the OpenGL API -- GLX vendor library ii libosmesa6:amd64 24.0.3-1ubuntu4 amd64 Mesa Off-screen rendering extension ii libosmesa6-dev:amd64 24.0.3-1ubuntu4 amd64 Mesa Off-screen rendering extension -- development files ii mesa-utils 9.0.0-2 amd64 Miscellaneous Mesa utilities -- symlinks ii mesa-utils-bin:amd64 9.0.0-2 amd64 Miscellaneous Mesa utilities -- native applications ii mesa-va-drivers:amd64 24.0.3-1ubuntu4 amd64 Mesa VA-API video acceleration drivers ii mesa-vdpau-drivers:amd64 24.0.3-1ubuntu4 amd64 Mesa VDPAU video acceleration drivers

XOrg:

$ dpkg -l "xorg" "xserver-xorg" | grep '^i' ii xorg 1:7.7+23ubuntu3 amd64 X.Org X Window System ii xorg-docs-core 1:1.7.1-1.2 all Core documentation for the X.org X Window System ii xorg-sgml-doctools 1:1.11-1.1 all Common tools for building X.Org SGML documentation ii xserver-xorg 1:7.7+23ubuntu3 amd64 X.Org X server ii xserver-xorg-core 2:21.1.12-1ubuntu1 amd64 Xorg X server - core server ii xserver-xorg-input-all 1:7.7+23ubuntu3 amd64 X.Org X server -- input driver metapackage ii xserver-xorg-input-libinput 1.4.0-1build1 amd64 X.Org X server -- libinput input driver ii xserver-xorg-input-wacom 1:1.2.0-1ubuntu2 amd64 X.Org X server -- Wacom input driver ii xserver-xorg-legacy 2:21.1.12-1ubuntu1 amd64 setuid root Xorg server wrapper ii xserver-xorg-video-all 1:7.7+23ubuntu3 amd64 X.Org X server -- output driver metapackage ii xserver-xorg-video-amdgpu 23.0.0-1build1 amd64 X.Org X server -- AMDGPU display driver ii xserver-xorg-video-ati 1:22.0.0-1build1 amd64 X.Org X server -- AMD/ATI display driver wrapper ii xserver-xorg-video-fbdev 1:0.5.0-2build2 amd64 X.Org X server -- fbdev display driver ii xserver-xorg-video-intel 2:2.99.917+git20210115-1build1 amd64 X.Org X server -- Intel i8xx, i9xx display driver ii xserver-xorg-video-nouveau 1:1.0.17-2build1 amd64 X.Org X server -- Nouveau display driver ii xserver-xorg-video-qxl 0.1.6-1build1 amd64 X.Org X server -- QXL display driver ii xserver-xorg-video-radeon 1:22.0.0-1build1 amd64 X.Org X server -- AMD/ATI Radeon display driver ii xserver-xorg-video-vesa 1:2.6.0-1 amd64 X.Org X server -- VESA display driver ii xserver-xorg-video-vmware 1:13.4.0-1build1 amd64 X.Org X server -- VMware display driver

Printer

Sovol SV06+

How to reproduce

  1. go into my printer settings
  2. go to Machine G-Code
  3. click the detailed editor view
  4. search for something cursed like "line_width" in the placeholders list
  5. click "save" or "cancel"

Actual results

Screenshot from 2024-06-11 15-19-23

Screenshot from 2024-06-11 15-05-10

Any edits are lost.

Expected results

Should crash, and potential evaluation errors (i.e., type errors, missing vector references, etc) should be highlighted in the editor before you hit save.

The contents of the editor should not be lost.

Project file & Debug log uploads

logs: orca-logs.zip

project files: don't seem to impact it really; I was working with both of these two: project-files.zip

Checklist of files to include

Anything else?

I thought this was due to the crazy machine start GCode I was entering, basically I wanted to make the initial lines for priming use the same speed and flow rate as the initial layer and retract and stuff, and I could use placeholders to sort of do this (although, can't quite do all the math without functions like sqrt). Really I just want to draw a line at the standard initial layer wall width, then move over the same width and draw a line back the other way. I thought the bug depended on having crazy GCode in the editor, but it seems even with the pictured GCode, more or less standard, I could get it to crash just by searching for certain placeholder names and then exiting the dialog (cancel or save, doesn't make a difference).

I get quite a few crashes from my system, getting all the GLX stuff to work can be a bit of a nightmare, but this one doesn't seem to be that and seems very reproducible.