[clean-list] Gtk ObjectIO
Diederik van Arkel
diederik@cs.kun.nl
Tue, 3 Jun 2003 23:35:46 +0200
On Tuesday, June 3, 2003, at 11:18 PM, bfulgham@debian.org wrote:
> 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
Ooh, excellent that someone's working on this. I currently don't have
Clean
running under Linux so I can't directly help you there but I can tell
you that
"Heap Full" doesn't necessarily actually mean that the heap is full on
the
other platforms when you are messing around with C interfacing. I
usually
get this kind of error (or other crashes) from incorrectly specified
bindings.
If you could mail me or make available your current version I'll see if
I can get it running undert Gtk on MacOS X. That should help pinpoint
the
trouble.
Regards,
Diederik van Arkel