rev12093: crash on launch with default prefs from stable (0.48.4)

Bug #1114243 reported by su_v
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
High
Tavmjong Bah

Bug Description

Inkscape 0.48+devel r12093 crashes on launch if the preferences file originates from current stable version (see attached):

Steps to reproduce:
1) mv ~/.config/inkscape{,-bkp}
2) launch and quit inkscape 0.48.4
--> creates 'preferences.xml' with default values (among them 'Sans' as default font)
3) launch current trunk r12093

Expected result:
Inkscape trunk launches, and possibly complains about the missing font 'Sans' when using the text tool (see also bug #1002757)

Actual result:
Inkscape crashes before even opening the main document window:

Program received signal SIGSEGV, Segmentation fault.
sp_font_selector_get_best_style (font=0x3141b40, list=0x0) at ../../src/widgets/font-selector.cpp:456
456 tempFont = (font_factory::Default())->FaceFromUIStrings(family.c_str(), static_cast<char*>(list->data));

Tested systems:
Reproduced with Inkscape 0.48+devel r12093 on:
- Ubuntu 12.04 (64bit, VM), inkscape-trunk from PPA, pango 1.30.0
- Ubuntu 12.10 (64bit, VM), local trunk build, pango 1.30.1
- Mac OS X 10.5.8 (32bit Intel), pango 1.28.8
- Mac OS X 10.74 (64bit), pango 1.30.1, 1.32.5

Not reproduced with r12092 and older revisions.

Revision history for this message
su_v (suv-lp) wrote :
Revision history for this message
su_v (suv-lp) wrote :

Backtrace from Ubuntu 12.10, Inkscape 0.48+devel r12093

Revision history for this message
su_v (suv-lp) wrote :

Full backtrace from r12093 debug build with less optimization, on OS X 10.7.4

description: updated
description: updated
description: updated
Revision history for this message
jazzynico (jazzynico) wrote :

Confirmed on Debian testing, Inkscape revision 12093.
Same backtrace.

Changed in inkscape:
milestone: none → 0.49
status: New → Triaged
Revision history for this message
su_v (suv-lp) wrote :

Alternative steps to reproduce:

1) mv ~/.config/inkscape{,-bkp}
2) launch inkscape trunk (ok)
3) switch to the text tool
(do not click on the canvas yet, we only want to change the default font quickly!)
4) set default font to a non-installed font name:
(overtype default font name "sans-serif" e.g. with "fooooooo", press <Return>)
5) quit inkscape
6) launch inkscape trunk again
--> crash

or:

1) mv ~/.config/inkscape{,-bkp}
2) launch inkscape trunk (ok)
3) switch to the text tool
(do not click on the canvas yet, we only want to change the default font quickly!)
4) set default font to a non-installed font name:
(overtype default font name "sans-serif" e.g. with "fooooooo", press <Return>)
5) now click on the canvas once and create a new text object (with default font "fooooooo")
--> works ok
6) while still in the text tool context, click with the mouse on an empty canvas area to create a second new text object
--> crash

su_v (suv-lp)
Changed in inkscape:
importance: Undecided → High
Revision history for this message
Johan Engelen (johanengelen) wrote :

prevent crash in r12094.
there is some fallback behavior code for font styles that is incomplete and causes the crash, so keep this bug open. I've added a comment in the code in r12095. I think Tav should take a look.

Changed in inkscape:
assignee: nobody → Tavmjong Bah (tavmjong-free)
Revision history for this message
Tavmjong Bah (tavmjong-free) wrote :

Fixed in 12097. I am working on some changes that will superceed this fix but have no ETA for those at the moment.

Revision history for this message
su_v (suv-lp) wrote :

With the latest changes in revision 12099, line-height defaults to 0% if Inkscape is launched with fresh preferences (e.g. after resetting the prefs system by removing "$XDG_CONFIG_HOME/inkscape/preferences.xml"):

       style="fill:black;fill-opacity:1;stroke:none;font-family:sans-serif;font-style:normal;font-weight:normal;font-size:40px;line-height:0%;letter-spacing:0px;word-spacing:0px"

Not reproduced with r12098 and earlier revisions (default line-height was 125%):

       style="fill:black;fill-opacity:1;stroke:none;font-family:sans-serif;font-style:normal;font-weight:normal;font-size:40px;line-height:125%;letter-spacing:0px;word-spacing:0px"

Revision history for this message
Tavmjong Bah (tavmjong-free) wrote :

Fixed, I hope, in 12101. timing of the creation and Initialization of widgets is something of a black art.

Revision history for this message
su_v (suv-lp) wrote :

AFAICT this has been fixed, closing.

Changed in inkscape:
milestone: 0.49 → none
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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