linuxserver / docker-cura

Web accessible UltiMaker Cura inside a Debian Container
GNU General Public License v3.0
9 stars 6 forks source link

[BUG] Cura crashes when slicing any object #4

Closed rursache closed 4 months ago

rursache commented 7 months ago

Is there an existing issue for this?

Current Behavior

Cura crashes when an object is sliced. A container restart is required

Expected Behavior

Cura shouldn't crash

Steps To Reproduce

  1. Use the docker run command below
  2. Open any STL object
  3. Press 'slice'
  4. Observe how Cura crashes

Environment

- OS: `Ubuntu 23.10 x86_64`
- How docker service was installed: `wget -qO - https://get.docker.com | sudo bash - && sudo usermod -aG docker $USER`

CPU architecture

x86-64

Docker creation

docker run -d \
  --name cura \
  --restart unless-stopped \
  --device /dev/dri:/dev/dri \
  --security-opt seccomp=unconfined \
  -p 3140:3000 \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Europe/Bucharest \
  -e TITLE=Cura \
  -v /home/radu/.cura:/config \
  -v "/media/radu/Media/3D Printing/1. Models":/prints/ \
  lscr.io/linuxserver/cura:latest

Container logs

[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗ 
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝ 

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

[custom-init] No custom files found, skipping...
_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.

Xvnc KasmVNC 1.2.0 - built Nov 25 2023 18:51:09
Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
See http://kasmweb.com for information on KasmVNC.
Underlying X server release 12014000, The X.Org Foundation

[ls.io-init] done.
Obt-Message: Xinerama extension is not present on the server
PyInstaller/loader/pyimod02_importers.py:352: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
QStandardPaths: wrong permissions on runtime directory /config/.XDG, 0755 instead of 0700

(UltiMaker-Cura:275): dbind-WARNING **: 16:08:37.270: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
 2023-11-26 16:08:38,545 [INFO] websocket 0: got client connection from 127.0.0.1
 2023-11-26 16:08:38,556 [PRIO] Connections: accepted: @192.168.31.13_1701007718.545740::websocket
Cyclic dependency detected between "file:///opt/cura/share/cura/resources/qml/Actions.qml" and "file:///opt/cura/share/cura/resources/qml/Actions.qml"
QQmlExpression: Expression file:///config/.local/share/cura/5.5/plugins/ElegooNeptune3Thumbnails/ElegooNeptune3Thumbnails/tools/gui.qml:293:13 depends on non-NOTIFYable properties:
    SettingsTranslator::use_current_model
QQmlExpression: Expression file:///config/.local/share/cura/5.5/plugins/ElegooNeptune3Thumbnails/ElegooNeptune3Thumbnails/tools/gui.qml:234:21 depends on non-NOTIFYable properties:
    SettingsTranslator::statistics_enabled
QQmlExpression: Expression file:///config/.local/share/cura/5.5/plugins/ElegooNeptune3Thumbnails/ElegooNeptune3Thumbnails/tools/gui.qml:217:21 depends on non-NOTIFYable properties:
    SettingsTranslator::selected_corner_option
QQmlExpression: Expression file:///config/.local/share/cura/5.5/plugins/ElegooNeptune3Thumbnails/ElegooNeptune3Thumbnails/tools/gui.qml:218:21 depends on non-NOTIFYable properties:
    SettingsTranslator::option_list
QQmlExpression: Expression file:///config/.local/share/cura/5.5/plugins/ElegooNeptune3Thumbnails/ElegooNeptune3Thumbnails/tools/gui.qml:190:21 depends on non-NOTIFYable properties:
    SettingsTranslator::selected_corner_option
QQmlExpression: Expression file:///config/.local/share/cura/5.5/plugins/ElegooNeptune3Thumbnails/ElegooNeptune3Thumbnails/tools/gui.qml:191:21 depends on non-NOTIFYable properties:
    SettingsTranslator::option_list
QQmlExpression: Expression file:///config/.local/share/cura/5.5/plugins/ElegooNeptune3Thumbnails/ElegooNeptune3Thumbnails/tools/gui.qml:163:21 depends on non-NOTIFYable properties:
    SettingsTranslator::selected_corner_option
QQmlExpression: Expression file:///config/.local/share/cura/5.5/plugins/ElegooNeptune3Thumbnails/ElegooNeptune3Thumbnails/tools/gui.qml:164:21 depends on non-NOTIFYable properties:
    SettingsTranslator::option_list
QQmlExpression: Expression file:///config/.local/share/cura/5.5/plugins/ElegooNeptune3Thumbnails/ElegooNeptune3Thumbnails/tools/gui.qml:136:21 depends on non-NOTIFYable properties:
    SettingsTranslator::selected_corner_option
QQmlExpression: Expression file:///config/.local/share/cura/5.5/plugins/ElegooNeptune3Thumbnails/ElegooNeptune3Thumbnails/tools/gui.qml:137:21 depends on non-NOTIFYable properties:
    SettingsTranslator::option_list
QQmlExpression: Expression file:///config/.local/share/cura/5.5/plugins/ElegooNeptune3Thumbnails/ElegooNeptune3Thumbnails/tools/gui.qml:109:21 depends on non-NOTIFYable properties:
    SettingsTranslator::selected_printer_model
QQmlExpression: Expression file:///config/.local/share/cura/5.5/plugins/ElegooNeptune3Thumbnails/ElegooNeptune3Thumbnails/tools/gui.qml:110:21 depends on non-NOTIFYable properties:
    SettingsTranslator::printer_model_list
QQmlExpression: Expression file:///config/.local/share/cura/5.5/plugins/ElegooNeptune3Thumbnails/ElegooNeptune3Thumbnails/tools/gui.qml:81:21 depends on non-NOTIFYable properties:
    SettingsTranslator::klipper_thumbnails_enabled
QQmlExpression: Expression file:///config/.local/share/cura/5.5/plugins/ElegooNeptune3Thumbnails/ElegooNeptune3Thumbnails/tools/gui.qml:63:21 depends on non-NOTIFYable properties:
    SettingsTranslator::thumbnails_enabled
qt.gui.imageio: libpng warning: iCCP: known incorrect sRGB profile
file:///config/.local/share/cura/5.5/plugins/PowerCost/PowerCost/PowerCostWidget.qml:13:2: QML PowerCostWidget: Binding loop detected for property "height"
file:///config/.local/share/cura/5.5/plugins/PowerCost/PowerCost/PowerCostWidget.qml:13:2: QML PowerCostWidget: Binding loop detected for property "height"
file:///config/.local/share/cura/5.5/plugins/PowerCost/PowerCost/PowerCostWidget.qml:12:2: QML PowerCostWidget: Binding loop detected for property "width"
qt.qml.context: file:///opt/cura/share/cura/resources/qml/Settings/SettingView.qml:427:16 Parameter "index" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead.
qt.svg: link #image0 is undefined!
could not load multimedia backend "gstreamer"
QtMultimedia is not currently supported on this platform or compiler.
Aborted (core dumped)

ERROR: openbox-xdg-autostart requires PyXDG to be installed
j0nnymoe commented 7 months ago

Are you using an existing config?

rursache commented 7 months ago

@j0nnymoe Are you using an existing config?

i am! it's the same config as the cura from my windows and macOS machines. my hope was to replace both with this web-based solution

j0nnymoe commented 7 months ago

I would advise starting with a fresh config. I suspect there will be minor differences between the installs. I've just tested slicing on a fresh install and working fine: image

j0nnymoe commented 7 months ago

Looking at your logs though, it could be some dependencies that are missing. What extensions have you got installed?

rursache commented 7 months ago

yes, the issue is that some extensions require dependencies. i removed the "elevated beats and slicer" and it no longer crashes but now it throws errors.

the container its of no use for me to use a different config as my printing profiles depend on extensions like elegoo thumbnail generator

j0nnymoe commented 7 months ago

If you provide the dependencies that's needed, we can look at getting them added in.

j0nnymoe commented 7 months ago

I've just tested that extension, will allow me to slice with it: image

rursache commented 7 months ago

here is the list of all my extensions used in cura (working on windows/macos) but causing issues in this container

i appreciate your time and effort!

j0nnymoe commented 7 months ago

If you could provide the error from cura log itself (not the container ones), we might be able to figure out what is missing.

rursache commented 7 months ago

for future reference, current logs are at file:///config/.local/share/cura/5.5/cura.log

@j0nnymoe here are the cura logs: https://justpaste.it/5r6z1

j0nnymoe commented 7 months ago

Are you able to trim that a bit to the specific time where it crashes please?

rursache commented 7 months ago

Are you able to trim that a bit to the specific time where it crashes please?

sure:

2023-11-26 19:03:46,816 - INFO - [MainThread] cura.CuraApplication.readLocalFile [1824]: Attempting to read file file:///prints/Objects/christmas_tree.stl
2023-11-26 19:03:46,858 - DEBUG - [JobQueueWorker [2]] UM.Mesh.MeshData.calculateNormalsFromVertices [561]: Calculating normals took 0.00646662712097168 seconds
2023-11-26 19:03:46,861 - DEBUG - [JobQueueWorker [2]] STLReader.STLReader._read [68]: Loaded a mesh with 224268 vertices
2023-11-26 19:03:46,916 - DEBUG - [JobQueueWorker [2]] UM.Mesh.MeshData.approximateConvexHull [505]: approximateConvexHull(target_count=1024) Calculating 3D convex hull took 0.05460333824157715 seconds. 84 input vertices. 84 output vertices.
2023-11-26 19:03:46,961 - DEBUG - [JobQueueWorker [2]] UM.FileHandler.ReadFileJob.run [83]: Loading file took 0.1 seconds
2023-11-26 19:03:47,043 - DEBUG - [JobQueueWorker [2]] UM.Mesh.MeshData.approximateConvexHull [505]: approximateConvexHull(target_count=1024) Calculating 3D convex hull took 0.08139872550964355 seconds. 84 input vertices. 84 output vertices.
2023-11-26 19:03:47,051 - DEBUG - [MainThread] UM.Operations.OperationStack.push [72]: <UM.Operations.AddSceneNodeOperation.AddSceneNodeOperation object at 0x7f01f2ac3850>, took 1ms
2023-11-26 19:03:47,065 - DEBUG - [MainThread] UM.Operations.OperationStack.push [72]: GroupedOp.(#=2) RotateOp.(node=<CuraSceneNode object: 'christmas_tree.stl'>,rot.=Q<0.0,0.0,0.0,w=4.0>) TranslateOp.(node=<CuraSceneNode object: 'christmas_tree.stl'>,trans.=<0.000,0.000,0.000>), took 1ms
2023-11-26 19:03:47,075 - DEBUG - [MainThread] UM.View.GL.ShaderProgram.load [61]: Loading [/opt/cura/share/uranium/resources/shaders/toolhandle.shader]...
2023-11-26 19:03:47,335 - DEBUG - [MainThread] UM.View.GL.ShaderProgram.load [61]: Loading [/opt/cura/share/cura/resources/shaders/transparent_object.shader]...
2023-11-26 19:03:48,729 - DEBUG - [JobQueueWorker [3]] UM.Operations.OperationStack.push [72]: GroupedOp.(#=1) RotateOp.(node=<CuraSceneNode object: 'christmas_tree.stl'>,rot.=Q<0.0,0.0,0.0,w=1.0>), took 4ms
2023-11-26 19:03:50,158 - INFO - [MainThread] CuraEngineBackend.CuraEngineBackend._createSnapshot [320]: Creating thumbnail image (just before slice)...
2023-11-26 19:03:50,159 - DEBUG - [MainThread] UM.Scene.Camera._preferencesChanged [255]: Changing perspective mode to perspective.
2023-11-26 19:03:50,161 - DEBUG - [MainThread] UM.View.GL.ShaderProgram.load [61]: Loading [/opt/cura/share/cura/resources/shaders/overhang.shader]...
2023-11-26 19:03:50,172 - DEBUG - [MainThread] UM.View.GL.ShaderProgram.load [61]: Loading [/opt/cura/share/cura/resources/shaders/transparent_object.shader]...
2023-11-26 19:03:50,175 - DEBUG - [MainThread] UM.View.GL.ShaderProgram.load [61]: Loading [/opt/cura/share/cura/resources/shaders/striped.shader]...
2023-11-26 19:03:50,230 - WARNING - [MainThread] cura.Snapshot.snapshot [101]: Exception: Failed to crop the snapshot!
2023-11-26 19:03:50,231 - WARNING - [MainThread] cura.Snapshot.snapshot [101]: Traceback (most recent call last):
2023-11-26 19:03:50,231 - WARNING - [MainThread] cura.Snapshot.snapshot [101]:   File "cura/Snapshot.py", line 99, in snapshot
2023-11-26 19:03:50,231 - WARNING - [MainThread] cura.Snapshot.snapshot [101]:     min_x, max_x, min_y, max_y = Snapshot.getImageBoundaries(pixel_output)
2023-11-26 19:03:50,231 - WARNING - [MainThread] cura.Snapshot.snapshot [101]:   File "cura/Snapshot.py", line 30, in getImageBoundaries
2023-11-26 19:03:50,232 - WARNING - [MainThread] cura.Snapshot.snapshot [101]:     min_y, min_x, min_a_ = numpy.amin(nonzero_pixels, axis=1)  # type: ignore
2023-11-26 19:03:50,232 - WARNING - [MainThread] cura.Snapshot.snapshot [101]:   File "<__array_function__ internals>", line 5, in amin
2023-11-26 19:03:50,232 - WARNING - [MainThread] cura.Snapshot.snapshot [101]:   File "numpy/core/fromnumeric.py", line 2879, in amin
2023-11-26 19:03:50,232 - WARNING - [MainThread] cura.Snapshot.snapshot [101]:   File "numpy/core/fromnumeric.py", line 86, in _wrapreduction
2023-11-26 19:03:50,233 - WARNING - [MainThread] cura.Snapshot.snapshot [101]: ValueError: zero-size array to reduction operation minimum which has no identity
2023-11-26 19:03:50,233 - INFO - [MainThread] cura.BackendPlugin.start [77]: Starting backend_plugin [CuraEngineTiledInfill] with command: ['/config/.local/share/cura/5.5/plugins/CuraEngineTiledInfill/CuraEngineTiledInfill/x86_64/Linux/curaengine_plugin_infill_generate', '--tiles_path', '/config/.local/share/cura/5.5/plugins/CuraEngineTiledInfill/CuraEngineTiledInfill/tiles', '--address', '127.0.0.1', '--port', '33411']
2023-11-26 19:03:50,234 - INFO - [MainThread] cura.BackendPlugin.start [84]: Logging plugin output to: /config/.local/share/cura/5.5/CuraEngineTiledInfill.log
2023-11-26 19:03:50,235 - INFO - [MainThread] CuraEngineBackend.CuraEngineBackend.slice [337]: Starting to slice...
2023-11-26 19:03:50,235 - DEBUG - [MainThread] CuraEngineBackend.CuraEngineBackend.slice [357]: Going to slice build plate [0]!
2023-11-26 19:03:50,478 - DEBUG - [MainThread] CuraEngineBackend.CuraEngineBackend._onStartSliceCompleted [569]: Sending slice message took 0.24187684059143066 seconds
2023-11-26 19:03:50,583 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] [2023-11-26 19:03:50.582] [info] Create local channel on port 33411.
2023-11-26 19:03:50,584 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] [2023-11-26 19:03:50.584] [info] Using plugin: '-' running at [127.0.0.1:33411] for slot InfillGenerateService
2023-11-26 19:03:50,584 - DEBUG - [EngineErrorThread] UM.Backend.Backend._backendLog [140]: [Backend] terminate called after throwing an instance of 'cura::plugins::exceptions::RemoteException'
2023-11-26 19:03:50,584 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] [2023-11-26 19:03:50.584] [error] failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:33411: Failed to connect to remote host: Connection refused
2023-11-26 19:03:50,584 - DEBUG - [EngineErrorThread] UM.Backend.Backend._backendLog [140]: [Backend] what():  Remote exception on Slot 'InfillGenerateService': failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:33411: Failed to connect to remote host: Connection refused
2023-11-26 19:03:50,669 - ERROR - [MainThread] CuraEngineBackend.CuraEngineBackend._onBackendQuit [1027]: Backend exited abnormally with return code -6!
2023-11-26 19:03:50,670 - DEBUG - [MainThread] cura.BackendPlugin.stop [130]: EnginePlugin: CuraEngineTiledInfill was killed. Received return code 1
2023-11-26 19:03:50,670 - DEBUG - [MainThread] CuraEngineBackend.CuraEngineBackend._terminate [410]: Attempting to kill the engine process
2023-11-26 19:03:50,671 - DEBUG - [MainThread] CuraEngineBackend.CuraEngineBackend._terminate [416]: Killing engine process
2023-11-26 19:03:50,671 - DEBUG - [MainThread] CuraEngineBackend.CuraEngineBackend._terminate [419]: Engine process is killed. Received return code -6
2023-11-26 19:03:50,671 - DEBUG - [MainThread] UM.Backend.Backend._createSocket [294]: Previous socket existed. Closing that first.
2023-11-26 19:03:50,672 - DEBUG - [MainThread] UM.Backend.Backend._logSocketState [232]: Socket state changed to Listening
2023-11-26 19:03:50,681 - INFO - [MainThread] UM.Backend.Backend.startEngine [96]: Started engine process: /opt/cura/CuraEngine
2023-11-26 19:03:50,681 - DEBUG - [MainThread] UM.Backend.Backend._backendLog [140]: [Backend] Calling engine with: ['/opt/cura/CuraEngine', 'connect', '127.0.0.1:49674', '']
2023-11-26 19:03:50,684 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] 
2023-11-26 19:03:50,684 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] Cura_SteamEngine version 5.5.0
2023-11-26 19:03:50,684 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] Copyright (C) 2023 Ultimaker
2023-11-26 19:03:50,684 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] 
2023-11-26 19:03:50,685 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] This program is free software: you can redistribute it and/or modify
2023-11-26 19:03:50,685 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] it under the terms of the GNU Affero General Public License as published by
2023-11-26 19:03:50,685 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] the Free Software Foundation, either version 3 of the License, or
2023-11-26 19:03:50,685 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] (at your option) any later version.
2023-11-26 19:03:50,685 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] 
2023-11-26 19:03:50,685 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] This program is distributed in the hope that it will be useful,
2023-11-26 19:03:50,685 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] but WITHOUT ANY WARRANTY; without even the implied warranty of
2023-11-26 19:03:50,686 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2023-11-26 19:03:50,686 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] GNU Affero General Public License for more details.
2023-11-26 19:03:50,686 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] 
2023-11-26 19:03:50,686 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] You should have received a copy of the GNU Affero General Public License
2023-11-26 19:03:50,686 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] along with this program.  If not, see <http://www.gnu.org/licenses/>.
2023-11-26 19:03:50,686 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] [2023-11-26 19:03:50.683] [info] Connecting to 127.0.0.1:49674
2023-11-26 19:03:50,692 - DEBUG - [MainThread] UM.Backend.Backend._logSocketState [236]: Socket state changed to Connected
2023-11-26 19:03:50,692 - DEBUG - [MainThread] UM.Backend.Backend._onSocketStateChanged [225]: Backend connected on port 49674
2023-11-26 19:03:50,784 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] [2023-11-26 19:03:50.784] [info] Connected to 127.0.0.1:49674

