Issue 118822 - Convert several lines with round line caps to 3D crashes, depending on the number of lines
Summary: Convert several lines with round line caps to 3D crashes, depending on the nu...
Status: CLOSED FIXED
Alias: None
Product: Draw
Classification: Application
Component: code (show other issues)
Version: 3.4.0 Beta (OOo)
Hardware: All All
: P5 (lowest) Normal (vote)
Target Milestone: ---
Assignee: Armin Le Grand
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-21 13:04 UTC by Ariel Constenla-Haile
Modified: 2017-05-20 10:31 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Test document (159.39 KB, application/vnd.oasis.opendocument.graphics)
2012-01-21 13:04 UTC, Ariel Constenla-Haile
no flags Details
GDB back-trace (12.00 KB, text/plain)
2012-01-21 13:05 UTC, Ariel Constenla-Haile
no flags Details
Some debug warnings and errors before the crash in a non-product build (300.15 KB, image/png)
2012-01-21 13:06 UTC, Ariel Constenla-Haile
no flags Details
Crash with simple lines (80.98 KB, application/vnd.oasis.opendocument.graphics)
2012-01-21 14:19 UTC, Regina Henschel
no flags Details
GDB back-trace from Regina's example (50.63 KB, text/plain)
2012-01-21 15:33 UTC, Ariel Constenla-Haile
no flags Details
3 corner polyline with line joint round (12.30 KB, application/vnd.oasis.opendocument.graphics)
2012-01-21 22:23 UTC, Regina Henschel
no flags Details
Error report (17.47 KB, text/plain)
2012-01-22 17:53 UTC, Regina Henschel
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Ariel Constenla-Haile 2012-01-21 13:04:33 UTC
Created attachment 77153 [details]
Test document

Try to convert to 3D the svg graphic in the first draw page.
AOO crahes.
Comment 1 Ariel Constenla-Haile 2012-01-21 13:05:24 UTC
Created attachment 77154 [details]
GDB back-trace
Comment 2 Ariel Constenla-Haile 2012-01-21 13:06:24 UTC
Created attachment 77155 [details]
Some debug warnings and errors before the crash in a non-product build
Comment 3 Regina Henschel 2012-01-21 14:17:09 UTC
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.
Comment 4 Regina Henschel 2012-01-21 14:19:14 UTC
Created attachment 77156 [details]
Crash with simple lines
Comment 5 Ariel Constenla-Haile 2012-01-21 15:31:28 UTC
(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.
Comment 6 Ariel Constenla-Haile 2012-01-21 15:33:33 UTC
Created attachment 77157 [details]
GDB back-trace from Regina's example
Comment 7 Armin Le Grand 2012-01-21 18:31:17 UTC
ALG: Thanks, i'll take a look on Monday...
Comment 8 Regina Henschel 2012-01-21 22:11:03 UTC
It depends on angle too. Turn the drawing by 45° and try to convert. Now it does not crash.
Comment 9 Regina Henschel 2012-01-21 22:23:39 UTC
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.
Comment 10 Regina Henschel 2012-01-22 17:53:57 UTC
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.
Comment 11 Armin Le Grand 2012-01-23 11:20:21 UTC
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.
Comment 12 Armin Le Grand 2012-01-23 11:42:34 UTC
ALG: Comitted, done.