Ticket #1157 (closed defect: invalid)
afterSizeAllocate throws schedule: re-entered unsafely bug
|Reported by:||guest||Owned by:||axel|
|Component:||general (Gtk+, Glib)||Version:||0.9.13|
After trying the mailing list and not getting any response I though I'd just report it as a bug.
The error thrown is : Client.exe: schedule: re-entered unsafely.
Perhaps a 'foreign import unsafe' should be 'safe'?
and a sample code is
-- | Event in which we need to resize the images in. frameResizeEvent :: [Image] -> Pos -> Rectangle -> IO () frameResizeEvent imgs (h,w) (Rectangle x y width height) =
- let f = (fromIntegral)
- Int -> Float
- let t = (truncate)
- Float -> Int let wScale = ceiling (f width/ f w) let hScale = ceiling (f height/ f h) mapM_ (scalePixbufTo wScale hScale) imgs
scalePixbufTo :: Int -> Int -> Image -> IO () scalePixbufTo w h img =
buf <- imageGetPixbuf img nBuf <- pixbufScaleSimple buf w h InterpBilinear? imageSetFromPixbuf img nBuf
It works one time, when the window is initially shown, but after that, it crashes with the error mentioned above. This really is a show stopper for me and I hope it's just me doing something wrong.