causes build segfault
Closed, ResolvedPublic


System Information
Debian Stretch trunk

Blender Version
Broken: trunk
Worked: ?

Short description of error

Newer Inkscape features a bug fix that changes the internally stored DPI to 94. This requires a scale on the part of the Blender icons or the image ends up corrupted.

However, all three options in the new Inkscape result in problems:

  • Ignore results in corrupted / sheared icons because the image size is wrong.
  • Convert via View Box results in Segfault.
  • Convert via scaling the image results in Segfault.

Hard coding the Python script to use --export-width and --export-height also generates the segfault.

Segmentation fault
source/blender/editors/datafiles/CMakeFiles/bf_editor_datafiles.dir/build.make:591: recipe for target 'release/datafiles/blender_icons16.png' failed
make[2]: *** [release/datafiles/blender_icons16.png] Error 139

Exact steps for others to reproduce the error
Using a newer Inkscape, load the blender_icons.svg. Simply save it after the prompt and trial any of the three options.


Mai Lavelle (maiself) triaged this task as Confirmed priority.Dec 5 2017, 8:04 AM

Also happens on Arch with Inkscape 0.92.2.

Segfault is happening on line 312 of datatoc_icon.c, looks like canvas_w (and _h) from the first icon loaded isn't matching the head.canvas_w of later icons, causing pixels_canvas to be allocated too small. Not sure why the canvas sizes aren't matching tho.

I suspect it is the DPI difference and that somewhere Blender is using that DPI to calculate the canvas size?

Note that build errors are better handled over IRC/ the mailing list.

Hard coding the pix_width and pix_height solves this if and only if you clean out the prior dot dat files for some reason.