mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-04 14:20:58 +00:00
* Fix CLI Crashes on Malformed Project, Assemble List and No-Input Runs Four CLI paths indexed vectors without checking their size and crashed with SIGSEGV on malformed input: - A project inherits_group whose length is not the filament count plus the process and printer entries was split by position. It is now ignored with a warning, as if the project had none. - An assemble list object with an empty filaments list passed validation and was then read at index 0. It is now rejected as a config error, as is a negative filament id. - --slice N --arrange 1 on a project without plate metadata read the missing plate data. It now falls back to the plate's own filaments, like the other plate data reads. - --assemble with no input model built an object with no volumes. It is now rejected as invalid parameters. A tests/cli script covers each case through the binary, since all four live inline in CLI::run(). * Move the Assemble List Parser into libslic3r Behaviour-preserving move of the --load-assemble-list JSON parser and its plate/object structs from the CLI into libslic3r/Format/AssembleList, so the format can be unit tested. The parser returns its own AssembleListResult and takes the plate limit as a parameter; CLI::run maps the result to the same exit codes as before. Every validation rule and log message is unchanged. Adds Catch2 coverage of the valid layout and each validation rule. * Keep the Process and Printer of an inherits_group of the Wrong Length A project whose inherits_group did not have one entry per filament plus the process and printer entries was loaded as if it had none. The CLI then looked for system presets under the names of the user presets, found none and refused to slice a project that slices on main. The group is now read as before: the process first, the printer last and the filaments in between, up to the filament count. A filament without an entry counts as a system preset. A group with fewer than two entries is still ignored. The warning stays.
OrcaSlicer tests
Building, running and writing tests is documented on the wiki, under How to Test.
Two files here rather than there, because coding agents only read what is in the repository: