Skip to content

Commit

Permalink
Fix model load in debug build
Browse files Browse the repository at this point in the history
Debug build exit with error on model load due to failed assertion (file
path redacted):

    orca-slicer: <...>/OrcaSlicer/src/libslic3r/Model.cpp:1361: void Slic3r::ModelObject::update_min_max_z(): Assertion `! this->instances.empty()' failed.

Assertion failed due to model->ensure_on_bed() being called for object
which yet to be load from file.

Do not call ensure_on_bed() for models read from file since they may be
read with no default instance.

ensure_on_bed() called later within withing Plater::load_model_objects()
for each object added.
  • Loading branch information
buzzhuzz committed Mar 23, 2024
1 parent 2841476 commit 4e46eb3
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/slic3r/GUI/Plater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4055,8 +4055,6 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
q->skip_thumbnail_invalid = false;
return empty_result;
}

model_object->ensure_on_bed(is_project_file);
}

tolal_model_count += model_idx;
Expand Down

0 comments on commit 4e46eb3

Please sign in to comment.