Fixes for Xcode 16.0 debugger crashing (with relwithdebinfo) (#6932)

* Fixes for XCode 16.0

* Merge branch 'main' into Xcode-16-debug-fixes

* Merge branch 'SoftFever:main' into Xcode-16-debug-fixes

* Merge branch 'main' into Xcode-16-debug-fixes

* Merge branch 'SoftFever:main' into Xcode-16-debug-fixes

* Merge branch 'SoftFever:main' into Xcode-16-debug-fixes

* Merge branch 'SoftFever:main' into Xcode-16-debug-fixes

* Merge branch 'main' into Xcode-16-debug-fixes
This commit is contained in:
Ioannis Giannakas 2024-12-21 16:39:21 +02:00 committed by GitHub
parent fb19c6a904
commit d7789282b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 3 deletions

View file

@ -290,7 +290,8 @@ void split_solid_surface(size_t layer_id, const SurfaceFill &fill, ExPolygons &n
[](const Line &s) { return s.a == s.b; }),
polygon_sections[section_idx].end());
std::sort(polygon_sections[section_idx].begin(), polygon_sections[section_idx].end(),
[](const Line &a, const Line &b) { return a.a.y() < b.b.y(); });
[](const Line &a, const Line &b) { if (a == b) return false; // Ensure irreflexivity
return a.a.y() < b.b.y(); });
}
Polygons reconstructed_area{};

View file

@ -3179,7 +3179,7 @@ void PerimeterGenerator::process_arachne()
// printf("Layer ID %d, Outer index %d, inner index %d, second inner index %d, maximum internal perimeter %d \n",layer_id,outer,first_internal,second_internal, max_internal);
if (outer > -1 && first_internal > -1 && second_internal > -1) { // found all three perimeters to re-order? If not the perimeters will be processed outside in.
std::vector<PerimeterGeneratorArachneExtrusion> inner_outer_extrusions; // temporary array to hold extrusions for reordering
inner_outer_extrusions.reserve(max_internal - position + 1); // reserve array containing the number of perimeters before a new island. Variables are array indexes hence need to add +1 to convert to position allocations
inner_outer_extrusions.resize(max_internal - position + 1); // reserve array containing the number of perimeters before a new island. Variables are array indexes hence need to add +1 to convert to position allocations
// printf("Allocated array size %d, max_internal index %d, start position index %d \n",max_internal-position+1,max_internal,position);
for (arr_j = max_internal; arr_j >=position; --arr_j){ // go inside out towards the external perimeter (perimeters in reverse order) and store all internal perimeters until the first one identified with inset index 2

View file

@ -2513,7 +2513,10 @@ void PrintObject::bridge_over_infill()
[](const Line &s) { return s.a == s.b; }),
polygon_sections[i].end());
std::sort(polygon_sections[i].begin(), polygon_sections[i].end(),
[](const Line &a, const Line &b) { return a.a.y() < b.b.y(); });
[](const Line &a, const Line &b) {
if (a == b) return false; // Ensure irreflexivity
return a.a.y() < b.b.y();
});
}
// reconstruct polygon from polygon sections