glib warning in font_factory::GetUIStyles ("g_convert: assertion 'str != NULL' failed")

Bug #1706776 reported by Patrick Storz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
Patrick Storz

Bug Description

When launching Inkscape 0.92.x a lot of warnings are printed on the console:
  (inkscape.exe:4780): GLib-CRITICAL **: g_convert: assertion 'str != NULL' failed

This was reproduced in a 32-bit build of Inkscape 0.92.2pre0 (51816a8f55, 2017-07-26) but not a 64-bit build of the same version (both MSYS2 builds). Current master does not seem to be affected either.

gdb backtrace (with "set env G_DEBUG=fatal-criticals"; find attached) suggests this is happening in "font_factory::GetUIStyles()" in src/libnrtype/FontFactory.cpp.

Closer inspections shows that the error occurs when calling "familyUIName.compare( "sans-serif" )" and the four other similar statements, as "familyUIName" seems to contain invalid UTF-8 in this case.

The 64-bit build does not seem to reach these statements at all (as determined by appropriate debug statements).

Tags: fonts win32
Revision history for this message
Patrick Storz (ede123) wrote :
Revision history for this message
Patrick Storz (ede123) wrote :

> The 64-bit build does not seem to reach these statements at all

Strike that part - the statement is reached but with a valid familyUIName.

Revision history for this message
Patrick Storz (ede123) wrote :

Issue further tracked down to "sp_font_description_get_family()".

While the 64-bit version correctly assigns the family name "sans-serif" if "pango_font_description_get_family()" returns "Sans", the 32-bit version produces garbled output (i.e. likely some invalid memory address)

Revision history for this message
Patrick Storz (ede123) wrote :

I was able to track down the source and it turns out a fix by Tavmjong committed to master only a week ago actually fixes this issue, too.

See https://gitlab.com/inkscape/inkscape/merge_requests/53

Patrick Storz (ede123)
Changed in inkscape:
assignee: nobody → Eduard Braun (eduard-braun2)
status: Confirmed → In Progress
Revision history for this message
Patrick Storz (ede123) wrote :
Changed in inkscape:
status: In Progress → Fix Committed
jazzynico (jazzynico)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.