Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Assertion failed #4

Open
mcandre opened this Issue February 19, 2012 · 1 comment

2 participants

Andrew Pennebaker Vincent Gerard
Andrew Pennebaker

There's a segfault either in hsmagick or GraphicsMagick, I'm not sure which.

Code:

#!/usr/bin/env runhaskell

import Graphics.Transform.Magick.Images

main :: IO ()
main = do
    im <- readImage "material/lenna.png"
    putStrLn "Image loaded"

Trace:

$ ghc --make fuzz.hs -O2 -fforce-recomp -optl"-Wl,-no_compact_unwind" -package hsmagick
[1 of 1] Compiling Main             ( fuzz.hs, fuzz.o )
Linking fuzz ...
$ ./fuzz 
Assertion failed: (semaphore_info != (SemaphoreInfo *) NULL), function LockSemaphoreInfo, file magick/semaphore.c, line 529.
Abort trap: 6
Vincent Gerard
Owner

Hello,

Could you try to call first in your main initializeMagick like

main = do
initializeMagick
im <- readImage "material/lenna.png"
putStrLn "Image loaded"

It is a mandatory initialization function... (this behavior is driven by the C library that mandate calling this function before using any GMagick function)

Keep me updated and thanks for the notice !

Vincent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.