FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Don't crash in the headless CLI when a linked file is missing by dodox1 · Pull Request #1768 · solvespace/solvespace · GitHub

Don't crash in the headless CLI when a linked file is missing - #1768

Merged
phkahler merged 1 commit into
solvespace:masterfrom
dodox1:fix/headless-missing-linked-file
Sep 28, 2026
Merged

phkahler merged 1 commit into
solvespace:masterfrom
dodox1:fix/headless-missing-linked-file

Conversation

dodox1 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Loading a sketch whose linked image or sketch has moved kills any headless
build. LocateImportedFile() asks the user whether to look for the file, and
guinone.cpp has no dialogs to run: CreateMessageDialog() returns an empty
handle, which is then dereferenced. The GUI is unaffected — its window exists
before the file is loaded, so the dialog is real.

So it is solvespace-cli that dies: export-mesh, regenerate, thumbnail,
anything batch.

Answer as declining to locate it, which is the only thing a batch run can
sensibly do, and name the file on the console.

Of 171 of my own sketches, 17 died on load this way, every one because of a PNG
that had been traced over and has since moved. With this they all load, and all
17 turn out to be geometrically fine.

Repro: save a sketch with a linked image, move the image, then run
solvespace-cli export-mesh --output out.stl sketch.slvs.

phkahler commented Sep 3, 2026

Copy link
Copy Markdown
Member

A less verbose comment would be nice. Something like: When running the headless CLI version no dialog is possible so:

Also, please get the attribution changed to yourself. We've had a few PRs attributed to Claude and I want that to stop happening.

LocateImportedFile() asks the user whether to look for a linked image or
sketch that has moved, but the headless backend has no dialogs to run:
CreateMessageDialog() returns an empty handle, which was then
dereferenced. Decline to locate the file instead, and name it on the
console.

Of 171 sketches here, 17 died on load this way, each because of a PNG
that had been traced over and has since moved. The GUI is unaffected,
since its window exists before the file is loaded.
dodox1 force-pushed the fix/headless-missing-linked-file branch from 527aa16 to 0c365c4 Compare September 4, 2026 07:14

dodox1 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Both done - comment trimmed to two lines, and the attribution is gone. Sorry
about that, it won't be on anything I send here again.

dodox1 changed the title Don't die when a linked file is missing and there is no one to ask Don't crash in the headless CLI when a linked file is missing Sep 4, 2026
phkahler merged commit 2879a02 into solvespace:master Sep 28, 2026
4 checks passed

Copy link
Copy Markdown
Member

@dodox1 Thank you for this contribution.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL