Issue 122912 - [SVG] Crash with special svg-image
Summary: [SVG] Crash with special svg-image
Alias: None
Product: Draw
Classification: Application
Component: code (show other issues)
Version: 4.0.0
Hardware: All All
: P3 Normal (vote)
Target Milestone: ---
Assignee: Armin Le Grand
QA Contact:
Keywords: regression
Depends on: 122600
  Show dependency tree
Reported: 2013-07-31 13:45 UTC by Regina Henschel
Modified: 2017-05-20 10:35 UTC (History)
3 users (show)

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

File to reproduce crash (623 bytes, image/svg+xml)
2013-07-31 13:45 UTC, Regina Henschel
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Regina Henschel 2013-07-31 13:45:04 UTC
Created attachment 81215 [details]
File to reproduce crash

The attached svg-documents has no viewBox on the outermost svg-element and an inner svg-element with relative width. In resolving the relative width it gets the outermost svg-element and then with getViewBox() its viewBox. But in this case getViewBox() results Null, so that the following ->getWidth() crashes.

file: svgio\source\svgreader\svgsvgnode.cxx

I'm currently working in that area and want to discuss a solution.
Comment 1 Rainer Bielefeld 2013-08-09 09:28:02 UTC
Reproducible with  "AOO 4.0.0 – German UI / German locale  [AOO400m3(Build:9702)  -  Rev. 1503704 2013-07-16 14:54:56 (Di, 16 Jul 2013)]" on German German WIN7 Home Premium (64bit)", Common 4.0-dev User Profile:

1. From AOO Start Center menu 'File -> Open -> Browse for reporter's sample 
   document -> <Open>
  Bug: CRASH, document recovery appears

Additional info:
a) As to be expected also crashes when you use menu 'Insert -> Picture from File'
b) Competitors:
   No crash with LibO 4.2 (what shows picture Wrongly)
   No Crash with Calligra Carbon (what shows picture Wrongly)
   Softmaker FreeOffice does not support SVG
Comment 2 Rainer Bielefeld 2013-08-09 09:31:12 UTC
Was not a problem with AOO 3.4.0, 3.4.1
Comment 3 Regina Henschel 2013-08-09 10:08:06 UTC
Fix is contained in patch in bug 122600. Patch is waiting for review.
Comment 4 Regina Henschel 2013-08-28 12:49:55 UTC
No crash with test file. Verified on AOO4.0.1 r1517538 and trunk r1517803.
Comment 5 Armin Le Grand 2013-09-03 10:37:02 UTC
ALG: Corrected owner