]> git.lyx.org Git - features.git/commitdiff
Fix crash related to the icon info inset.
authorEnrico Forestieri <forenr@lyx.org>
Sun, 22 Mar 2015 21:13:55 +0000 (22:13 +0100)
committerEnrico Forestieri <forenr@lyx.org>
Sun, 22 Mar 2015 21:25:38 +0000 (22:25 +0100)
When closing a document with the cursor near an icon info inset, LyX
may crash on loading again the same document. This is most probably due
to the fact that compressed svg icons are first uncompressed to a
temporary file before being used. The temporary file is then deleted
but something still expects to find it in place. The exact circumstances
that lead to the crash are unknown, and maybe there is also a race entering
the picture here. However, a document that always leads to a crash can be
found attached here: http://article.gmane.org/gmane.editors.lyx.devel/154566
This commit does not fix the cause of the crash but rather avoids it.
As a bonus, the svg icons used by LyX are not uncompressed anymore before
being used, speeding up startup time. This is not a problem, because Qt
can deal with compressed svg images.

lib/configure.py

index df19e80b03e4317a9fe97b40779a6c26b81b2634..0b06cdecc2f81cebc19ae6664cd0e13990430dfa 100644 (file)
@@ -582,7 +582,7 @@ def checkFormatEntries(dtl_tools):
         rc_entry = [r'\Format fen        fen     FEN                    "" "%%"        "%%"    ""      ""'])
     #
     checkViewerEditor('a SVG viewer and editor', ['inkscape'],
-        rc_entry = [r'\Format svg        svg     SVG                    "" "%%" "%%"   "vector"        "image/svg+xml"'])
+        rc_entry = [r'\Format svg        "svg, svgz" SVG                "" "%%" "%%"   "vector,zipped=native"  "image/svg+xml"'])
     #
     imageformats = r'''\Format bmp        bmp     BMP                    "" "%s"       "%s"    ""      "image/x-bmp"
 \Format gif        gif     GIF                    "" "%s"      "%s"    ""      "image/gif"