seems related to a thumbnail generation..

2023-11-26 19:03:50,230 - WARNING - [MainThread] cura.Snapshot.snapshot [101]: Exception: Failed to crop the snapshot!
2023-11-26 19:03:50,231 - WARNING - [MainThread] cura.Snapshot.snapshot [101]: Traceback (most recent call last):
2023-11-26 19:03:50,231 - WARNING - [MainThread] cura.Snapshot.snapshot [101]:   File "cura/Snapshot.py", line 99, in snapshot
2023-11-26 19:03:50,231 - WARNING - [MainThread] cura.Snapshot.snapshot [101]:     min_x, max_x, min_y, max_y = Snapshot.getImageBoundaries(pixel_output)
2023-11-26 19:03:50,231 - WARNING - [MainThread] cura.Snapshot.snapshot [101]:   File "cura/Snapshot.py", line 30, in getImageBoundaries
2023-11-26 19:03:50,232 - WARNING - [MainThread] cura.Snapshot.snapshot [101]:     min_y, min_x, min_a_ = numpy.amin(nonzero_pixels, axis=1)  # type: ignore
2023-11-26 19:03:50,232 - WARNING - [MainThread] cura.Snapshot.snapshot [101]:   File "<__array_function__ internals>", line 5, in amin
2023-11-26 19:03:50,232 - WARNING - [MainThread] cura.Snapshot.snapshot [101]:   File "numpy/core/fromnumeric.py", line 2879, in amin
2023-11-26 19:03:50,232 - WARNING - [MainThread] cura.Snapshot.snapshot [101]:   File "numpy/core/fromnumeric.py", line 86, in _wrapreduction
j0nnymoe commented 7 months ago

