Finalizer problems with ghc 6.10.2

Jürgen Nicklisch-Franken jnf at
Thu Mar 19 16:28:11 EDT 2009

I've tried a gtk2hs app on ghc 6.10.2 release candidate.
It crashes frequently and Simon (as you can read down here) assumes it
is gtk2hs problem.
My question is:
	Is this problem known to gtk2hs developers?
	Is it really a gtk2hs problem?
	How difficult is it to fix the problem?
	When will we have a patch to use gtk2hs with 6.10.2, 
		is it already in the repo?	

Thanks a lot.
<quote author="Simon Marlow-7">
jutaro wrote:
> I've installed a GUI application based on gtk2hs.
> It frequently crashes with the error: 
> leksah: error: a C finalizer called back into Haskell.
> use Foreign.Concurrent.newForeignPtr for Haskell finalizers.
> This error did never occur with the 6.10 released version. It was
> that this happens on different machines. I've no idea how to isolate
> bug.

This will need to be fixed in gtk2hs.  Previously GHC allowed finalizers
call back into Haskell, but this was never officially supported.  Now it
officially unsupported, because finalizers created via
are run directly by the garbage collector.


Glasgow-haskell-users mailing list
Glasgow-haskell-users at


More information about the Leksah mailing list