Twinside / Juicy.Pixels

Haskell library to load & save pictures
BSD 3-Clause "New" or "Revised" License
237 stars 57 forks source link

saving a converted svg file throws "divide by zero" error #140

Closed nek0 closed 7 years ago

nek0 commented 7 years ago

Hi there,

When uploading svg files in my image library eidolon, it might throw an "divide by zero" error and abort. I have pinpointed the error so far, that it happens when the converted and scaled svg image is being saved to png. For reference see how I handle converting and saving svgs. The code breaks at line 265. Here is an example file, which is not working: sticker-cybergeprueft.svg.zip

Thank you for your time and effort.

Twinside commented 7 years ago

Please reduce the test case, I won't digg in your code. I suspect that the division by zero may happen during the svg rendering and not image saving, you can provide a stack trace by compiling with profiling and using --RTS -xc to get it

nek0 commented 7 years ago

I have constructed a minimal working example for this bug. It's not a bug in JuicyPixels, but in rasterific-svg. See Twinside/rasterific-svg#4.

Thank you so far.

Twinside commented 7 years ago

Ok, I'm closing this one then, handling it in rasterific-svg