Crash on launch if 'font-family' is missing from text tool's default style

Bug #1092663 reported by su_v on 2012-12-20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Johan Engelen

Bug Description

Regression in current trunk (as reported by Insaner on irc):

Steps to reproduce:
1) start with default new preferences
   mv ~/.config/inkscape{,-bkp}
2) draw a rectangle, keep it selected
3) open 'Preferences > Tools > Text'
4) click on 'Take from selection' to use the style of the current selection as this tool's own style
5) quit inkscape
6) launch inkscape
--> fails to launch:

** (inkscape:83931): WARNING **: Inkscape currently only supports color-interpolation-filters = sRGB

** (inkscape:83931): WARNING **: Ignoring font without family that will crash Pango

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
0x00007fff86947870 in strcmp ()

Reproduced with Inkscape 0.48+devel r11963 on OS X 10.7.4,
not reproduced with Inkscape 0.48.4

The only fix to make Inkscape launch agan is to delete the preferences, or to manually add a 'font-family' property to the "style" attribute of the 'eventcontext' for "text".

su_v (suv-lp) wrote :

Relevant section in the preferences file, missing 'font-family' property:

       selcue="1" />

Johan Engelen (johanengelen) wrote :

the backtrace makes it a 3 second fix, great!
try r11964

Changed in inkscape:
assignee: nobody → Johan Engelen (johanengelen)
status: New → Incomplete
su_v (suv-lp) wrote :

Crash no longer reproduced with Inkscape 0.48+devel r11964 on OS X 10.7.4.

The behavior of the font tool based on such a default style is unlikely what the user might expect (though taking the style from a shape is not likely what was intended anyway), but that's not topic of this report, and with the fix in r11964, Inkscape trunk no longer crashes, and the default style for the text tool can be further adjusted from within Inkscape.

Thanks, Johan :)

Changed in inkscape:
status: Incomplete → Fix Released
su_v (suv-lp) wrote :

@Johan - I just noticed that the build I used for the backtrace (I tested with other builds too) had the patch from
<> (comment 4) applied - I do hope that the changes in that patch didn't influence where the crash might occur?

The test with r119664 to confirm the fix was done with a build which doesn't have that patch applied…

jazzynico (jazzynico) wrote :

Just reproduced with 11962 (no local patch), and confirmed fixed with 11964, Windows XP.

Johan Engelen (johanengelen) wrote :

@~suv: my fix is simply a crash fix effectively by exiting the offending function right before it is about to crash. it does not fix or change any functionality. it does not interfere with that other bug report.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers