Cura/cura
Ghostkeeper 9dba4d554f
Fix segfault when arranging without any disallowed areas
So libnest2d is giving a segfault when it's being triggered without any disallowed areas. This is because we then give a single disallowed area for the border around the build plate, and give this disallowed area 0 vertices. Because libnest2d doesn't do defensive coding here, it's going to crash, taking Cura along with it. The crash is in libnest2d's function 'libnest2d::_Item<ClipperLib::Polygon>::rightmostTopVertex()'.

This segfault started happening recently in Cura. However it only happens when there are no disallowed areas. Steps to reproduce the error are:
- Use Custom FFF Printer.
- Set the Adhesion Type setting to 'None'.
- Load any two models.

I tracked the segfault down to this commit: 74ddbaab4b . That commit by itself is slightly mysterious but looks fine to me. It did give the hint that this segfault might be caused by empty polygons though. So for that reason, I figured that filtering out the empty polygons here in the arranger might fix it; and indeed it does. Passing empty polygons as fixed/disallowed areas is useless and invalid anyway. Apparently libnest2d doesn't deal well with it, but we might as well not send those polygons over then.
2021-04-14 00:32:50 +02:00
..
API Delete the auth data on upgrade from 4.8 if the scope doesn't match 2021-04-08 12:46:52 +02:00
Arranging Fix segfault when arranging without any disallowed areas 2021-04-14 00:32:50 +02:00
Backups Obfuscate sensitive preference data from the back-up 2021-03-17 08:54:16 +01:00
Machines Allow setting visibilities to be upgraded 2021-04-01 16:15:47 +02:00
OAuth2 Change the OS_X keyring backend module to macOS 2021-04-09 17:14:32 +02:00
Operations Remove trailing whitespace from Python files 2020-05-29 14:30:33 +02:00
PrinterOutput Prevent division by 0 if total download size is 0 2020-07-06 17:23:58 +02:00
ReaderWriters Remove trailing whitespace from Python files 2020-05-29 14:30:33 +02:00
Scene Cache wasn't valid due to a reference being stored, not a copy. 2020-10-09 13:39:53 +02:00
Settings Clean up invalid quality changes robust to asynchronous changes 2021-03-16 16:36:01 +01:00
Stages Move CuraStage back to where plugins expect it. 2019-03-29 13:11:03 +01:00
TaskManagement Move HttpRequestManager to Uranium 2020-01-03 08:59:29 +01:00
UI Transfer the "What's new" and "Changelog" pages at the end of wizard 2021-03-25 13:29:17 +01:00
UltimakerCloud Not logged in for API calls is not a warning 2020-10-16 14:15:18 +02:00
Utils Remove trailing whitespace from Python files 2020-05-29 14:30:33 +02:00
__init__.py T466: Revert the previous commit since it messed up the file rights. 2016-12-23 15:53:15 -05:00
ApplicationMetadata.py Increment SDK version to 7.5.0 2021-04-06 13:28:08 +02:00
AutoSave.py Remove unneeded call to autosave trigger on initializaiton 2020-06-18 17:59:35 +02:00
BuildVolume.py Ensure that the skirt_brim_line_width is selected from right extruder 2020-12-18 11:31:55 +01:00
CameraAnimation.py Merge pull request #905 from Ultimaker/snappier_camera_animation 2017-10-24 10:36:55 +02:00
CrashHandler.py Apply bitmask to user scope 2020-09-08 02:00:58 +02:00
CuraActions.py Update bugreport link 2020-09-07 10:47:52 +02:00
CuraApplication.py Bumped up the Preference version to 7 2021-04-02 14:41:52 +02:00
CuraPackageManager.py Merge remote-tracking branch 'origin/master' into doxygen_to_restructuredtext_comments 2020-05-28 17:31:24 +02:00
CuraVersion.py.in Add the CURA_DIGITAL_FACTORY_URL variable 2020-09-14 21:15:32 +02:00
CuraView.py Fix bunch of issues found by pylint 2020-01-10 16:37:46 +01:00
Layer.py Remove trailing whitespace from Python files 2020-05-29 14:30:33 +02:00
LayerData.py Remove trailing whitespace from Python files 2020-05-29 14:30:33 +02:00
LayerDataBuilder.py Remove trailing whitespace from Python files 2020-05-29 14:30:33 +02:00
LayerDataDecorator.py Converted comments in dir Cura/cura to rst style 2020-04-21 16:58:45 +02:00
LayerPolygon.py Fix mypy issues caused by numpy upgrade 2021-04-07 11:47:52 +02:00
MachineAction.py Remove trailing whitespace from Python files 2020-05-29 14:30:33 +02:00
MultiplyObjectsJob.py Modify arrange() to optionally create AddSceneNodeOperations 2020-10-09 17:12:59 +02:00
OneAtATimeIterator.py Exclude objects outside buildplate from OneAtATimeIterator 2020-10-14 17:14:38 +02:00
PickingPass.py Pass the cached normal transformation to the rendere 2020-06-30 13:39:32 +02:00
PlatformPhysics.py Remove trailing whitespace from Python files 2020-05-29 14:30:33 +02:00
PreviewPass.py Revert "Revert "Merge branch '4.7' of github.com:Ultimaker/Cura into 4.7"" 2020-08-20 16:35:52 +02:00
PrinterOutputDevice.py Fix typo in a log warning message 2019-05-16 12:04:26 +02:00
PrintJobPreviewImageProvider.py Converted comments in dir Cura/cura to rst style 2020-04-21 16:58:45 +02:00
SingleInstance.py Consider user preference when opening project files from cli. 2019-10-01 11:54:53 +02:00
Snapshot.py Fix mypy issues caused by numpy upgrade 2021-04-07 11:47:52 +02:00
XRayPass.py Pass the cached normal transformation to the rendere 2020-06-30 13:39:32 +02:00