haskellwxhaskellwxnotebook

wxhaskell notebook with imageTag segfaults


I just can't get imageTab to run. I get a Segmentation fault: 11. This is my code. Does anybody know what to do?

import Graphics.UI.WX 
import Graphics.UI.WXCore

main :: IO ()
main = start gui

gui :: IO ()
gui = do
    f  <- frame []
    fp <- panel f []

    nb <- notebook fp []
    page <- panel nb []
    b <- button page [ text := "-"]


    let bm = bitmap "favicon.ico"
    -- check that bitmap is there
    sx <- bitmapGetHeight bm
    print sx

    set f [ layout := container fp $ tabs nb [imageTab "Foo" bm (container page $ fill $ widget b)]]

    -- This works
    --set f [ layout := container fp $ tabs nb [tab "Foo" (container page $ fill $ widget b)]]

Solution

  • This looks like a bug; you can best report it at http://sourceforge.net/p/wxhaskell/bugs/