Curious, if you start with a fresh config, install the extensions you need, does it crash in the same way?

thelamer commented 7 months ago

@rursache does this tag work? lsiodev/cura:5.5.0-pkg-26791c3a-dev-9dae4a4e6eb2a2bfe6f7976c4733e321d160a6de

rursache commented 7 months ago

@j0nnymoe Curious, if you start with a fresh config, install the extensions you need, does it crash in the same way?

on a fresh cura install, the issue is not happening

@thelamer does this tag work? lsiodev/cura:5.5.0-pkg-26791c3a-dev-9dae4a4e6eb2a2bfe6f7976c4733e321d160a6de

still fails with the same UI error and this new errors in the logs:

2023-11-26 21:49:18,169 - INFO - [MainThread] CuraEngineBackend.CuraEngineBackend._createSnapshot [320]: Creating thumbnail image (just before slice)...
2023-11-26 21:49:18,171 - DEBUG - [MainThread] UM.Scene.Camera._preferencesChanged [255]: Changing perspective mode to perspective.
2023-11-26 21:49:18,174 - DEBUG - [MainThread] UM.View.GL.ShaderProgram.load [61]: Loading [/opt/cura/share/cura/resources/shaders/overhang.shader]...
2023-11-26 21:49:18,178 - DEBUG - [MainThread] UM.View.GL.ShaderProgram.load [61]: Loading [/opt/cura/share/cura/resources/shaders/transparent_object.shader]...
2023-11-26 21:49:18,180 - DEBUG - [MainThread] UM.View.GL.ShaderProgram.load [61]: Loading [/opt/cura/share/cura/resources/shaders/striped.shader]...
2023-11-26 21:49:18,246 - WARNING - [MainThread] cura.Snapshot.snapshot [101]: Exception: Failed to crop the snapshot!
2023-11-26 21:49:18,247 - WARNING - [MainThread] cura.Snapshot.snapshot [101]: Traceback (most recent call last):
2023-11-26 21:49:18,247 - WARNING - [MainThread] cura.Snapshot.snapshot [101]:   File "cura/Snapshot.py", line 99, in snapshot
2023-11-26 21:49:18,247 - WARNING - [MainThread] cura.Snapshot.snapshot [101]:     min_x, max_x, min_y, max_y = Snapshot.getImageBoundaries(pixel_output)
2023-11-26 21:49:18,248 - WARNING - [MainThread] cura.Snapshot.snapshot [101]:   File "cura/Snapshot.py", line 30, in getImageBoundaries
2023-11-26 21:49:18,248 - WARNING - [MainThread] cura.Snapshot.snapshot [101]:     min_y, min_x, min_a_ = numpy.amin(nonzero_pixels, axis=1)  # type: ignore
2023-11-26 21:49:18,248 - WARNING - [MainThread] cura.Snapshot.snapshot [101]:   File "<__array_function__ internals>", line 5, in amin
2023-11-26 21:49:18,248 - WARNING - [MainThread] cura.Snapshot.snapshot [101]:   File "numpy/core/fromnumeric.py", line 2879, in amin
2023-11-26 21:49:18,249 - WARNING - [MainThread] cura.Snapshot.snapshot [101]:   File "numpy/core/fromnumeric.py", line 86, in _wrapreduction
2023-11-26 21:49:18,249 - WARNING - [MainThread] cura.Snapshot.snapshot [101]: ValueError: zero-size array to reduction operation minimum which has no identity
2023-11-26 21:49:18,250 - INFO - [MainThread] cura.BackendPlugin.start [77]: Starting backend_plugin [CuraEngineTiledInfill] with command: ['/config/.local/share/cura/5.5/plugins/CuraEngineTiledInfill/CuraEngineTiledInfill/x86_64/Linux/curaengine_plugin_infill_generate', '--tiles_path', '/config/.local/share/cura/5.5/plugins/CuraEngineTiledInfill/CuraEngineTiledInfill/tiles', '--address', '127.0.0.1', '--port', '46253']
2023-11-26 21:49:18,250 - INFO - [MainThread] cura.BackendPlugin.start [84]: Logging plugin output to: /config/.local/share/cura/5.5/CuraEngineTiledInfill.log
2023-11-26 21:49:18,259 - INFO - [MainThread] CuraEngineBackend.CuraEngineBackend.slice [337]: Starting to slice...
2023-11-26 21:49:18,259 - DEBUG - [MainThread] CuraEngineBackend.CuraEngineBackend.slice [357]: Going to slice build plate [0]!
2023-11-26 21:49:18,508 - DEBUG - [MainThread] CuraEngineBackend.CuraEngineBackend._onStartSliceCompleted [569]: Sending slice message took 0.249359130859375 seconds
2023-11-26 21:49:18,521 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] [2023-11-26 21:49:18.520] [info] Create local channel on port 46253.
2023-11-26 21:49:18,522 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] [2023-11-26 21:49:18.522] [info] Using plugin: '-' running at [127.0.0.1:46253] for slot InfillGenerateService
2023-11-26 21:49:18,522 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] [2023-11-26 21:49:18.522] [error] failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:46253: Failed to connect to remote host: Connection refused
2023-11-26 21:49:18,523 - DEBUG - [EngineErrorThread] UM.Backend.Backend._backendLog [140]: [Backend] terminate called after throwing an instance of 'cura::plugins::exceptions::RemoteException'
2023-11-26 21:49:18,523 - DEBUG - [EngineErrorThread] UM.Backend.Backend._backendLog [140]: [Backend] what():  Remote exception on Slot 'InfillGenerateService': failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:46253: Failed to connect to remote host: Connection refused
2023-11-26 21:49:18,668 - ERROR - [MainThread] CuraEngineBackend.CuraEngineBackend._onBackendQuit [1027]: Backend exited abnormally with return code -6!
2023-11-26 21:49:18,670 - DEBUG - [MainThread] cura.BackendPlugin.stop [130]: EnginePlugin: CuraEngineTiledInfill was killed. Received return code 1
2023-11-26 21:49:18,670 - DEBUG - [MainThread] CuraEngineBackend.CuraEngineBackend._terminate [410]: Attempting to kill the engine process
2023-11-26 21:49:18,671 - DEBUG - [MainThread] CuraEngineBackend.CuraEngineBackend._terminate [416]: Killing engine process
2023-11-26 21:49:18,671 - DEBUG - [MainThread] CuraEngineBackend.CuraEngineBackend._terminate [419]: Engine process is killed. Received return code -6
2023-11-26 21:49:18,671 - DEBUG - [MainThread] UM.Backend.Backend._createSocket [294]: Previous socket existed. Closing that first.
2023-11-26 21:49:18,673 - DEBUG - [MainThread] UM.Backend.Backend._logSocketState [232]: Socket state changed to Listening
2023-11-26 21:49:18,675 - INFO - [MainThread] UM.Backend.Backend.startEngine [96]: Started engine process: /opt/cura/CuraEngine
2023-11-26 21:49:18,675 - DEBUG - [MainThread] UM.Backend.Backend._backendLog [140]: [Backend] Calling engine with: ['/opt/cura/CuraEngine', 'connect', '127.0.0.1:49674', '']
2023-11-26 21:49:18,679 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] 
2023-11-26 21:49:18,679 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] Cura_SteamEngine version 5.5.0
2023-11-26 21:49:18,680 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] Copyright (C) 2023 Ultimaker
2023-11-26 21:49:18,680 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] 
2023-11-26 21:49:18,680 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] This program is free software: you can redistribute it and/or modify
2023-11-26 21:49:18,680 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] it under the terms of the GNU Affero General Public License as published by
2023-11-26 21:49:18,680 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] the Free Software Foundation, either version 3 of the License, or
2023-11-26 21:49:18,681 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] (at your option) any later version.
2023-11-26 21:49:18,681 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] 
2023-11-26 21:49:18,681 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] This program is distributed in the hope that it will be useful,
2023-11-26 21:49:18,681 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] but WITHOUT ANY WARRANTY; without even the implied warranty of
2023-11-26 21:49:18,681 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2023-11-26 21:49:18,682 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] GNU Affero General Public License for more details.
2023-11-26 21:49:18,682 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] 
2023-11-26 21:49:18,682 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] You should have received a copy of the GNU Affero General Public License
2023-11-26 21:49:18,682 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] along with this program.  If not, see <http://www.gnu.org/licenses/>.
2023-11-26 21:49:18,682 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] [2023-11-26 21:49:18.679] [info] Connecting to 127.0.0.1:49674
2023-11-26 21:49:18,687 - DEBUG - [MainThread] UM.Backend.Backend._logSocketState [236]: Socket state changed to Connected
2023-11-26 21:49:18,687 - DEBUG - [MainThread] UM.Backend.Backend._onSocketStateChanged [225]: Backend connected on port 49674
2023-11-26 21:49:18,779 - DEBUG - [EngineOutputThread] UM.Backend.Backend._backendLog [140]: [Backend] [2023-11-26 21:49:18.779] [info] Connected to 127.0.0.1:49674
2023-11-26 21:49:22,711 - DEBUG - [MainThread] cura.AutoSave._onTimeout [64]: Autosaving preferences, instances and profiles took 0.03201103210449219 seconds
2023-11-26 21:50:12,988 - DEBUG - [MainThread] UM3NetworkPrinting.src.Cloud.CloudOutputDeviceManager._onGetRemoteClustersFinished [169]: Synced cloud printers with account.
thelamer commented 7 months ago

