FS#62133 - [cura] Segfault when entering preview mode.
Attached to Project:
Community Packages
Opened by Johannes E (JohannesE) - Monday, 25 March 2019, 06:47 GMT
Last edited by Jelle van der Waa (jelly) - Friday, 30 September 2022, 09:48 GMT
Opened by Johannes E (JohannesE) - Monday, 25 March 2019, 06:47 GMT
Last edited by Jelle van der Waa (jelly) - Friday, 30 September 2022, 09:48 GMT
|
Details
Description:
Cura crashes when entering preview mode. This does not happen when using the upstream AppImage. Additional info: * package version(s): cura 4.0.0-1 * config and/or log files etc: 2019-03-25 07:44:13,101 - DEBUG - [MainThread] UM.Controller.setActiveStage [159]: Setting active stage to PreviewStage 2019-03-25 07:44:13,113 - DEBUG - [MainThread] UM.Controller.setActiveView [92]: Setting active view to SimulationView 2019-03-25 07:44:13,114 - INFO - [MainThread] STLReader.STLReader.load_file [54]: Using legacy code to load STL data. 2019-03-25 07:44:13,151 - DEBUG - [MainThread] UM.Mesh.MeshData.calculateNormalsFromVertices [444]: Calculating normals took 0.0008141994476318359 seconds 2019-03-25 07:44:13,164 - DEBUG - [MainThread] UM.Mesh.MeshData.approximateConvexHull [401]: approximateConvexHull(target_count=1024) Calculating 3D convex hull took 0.011868715286254883 seconds. 351 input vertices. 351 output vertices. 2019-03-25 07:44:13,165 - DEBUG - [MainThread] STLReader.STLReader._read [97]: Loaded a mesh with 12612 vertices 2019-03-25 07:44:13,168 - DEBUG - [MainThread] UM.View.GL.ShaderProgram.load [55]: Loading shader file [/lib/cura/plugins/SimulationView/simulationview_composite.shader]... [1] 18632 segmentation fault (core dumped) cura * link to upstream bug report, if any https://github.com/Ultimaker/Cura/issues/5488 Steps to reproduce: Open cura, load an STL-file, click slice, click preview. |
This task depends upon
Closed by Jelle van der Waa (jelly)
Friday, 30 September 2022, 09:48 GMT
Reason for closing: Won't fix
Additional comments about closing: cura is now in the AUR
Friday, 30 September 2022, 09:48 GMT
Reason for closing: Won't fix
Additional comments about closing: cura is now in the AUR
It also solves some UI glitches I had, only drawback is that I loose the KDE file selection dialog.
I suspect it's another bug that is unrelated to this current bug. i.e.
* https://bugs.archlinux.org/task/63077
* https://github.com/Ultimaker/Cura/issues/6008
EDIT: so oddly enough, while the KDE version crashes on preview, somehow it protects against the linked bug.
EDIT2: follow the Arch task link for the fix. After this, the `env` fix works again.
EDIT3: the updated version of uranium incorporates this fix for the linked bug. FWIW the newer versions of cura (4.1.0-2 and 4.2.0-1) still exhibit the bug described on this page.
--- /tmp/cura.old 2019-08-09 10:45:18.382853186 +0200
+++ /bin/cura 2019-08-09 10:48:56.933820151 +0200
@@ -53,6 +53,11 @@
# GLES-only systems (e.g. ARM Mali) do not have libGL, ignore error
pass
+ # WORKAROUND: https://bugs.archlinux.org/task/62133
+ os.environ.pop("DESKTOP_SESSION", None)
+ os.environ.pop("KDE_FULL_SESSION", None)
+ os.environ.pop("XDG_CURRENT_DESKTOP", None)
+
# When frozen, i.e. installer version, don't let PYTHONPATH mess up the search path for DLLs.
if Platform.isWindows() and hasattr(sys, "frozen"):
try:
Also, I tried your patch, but cura does not launch, with the following error:
Traceback (most recent call last):
File "/usr/bin/cura", line 57, in <module>
del os.environ["DESKTOP_SESSION"]
File "/usr/lib/python3.7/os.py", line 694, in __delitem__
raise KeyError(key) from None
KeyError: 'DESKTOP_SESSION'
Also, I can report that now with either this or the env workarounds, the issues I reported above with the buggy UI [a] are not longer a problem. Is this workaround possibly worth reporting upstream [b]?
[a] https://bugs.archlinux.org/task/62133#comment179561
[b] https://github.com/Ultimaker/Cura/issues/5488
Since it seems like this isn't being addressed upstream, maybe the patch could be incorporated into the package for now? At the moment, the Cura package isn't really usable on a basic KDE/Breeze setup.
[a] https://github.com/Ultimaker/Cura/issues/5488#issuecomment-480687191
[b] https://github.com/Ultimaker/Cura/pull/7139
[1]: https://github.com/Ultimaker/Cura/pull/7139