FreeCAD/FreeCAD

CAM: Job editor crashes / UI elements missing

Open

#21.258 aberto em 11 de mai. de 2025

Ver no GitHub
 (1 comment) (0 reactions) (0 assignees)C++ (5.550 forks)batch import
3rd party: QtHelp wantedMod: CAMPriority: HighStatus: ConfirmedTopic: User InterfaceType: Bug

Métricas do repositório

Stars
 (30.913 stars)
Métricas de merge de PR
 (Mesclagem média 24d 7h) (217 fundiu PRs em 30d)

Description

Is there an existing issue for this?

  • I have searched the existing issues

Problem description

From: https://github.com/FreeCAD/FreeCAD/pull/20307#issuecomment-2851439318

CAM Job editor crashes randomly in various places with similar PySide errors like RuntimeError: Internal C++ object (PySide.QtGui.QWidget) already deleted. or random UI objects missing attributes, etc. https://www.tech-artists.org/t/pyside-in-maya-internal-c-object-already-deleted-for-returned-pyside-objects/4877/6

@phaseloop suspects Firstly, unnecessary recalculation. Many ops will fully recalculate on closing even when nothing has changed or if Cancel Btn is pressed. There is very little tracking of "dirty" states. The presumably also impacts when variable changes trigger updates.

Second is the idea that error checking is not "good python style". There seems to be the idea that instead of checking whether something exists before referencing it, you just do it anyway and let it raise and exception if it fails. Then the exceptions are not trapped where they occur (that's bad practice too) and are allowed to bubble up and cause a mess later, maybe with a chain reaction of uninitialised objects.

Full version info

tbd

Subproject(s) affected?

CAM

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Guia do colaborador