Your error seems to be this:

2023-11-26 21:49:18,246 - WARNING - [MainThread] cura.Snapshot.snapshot [101]: Exception: Failed to crop the snapshot!
2023-11-26 21:49:18,247 - WARNING - [MainThread] cura.Snapshot.snapshot [101]: Traceback (most recent call last):
2023-11-26 21:49:18,247 - WARNING - [MainThread] cura.Snapshot.snapshot [101]:   File "cura/Snapshot.py", line 99, in snapshot
2023-11-26 21:49:18,247 - WARNING - [MainThread] cura.Snapshot.snapshot [101]:     min_x, max_x, min_y, max_y = Snapshot.getImageBoundaries(pixel_output)
2023-11-26 21:49:18,248 - WARNING - [MainThread] cura.Snapshot.snapshot [101]:   File "cura/Snapshot.py", line 30, in getImageBoundaries
2023-11-26 21:49:18,248 - WARNING - [MainThread] cura.Snapshot.snapshot [101]:     min_y, min_x, min_a_ = numpy.amin(nonzero_pixels, axis=1)  # type: ignore
2023-11-26 21:49:18,248 - WARNING - [MainThread] cura.Snapshot.snapshot [101]:   File "<__array_function__ internals>", line 5, in amin
2023-11-26 21:49:18,248 - WARNING - [MainThread] cura.Snapshot.snapshot [101]:   File "numpy/core/fromnumeric.py", line 2879, in amin
2023-11-26 21:49:18,249 - WARNING - [MainThread] cura.Snapshot.snapshot [101]:   File "numpy/core/fromnumeric.py", line 86, in _wrapreduction
2023-11-26 21:49:18,249 - WARNING - [MainThread] cura.Snapshot.snapshot [101]: ValueError: zero-size array to reduction operation minimum which has no identity

I wonder if this is just a Linux thing, if you are waiting for us to figure out this specific issue with these specific plugins I wouldn't. Not to be a downer but I made this image for another team member that has a 3d printer, my ability to troubleshoot is very limited and basically boils down to clear errors like you posted in your first message in this thread:

could not load multimedia backend "gstreamer"

That is the sys dep I installed in that development version to get it in sync with bambu studio and orcaslicer from a base packages perspective. You gotta keep digging if you want this to work is all I am trying to say, maybe something more clear than a python error that does not point to anything I can change with the image.

rursache commented 7 months ago

@thelamer i appreciate the effort.

until today I used the mikeah/cura-novnc:latest cura docker container and it worked as expected with the same exact extensions and configs. however the gpu acceleration wasn't working for me.

i happily migrated to the linuxserver image as i'm a big fan of your work. maybe that container does something special?

unfortunately i'm not docker-literate enough to dig into this further 😞

thelamer commented 7 months ago

You could try running these commands to install all the packages and relaunch cura: (the image has passwordless sudo by default and stuff can be accessed by right clicking the desktop) https://github.com/helfrichmichael/cura-novnc/blob/main/Dockerfile#L20-L23

There is no way that image has GPU acceleration it is simply not possible using a virtual framebuffer (xvfb) and a version of noVNC from 2019, afaik dri3 support is exclusive to KasmVNC, but is Intel and AMD only.

