gzdoom/src/utility/nodebuilder
Sally Coolatta 15521e5181 Fix a very rare crash with complex Polyobjects
If all of the worst stars align when compiling Polyobject BSP and splitting a seg into two sets:
- The very first seg in the current set fails all of the metrics for determining which side of a split it is on, and doesn't know which side it should go to. Since there are 0 are in front, it goes to front by default.
- Every other seg in the same set don't fail their metrics, and they all decide they are meant to go to the front side.
- Oops! Now there's nothing in the back side!
I've fixed this by collecting all of the undecided segs in a split, and setting the new side after the other segs. Doing it in the normal loop means there's a non-zero chance the crash prevention will fail depending on how the segs are in memory.

This can technically happen with even the most simplistic Polyobjects, but it becomes more common the more complex it is (add tons of lines, move and rotate it at the same time, so on). Quite an annoying crash since it doesn't always replicate consistently.
2023-09-15 00:13:22 +02:00
..
nodebuild.cpp Fix a very rare crash with complex Polyobjects 2023-09-15 00:13:22 +02:00
nodebuild.h Fix a very rare crash with complex Polyobjects 2023-09-15 00:13:22 +02:00
nodebuild_classify_nosse2.cpp
nodebuild_events.cpp - fixed several warnings emitted by Clang. 2023-03-26 08:48:54 +02:00
nodebuild_extract.cpp
nodebuild_gl.cpp - fixed several warnings emitted by Clang. 2023-03-26 08:48:54 +02:00
nodebuild_utility.cpp - missed some MAX's. 2021-10-30 10:45:58 +02:00