mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-18 02:52:10 +00:00
Fix crashes when loading old 3MF project (#11933)
Enhance backward compatibility for filament extruder variants in 3MF project files Fix crashes when loading old 3MF project
This commit is contained in:
12
task.md
Normal file
12
task.md
Normal file
@@ -0,0 +1,12 @@
|
||||
Analyze the bug that it failed to load project(3mf) from old version.
|
||||
It failed pass below check in PresetBundle::load_config_file_config function, hence throw error.
|
||||
if (config.option("extruder_variant_list")) {
|
||||
//3mf support multiple extruder logic
|
||||
size_t extruder_count = config.option<ConfigOptionFloats>("nozzle_diameter")->values.size();
|
||||
extruder_variant_count = config.option<ConfigOptionStrings>("filament_extruder_variant", true)->size();
|
||||
if ((extruder_variant_count != filament_self_indice.size())
|
||||
|| (extruder_variant_count < num_filaments)) {
|
||||
assert(false);
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << boost::format(": invalid config file %1%, can not find suitable filament_extruder_variant or filament_self_index") % name_or_path;
|
||||
throw Slic3r::RuntimeError(std::string("Invalid configuration file: ") + name_or_path);
|
||||
}
|
||||
Reference in New Issue
Block a user