Closed mrdeveloperdude closed 11 months ago
Probably related to https://github.com/f3d-app/f3d/issues/310 Are you using the occt plugin?
Please share your "myconfig.json" file
here is the file that was invalid for @mrdeveloperdude , but it is working well for me.
Lets consider that for this issue, the .json is just invalid and we should improve error management in this context
Original info from the Discord discussion:
Commandline looks like this:
/usr/bin/f3d --config= /tmp/1FGYnjiFIDanGgzNtCGOBT0bCfaO1fzdu_1702839294626.json /tmp/1FGYnjiFIDanGgzNtCGOBT0bCfaO1fzdu_1702839294626.stl
.stl file is present and should be valid The error output produced by f3d looks like this:"/tmp/1FGYnjiFIDanGgzNtCGOBT0bCfaO1fzdu_1702839294626.json" is not a file of a supported file format
This is a headless build of F3D, interactive rendering is not supported
(produced on stderr)
"foo.bar" is not a file of a supported file format
is the message you get when opening an invalid scene/model/3d file.
The command /usr/bin/f3d --config= foo.json bar.stl
has a space after --config=
so config
is actually ""
and foo.json
is part of the inputs. --config=foo.json
(equal and no space) or --config foo.json
(no equal) should work, assuming the json file is valid
Even though this is not a bug, possible improvements on F3D's side include:
"foo.bar" is not a file of a supported model/scene/3D file format
, could not open 3D model/scene "foo.bar" (unsupported format)
, ...--config=""
(and equivalent --config=
typo) should be invalid or at least give a warning (ideally that would mean using a proper optional type to mean "no value" internally instead of an empty string so the app can tell the difference. Or allow multiple --config
arguments so empty vector is ok but empty/blank elements can be treated as invalid or at least suspicious)Ask and you shall receive, @snoyer :)
So I did not adress the incorrect syntax --config= path/to/conf.json
. cxxops is unhelpfull so this will wait for #434
All other point raised by @snoyer have been adressed.
Describe the bug
When running f3d with an invalid json file as input to the --config commandline parameter, it exits with an error message output on stderr but returns exit code 0 to the shell, which signifies success.
The error message that f3d outputs looks like this:
This constitutes 2 distinct problems;
To Reproduce Steps to reproduce the behavior:
f3d --config=test.json
Expected behavior I expect the program to report the error and exit with a non-zero exit code such as 1
System Information: