Crash on bad character in symbol library title
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Sysinfo:
Windows 7 64 bit
Inkscape 0.91 r13725
Steps to reproduce:
1. Create some symbol library.
2. Save it to symbol library directory and set title of saved file to "Podstawowe kształty"
3. Close all instances of Inkscape
And now two ways of causing the crash:
4a. Open any SVG file (i.e. run Inkscape with filename as first argument)
4b. Open Inkscape (without any args), open symbol library and switch to the saved library (the combobox where you choose it will have placeholder symbol in the place where "ł" should be)
The bug itself is composed of two problems. One is crashing when incorrect symbol is given. Second one is saving local characters. File itself is saved as Unicode, yet the name I provide in "title" field in save dialog is "Podstawowe kształty", but it's saved as "Podstawowe kszta?ty" (where "?" is 0xB3). I attached the file which casused the crash.
When I manually open file as raw text and I'll fix the name (the content of the tag <title> - wrongly encoded local character - "ł"), it don't crash anymore and I can use symbol library.
Besides fixing character encoding in title field, I think Inkscape should fail more gracefully, e.g. don't load such library at all.
crash confirmed on Windows 10, Inkscape 0.91 r13725 (Jan 30 2015)
- copy file crashy.svg to the folder C:\Program Files (x86)\Inkscape\ share\symbols
- open Inkscape from DOS
- open Symbols dialog using menu Object->Symbols
- close Inkscape
- this leads to the following error messages
C:\Program Files (x86)\Inkscape> inkscape
(inkscape. exe:11044) : GLib-CRITICAL **: g_convert: assertion `str != NULL' failed exe:11044) : GLib-CRITICAL **: g_convert: assertion `str != NULL' failed exe:11044) : GLib-CRITICAL **: g_convert: assertion `str != NULL' failed exe:11044) : GLib-CRITICAL **: g_convert: assertion `str != NULL' failed exe:11044) : Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_ set_text( ) exe:11044) : Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_ set_text( ) exe:11044) : Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_ set_text( ) share\symbols\ crashy. svg:21: parser error : Input is not proper UTF-8, indicate encoding ! "title4371" >Podstawowe kszta│ty</title>
(inkscape.
(inkscape.
(inkscape.
(inkscape.
(inkscape.
(inkscape.
C:\Program Files (x86)\Inkscape\
Bytes: 0xB3 0x74 0x79 0x3C
id=
....... ....... ....... ....... ....... ....... ....... ....... ....... .....
- second trial, with crashy.svg still in symbols folder
- open Inkscape from DOS
- open Symbols dialog using menu Object->Symbols
- in symbols dialog, click on the dropdown box and click on 'podstawowe'
- get multiple messages of the following type, followed by a crash
(inkscape. exe:12140) : GLib-CRITICAL **: g_convert: assertion `str != NULL' failed exe:12140) : Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_ set_text( ) exe:12140) : GLib-CRITICAL **: g_convert: assertion `str != NULL' failed exe:12140) : Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_ set_text( ) exe:12140) : Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_ set_text( )
...
(inkscape.
...
(inkscape.
...
(inkscape.
...
(inkscape.
...