Page MenuHomePhabricator

Several thumbnail sizes of SVG with large gradientTransform fail
Open, Stalled, LowPublic


I was pointed out to the following broken thumbnail:

The commons image page is:

As you can see (hopefully) is that the thumbnail is not completely generated, only the bottom part. Not sure if this is a one off, or a more general problem.

Upstream issue:

Event Timeline

Aklapper renamed this task from image corruption to Several PNG thumbnail sizes of a specific SVG image do not display correctly.Jan 26 2019, 1:36 PM
Aklapper added a project: Thumbor.

Seems like this happens only for some sizes. Probably a librsvg bug.

Cannot reproduce locally with rsvg-convert -h 375 -f png -o Zevenhuizen_Moerkapelle_wapen.png Zevenhuizen_Moerkapelle_wapen.svg but I'm already on librsvg2-2.44.13-1.fc29.x86_64 (plus I guess we don't use rsvg-convert for this job).

We do use rsvg-convert, Stretch is on libsrvg 2.40.16-1. This is very likely to be something that would be fixed by a librsvg upgrade.

Looks like librsvg may have regressed on this issue since 2.44.13, as conversion fails for all thumbnails where the width is between 310 and 395 inclusive using 2.48.4.

$ RUST_BACKTRACE=full rsvg-convert -w 395 -f png -u -o Zevenhuizen_Moerkapelle_wapen.svg.png Zevenhuizen_Moerkapelle_wapen.svg
thread '<unnamed>' panicked at 'Cairo error "out of memory"', /build/.cargo/registry/src/
stack backtrace:
   0:     0x7ff4c0d104df - <unknown>
   1:     0x7ff4c0b74eec - <unknown>
   2:     0x7ff4c0d0f9c6 - <unknown>
   3:     0x7ff4c0d0f610 - <unknown>
   4:     0x7ff4c0d0edd6 - <unknown>
   5:     0x7ff4c0d0e978 - <unknown>
   6:     0x7ff4c0d0e920 - <unknown>
   7:     0x7ff4c0ca53ce - <unknown>
   8:     0x7ff4c0ca4758 - <unknown>
   9:     0x7ff4c0c84895 - <unknown>
  10:     0x7ff4c0c84653 - <unknown>
  11:     0x7ff4c0c82e79 - <unknown>
  12:     0x7ff4c0c83d66 - <unknown>
  13:     0x7ff4c0cbcdd4 - <unknown>
  14:     0x7ff4c0c7f629 - <unknown>
  15:     0x7ff4c0cbcc3d - <unknown>
  16:     0x7ff4c0c84895 - <unknown>
  17:     0x7ff4c0c84653 - <unknown>
  18:     0x7ff4c0c82e79 - <unknown>
  19:     0x7ff4c0c83d66 - <unknown>
  20:     0x7ff4c0ca1f6b - <unknown>
  21:     0x7ff4c0c7f629 - <unknown>
  22:     0x7ff4c0ca15cf - <unknown>
  23:     0x7ff4c0c84895 - <unknown>
  24:     0x7ff4c0c84653 - <unknown>
  25:     0x7ff4c0c82e79 - <unknown>
  26:     0x7ff4c0d081cf - <unknown>
  27:     0x7ff4c0d07e8c - <unknown>
  28:     0x7ff4c0b58209 - rsvg_rust_handle_render_cairo_sub
  29:     0x55eaf1b7c9af - <unknown>
  30:     0x7ff4c0349002 - __libc_start_main
  31:     0x55eaf1b7d7de - <unknown>
  32:                0x0 - <unknown>
fatal runtime error: failed to initiate panic, error 5
fish: “RUST_BACKTRACE=full rsvg-conver…” terminated by signal SIGABRT (Abort)

If it works on 2.44.10-2.1 (the current Debian buster version) we should be fine for a while though.

JoKalliauer changed the task status from Open to Stalled.Apr 30 2021, 7:04 PM
JoKalliauer triaged this task as Low priority.
JoKalliauer added a subscriber: JoKalliauer.

I reported it upstream: (with rsvg-convert version 2.48.9)

JoKalliauer renamed this task from Several PNG thumbnail sizes of a specific SVG image do not display correctly to Several thumbnail sizes of SVG with large gradientTransform fail.May 9 2021, 4:25 PM