gkt2hs seg fault issue

I reported a seg-fault in chart a while back. so I was experimenting with cairo and rendering to to the screen, which if my understanding is correct, uses gtk. Certainly looks like it. So I compiled the cairo example Drawing.hs and that worked fine. I then tried running the example from ghci, i.e. loading it and typing main. I get a seg-fault when it exits: Ok, modules loaded: Main. *Main> main Loading package array-0.3.0.0 ... linking ... done. Loading package bytestring-0.9.1.5 ... linking ... done. Loading package filepath-1.1.0.3 ... linking ... done. Loading package old-locale-1.0.0.2 ... linking ... done. Loading package old-time-1.0.0.3 ... linking ... done. Loading package unix-2.4.0.0 ... linking ... done. Loading package directory-1.0.1.0 ... linking ... done. Loading package process-1.0.1.2 ... linking ... done. Loading package time-1.1.4 ... linking ... done. Loading package random-1.0.0.2 ... linking ... done. Loading package haskell98 ... linking ... done. Loading package mtl-1.1.0.2 ... linking ... done. Loading package cairo-0.11.0 ... linking ... done. Loading package containers-0.3.0.0 ... linking ... done. Loading package glib-0.11.0 ... linking ... done. Loading package gio-0.11.0 ... linking ... done. Loading package pretty-1.0.1.1 ... linking ... done. Loading package pango-0.11.0 ... linking ... done. Loading package gtk-0.11.0 ... linking ... done. *Main> Segmentation fault I included all the messages in case someone knows that one of the libraries is out of date and could be the source of the problem. Is it to be expected that it would seg-fault under ghci ??

Which ghc version?
It's have a bug in ghc-6.12 that cause gtk2hs segment fault.
If you use other ghc version, you should use gdb run your program to get
backtrace, then we can help you.
Cheers,
-- Andy
I reported a seg-fault in chart a while back.
so I was experimenting with cairo and rendering to to the screen, which if my understanding is correct, uses gtk. Certainly looks like it.
So I compiled the cairo example Drawing.hs and that worked fine.
I then tried running the example from ghci, i.e. loading it and typing main.
I get a seg-fault when it exits:
Ok, modules loaded: Main. *Main> main Loading package array-0.3.0.0 ... linking ... done. Loading package bytestring-0.9.1.5 ... linking ... done. Loading package filepath-1.1.0.3 ... linking ... done. Loading package old-locale-1.0.0.2 ... linking ... done. Loading package old-time-1.0.0.3 ... linking ... done. Loading package unix-2.4.0.0 ... linking ... done. Loading package directory-1.0.1.0 ... linking ... done. Loading package process-1.0.1.2 ... linking ... done. Loading package time-1.1.4 ... linking ... done. Loading package random-1.0.0.2 ... linking ... done. Loading package haskell98 ... linking ... done. Loading package mtl-1.1.0.2 ... linking ... done. Loading package cairo-0.11.0 ... linking ... done. Loading package containers-0.3.0.0 ... linking ... done. Loading package glib-0.11.0 ... linking ... done. Loading package gio-0.11.0 ... linking ... done. Loading package pretty-1.0.1.1 ... linking ... done. Loading package pango-0.11.0 ... linking ... done. Loading package gtk-0.11.0 ... linking ... done. *Main> Segmentation fault
I included all the messages in case someone knows that one of the libraries is out of date and could be the source of the problem.
Is it to be expected that it would seg-fault under ghci ??

On 9 August 2010 09:44, Andy Stewart
Which ghc version?
It's have a bug in ghc-6.12 that cause gtk2hs segment fault.
If memory serves, that bug was only present in 6.12.2... -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

Ivan Lazar Miljenovic
On 9 August 2010 09:44, Andy Stewart
wrote: Which ghc version?
It's have a bug in ghc-6.12 that cause gtk2hs segment fault.
If memory serves, that bug was only present in 6.12.2... Yes, typo, it's a bug of ghc-6.12.2
-- Andy

On Mon, 09 Aug 2010 11:09:40 +0800
Andy Stewart
Ivan Lazar Miljenovic
writes: On 9 August 2010 09:44, Andy Stewart
wrote: Which ghc version?
The Glorious Glasgow Haskell Compilation System, version 6.12.1 So just run gdb on ghci to see what is happening ? Brian

On Mon, 09 Aug 2010 11:09:40 +0800 Andy Stewart
wrote: Ivan Lazar Miljenovic
writes: On 9 August 2010 09:44, Andy Stewart
wrote: Which ghc version?
The Glorious Glasgow Haskell Compilation System, version 6.12.1
So just run gdb on ghci to see what is happening ? Since ghci got seg fault, it's maybe the bug of gtk2hs.
I recommend you download darcs version and test again. If darcs version get same error, it's new bug, then report it to gtk2hs-users@lists.sourceforge.net Thanks, -- Andy
participants (3)
-
Andy Stewart
-
briand@aracnet.com
-
Ivan Lazar Miljenovic