Apache OpenOffice (AOO) Bugzilla – Issue 118822
Convert several lines with round line caps to 3D crashes, depending on the number of lines
Last modified: 2017-05-20 10:31:51 UTC
Created attachment 77153 [details] Test document Try to convert to 3D the svg graphic in the first draw page. AOO crahes.
Created attachment 77154 [details] GDB back-trace
Created attachment 77155 [details] Some debug warnings and errors before the crash in a non-product build
The problem is not the svg format, but the round line caps. I have reduced the problem in the attached document. The seven green dashes are simple lines with 'square' linecap. Mark the seven green dashes together. Convert to 3D (extrude). OK The six green dashes are simple lines with 'round' linecap. Mark the six green dashes together. Convert to 3D (extrude). OK The seven red dashes are simple lines with 'round' linecap, same as those six dashes. Mark the seven red dashes together. Convert to 3D (extrude). Crash.
Created attachment 77156 [details] Crash with simple lines
(In reply to comment #3) > The problem is not the svg format, but the round line caps. can you update the issue subject? If you don't have that privileges, let me know and I'll do it.
Created attachment 77157 [details] GDB back-trace from Regina's example
ALG: Thanks, i'll take a look on Monday...
It depends on angle too. Turn the drawing by 45° and try to convert. Now it does not crash.
Created attachment 77158 [details] 3 corner polyline with line joint round It crashes too with line joint round. It crashes already in DEV300m106. It is not introduced with the line caps but exists earlier. It seems it depends on whether the "height" or "width" of the bounding rectangle is too near to zero.
Created attachment 77159 [details] Error report OOo2.3.4 does not crash, but OOo3.1.1 crashes. The attached error report is from OOo3.1.1rc2. I don't have a version between.
ALG: Good catch. Problem during 3D geometry creation. For extrudes caps (front and back) get created by scaling the source 2D polyPolygon. Later for 3D usage it gets subdivided since 3D polygons do not support beziers. That subdivision could create polygons with different point counts due to the modified nature of the caps. To avoid that, the 2D polyPolygon needs to be subdivided when starting 3D geometry creation. Interestingly, this was already the case for rotation objects, but not yet for extrudes. ALG: Added for extrudes, checked, works well. Also added security asserts and secure accessors, so unequal point counts of slices (which work like ribs for a ship) will assert and create ugly graphics (but should be impossible now), but will not crash anymore.
ALG: Comitted, done.