| Summary: | FILEOPEN: attempting to insert Visio SVG causes Writer to crash | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | Owen Genat (retired) <owen.genat> |
| Component: | Writer | Assignee: | Not Assigned <libreoffice-bugs> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | fridrich.strba, jorendc, serval2412 |
| Priority: | medium | ||
| Version: | 4.0.3.3 release | ||
| Hardware: | Other | ||
| OS: | Linux (All) | ||
| See Also: | https://bugs.freedesktop.org/show_bug.cgi?id=65847 | ||
| Whiteboard: | BSA (target:4.4.0) (target:4.3.1) | ||
| Crash report or crash signature: | Regression By: | ||
| Attachments: |
console + bt with symbols on master sources
Screenshot with master sources updated yesterday |
||
|
Description
Owen Genat (retired)
2013-06-16 13:38:21 UTC
Created attachment 81032 [details]
console + bt with symbols on master sources
On pc Debian x86-64 with master sources updated today, I reproduced the problem. I attached the bt.
Fridrich: here's a naive patch:
diff --git a/svgio/source/svgreader/svgnode.cxx b/svgio/source/svgreader/svgnode.cxx
index bbd21d2..cf66846 100644
--- a/svgio/source/svgreader/svgnode.cxx
+++ b/svgio/source/svgreader/svgnode.cxx
@@ -120,9 +120,14 @@ namespace svgio
SvgStyleAttributes* pCurrent = const_cast< SvgStyleAttributes* >(&rOriginal);
pCurrent->setCssStyleParent(0);
- for(sal_uInt32 a(0); a < maCssStyleVector.size(); a++)
+ SvgStyleAttributeVector::const_reverse_iterator aIter = maCssStyleVector.rbegin();
+ // advance once since the last one musn't be used
+ if (++aIter == maCssStyleVector.rend())
+ return pCurrent;
+
+ for( ; aIter != maCssStyleVector.rend(); ++aIter)
{
- SvgStyleAttributes* pCandidate = const_cast< SvgStyleAttributes* >(maCssStyleVector[maCssStyleVector.size() - a - 1]);
+ SvgStyleAttributes* pCandidate = const_cast< SvgStyleAttributes* >(*aIter);
pCandidate->setCssStyleParent(pCurrent);
pCurrent = pCandidate;
There's no crash anymore but the image is completely black and I can see this on console:
warn:legacy.osl:12715:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:documentProperties> (!)
warn:legacy.osl:12715:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:pageProperties> (!)
warn:legacy.osl:12715:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:layer> (!)
warn:legacy.osl:12715:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:userDefs> (!)
warn:legacy.osl:12715:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:ud> (!)
warn:legacy.osl:12715:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:userDefs> (!)
warn:legacy.osl:12715:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:ud> (!)
warn:legacy.osl:12715:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:textBlock> (!)
warn:legacy.osl:12715:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:textRect> (!)
warn:legacy.osl:12715:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:paragraph> (!)
warn:legacy.osl:12715:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:tabList> (!)
warn:legacy.osl:12715:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:custProps> (!)
warn:legacy.osl:12715:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:cp> (!)
...
warn:legacy.osl:12715:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:newlineChar> (!)
Would you have some time to take a look?
To give an update, with master sources updated yesterday, I don't reproduce the crash. However the image is wrongly imported and I noticed these kinds of console log: warn:legacy.osl:14455:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:documentProperties> (!) warn:legacy.osl:14455:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:pageProperties> (!) warn:legacy.osl:14455:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:layer> (!) warn:legacy.osl:14455:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:userDefs> (!) warn:legacy.osl:14455:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:ud> (!) warn:legacy.osl:14455:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:userDefs> (!) warn:legacy.osl:14455:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:ud> (!) warn:legacy.osl:14455:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:textBlock> (!) warn:legacy.osl:14455:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:textRect> (!) warn:legacy.osl:14455:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:paragraph> (!) warn:legacy.osl:14455:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:tabList> (!) warn:legacy.osl:14455:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:custProps> (!) warn:legacy.osl:14455:1:svgio/source/svgreader/svgtools.cxx:40: Unknown Base SvgToken <v:cp> (!) Created attachment 84548 [details]
Screenshot with master sources updated yesterday
Should be resolved with http://cgit.freedesktop.org/libreoffice/core/commit/?id=0879a639bc7c734f0847f74b965809f9107b3195 I did backport that change to LibreOffice-4-3 branch and will be available in 4.3.1 too. Kind regards, Joren |