sudo apt update && sudo apt install -y --no-install-recommends --allow-unauthenticated \
        lxde gtk2-engines-murrine gtk2-engines-pixbuf gtk2-engines-murrine arc-theme \
        libgtk2.0-dev libwx-perl libxmu-dev libgl1-mesa-glx libgl1-mesa-dri  \
        xdg-utils locales locales-all pcmanfm jq curl git firefox-esr qtbase5-dev
rursache commented 7 months ago

@thelamer There is no way that image has GPU acceleration

oh, I know. never expected it. I was just the reason I wanted to move to the LS container.


I managed to find the culprit extension.

With "CuraEngineTiledInfill" enabled, the slicing errors occur. with it disabled, it works (both the latest and the dev tag from above).

Not sure if its worth digging into it more however considering its an official extension... you might wanna consider it? It could also collide somehow with the other extensions but I'm glad I got it working in the end.

Unsure if I should close the issue or not, please do as you consider. Thanks again to everyone for the effort!

thelamer commented 7 months ago

I think it is worth running these installs and seeing if it is one of the packages. This is a kitchen sink approach as these commands install a ton of stuff, but it would help us understand if it is a package disconnect:

rursache commented 7 months ago

@thelamer I think it is worth running these installs and seeing if it is one of the packages.

i tried this and it didn't work, the error would be the same as before installing the packages. i also restarted the container after installing the packages

thelamer commented 7 months ago

@rursache looks like this might be known: https://github.com/Ultimaker/CuraEngine_plugin_infill_generate/issues/7

It might just be a general incompatibility with Bookworm, the image you referenced with noVNC is based on buster.

LinuxServer-CI commented 6 months ago

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 3 months ago

This issue is locked due to inactivity