[clean-list] Gtk ObjectIO

bfulgham@debian.org bfulgham@debian.org
Tue, 3 Jun 2003 15:18:42 -0600


Krasimir Angelov has spent a fair amount of time taking the original Clean
ObjectIO library port to Haskell, and bringing it forward to the current
version of the Glasgow Haskell compiler.  As part of this work, he
created an initial port of ObjectIO to the Gtk+ toolkit (see
http://www.gtk.org.

I started from Karsimir's Gtk+ sources, and ported them *back* to Clean,
resulting in a partially-functioning ObjectIO under Linux.  Right now most
of the basic windowing functionality is there, at least well enough for
the "Hello, World", and "Compare" programs to run.  "Clipboard" works,
though I haven't bound the clipboard code yet, so you get the GUI but
it doesn't do anything.

I'm now trying to get the Towers of Hanoi program to work (th first program
heavily using drawing primitives), and I'm running into a confusing problem.
It starts up, draws the root window frame, then terminates with a
"Heap Full" error from Clean.  It seems unlikely that the heap is actually
full, since it hasn't even completed the initialization process.

Does anyone have any experience debugging these kinds of problems under
Clean?  When I get a clean segfault in the Gtk binding, I can generally
see what's going on.  But when the error is announced from the Clean side
I can't see what's going on.

Are there some switchs or options that can be used to activate better
tracing or reporting?  Clearly something is not getting cleaned up from
the Heap, but how can I tell what's not getting collected?

Any help would be greatly appreciated.

Thanks,

-Brent