Repository navigation
freecad: fix crash on GNOME/Wayland when opening/saving files by addi… - #520037
Conversation
…ng GSettings schemas to XDG_DATA_DIRS
|
Thanks, and sorry it took so long to get it merged! |
|
Successfully created backport PR for |
|
Can we maybe not merge PRs that make a conscious decision to entirely remove our template? The checkboxes for automation policy are non-optional (and neither are the others, but the AI one is the one i care about to not waste my time). |
|
@LordGrimmauld: I see that point. Looking back, yes the PR text smells like AI usage, but the git commit looked fine to me and is what I personally add most weight to. And the change is trivial. So I chose to merge, because I hate having broken software on my system. FreeCAD has apparently been broken since May, which is quite a long time. What should I have done instead? Closed the PR and said sorry, you don't follow the PR policy? And then make the same PR myself? (This is an honest question; I want to have a working FreeCAD, and once I've come across a PR like this, what should I do if not merge it?) The PR has been open since May, so there should have been plenty of time for other interested parties to review it. |
|
This seems to have only been an issue on gnome (i have been using freecad just fine until it broke to unrelated things more recently which are now fixed). Frankly, after the disaster that was the vibecoded gnome 50 PR, i mostly stopped caring about gnome in nixpkgs. Nothing of value is lost to me when ignoring LLM generated PRs. Maybe i should have put a "request changes" about adhering to our automation policy (at least putting our PR template back) and blocking on that. Opening your own PR would be fair, I'd be happy to credit a human independently arriving at the same result. Honestly, i am not entirely sure how to best respond to PRs like this while maintaining my sanity. If there is no interested parties, that is more an argument to not merge than to merge i think? |
To be honest, after having seen this PR, I would most likely make copy pasta instead of writing the patch from scratch.
But I'm an interested party, and I felt it was fine to merge :-) But I do agree use of AI should be disclosed. |
Both fixes are now upstream: - vcv-rack patch vendored in NixOS/nixpkgs#536656 - FreeCAD gsettings schema wrapper in NixOS/nixpkgs#520037 Also refresh flake.lock and drop the unused unstable-modifications overlay.
Summary
This PR fixes a critical issue where FreeCAD crashes or hangs on GNOME (specifically in Wayland sessions) whenever a file dialog is triggered (e.g., "Open", "Save", or "Save As").
Root Cause
The crash is caused by the absence of GSettings schemas in the application's environment. When FreeCAD (a Qt application) attempts to invoke the system's file portal or GTK-based dialogs, the underlying GLib/GTK libraries fail to find necessary configuration metadata (schemas), leading to a deadlock or segmentation fault.
Changes
Modified
qtWrapperArgsinpkgs/applications/science/geometry/freecad/package.nix.Prefixed
XDG_DATA_DIRSwith the paths togsettings-desktop-schemasandgtk3.Added
gsettings-desktop-schemasandgtk3to the package dependencies to ensure schema availability.Technical Details
The following environment variable is now injected into the FreeCAD wrapper:
Verification