Follow-up: the same problems persist with ghc 6.10.1.

On Monday 12 January 2009 09:30:58 Jeroen Janssen wrote:
> Hey Mads,
>
> This seems to be correct.  If I modify my testprogram to this:
>
> module Main where
>
> import Graphics.UI.WX
> import System.IO
>
> main :: IO ()
> main
>   = do hPutStrLn stderr "WX checkpoint alpha"
>        --start hello
>
> hello :: IO ()
> hello
>   = do f    <- frame    [text := "Hello!"]
>        quit <- button f [text := "Quit", on command := close f]
>        set f [layout := widget quit]
>
> Where start does not even get called, I get the same errors and infinite
> loop (without ever getting the "WX checkpoint alpha").  Removing the hello
> function and the import function outputs the string correctly without any
> errors.
>
> The strangest thing is that wxpython works flawlessly, so I am not sure
> whether the problem is not in part due to some bug with ghc 6.8.3.
>
> On Monday 12 January 2009 00:33:05 Mads Lindstrøm wrote:
> > Hi Jeroen
> >
> > I wrote:
> > > Hi Jeroen
> > >
> > > While my windows show up just fine, I do get similar warnings to you:
> > >
> > > (process:12227): GLib-GObject-CRITICAL **: gtype.c:2240: initialization
> > > assertion failed, use IA__g_type_init() prior to this function
> > >
> > > (process:12227): Gdk-CRITICAL **: gdk_cursor_new_for_display: assertion
> > > `GDK_IS_DISPLAY (display)' failed
> > >
> > > (process:12227): GLib-GObject-CRITICAL **: gtype.c:2240: initialization
> > > assertion failed, use IA__g_type_init() prior to this function
> > >
> > > (process:12227): Gdk-CRITICAL **: gdk_cursor_new_for_display: assertion
> > > `GDK_IS_DISPLAY (display)' failed
> > >
> > > I think we to call g_type_init()
> > > (http://library.gnome.org/devel/gobject/unstable/gobject-Type-Informati
> > >on .html#g-type-init) somewhere in the wxHaskell code, to avoid these
> > > warnings and possibly your wxHaskell to work. I am looking into it.
> >
> > I changed the start-function (in wx/src/Graphics/UI/WX.hs) from:
> >
> > -- | 'start' runs the GUI.
> > start :: IO a -> IO ()
> > start io
> >   = run (unitIO io)
> >
> > to:
> >
> > -- | 'start' runs the GUI.
> > start :: IO a -> IO ()
> > start io
> >   = do hPutStrLn stderr "WX checkpoint alpha"
> >        hFlush stderr
> >        run (unitIO io)
> >
> > And I now get the output:
> >
> > (process:14665): GLib-GObject-CRITICAL **: gtype.c:2240: initialization
> > assertion failed, use IA__g_type_init() prior to this function
> >
> > (process:14665): Gdk-CRITICAL **: gdk_cursor_new_for_display: assertion
> > `GDK_IS_DISPLAY (display)' failed
> >
> > (process:14665): GLib-GObject-CRITICAL **: gtype.c:2240: initialization
> > assertion failed, use IA__g_type_init() prior to this function
> >
> > (process:14665): Gdk-CRITICAL **: gdk_cursor_new_for_display: assertion
> > `GDK_IS_DISPLAY (display)' failed WX checkpoint alpha
> >
> >
> > That is, the checkpoint comes _after_ the GLib error, and as the
> > start-function is the very first function to be called, it leads me to
> > conclude that the error is not with the Haskell code. So I assume it
> > must be some library initialization. Unfortunately, I have no knowledge
> > of whats gets called as part of library initialization and I do not know
> > where to look. If anyway, can help me with this I would be most happy.
> >
> >
> > Greetings
> >
> > Mads Lindstrøm
> >
> > > This bugs seems to be similar to what you (and I) are experiencing
> > > https://bugzilla.redhat.com/show_bug.cgi?id=442977 .
> > >
> > >
> > > Greetings,
> > >
> > > Mads Lindstrøm
> > >
> > > Jeroen Janssen wrote:
> > > > Follow-up:
> > > >
> > > > With latest darcs version, showing revision 0.11.1 this time, this
> > > > error does not occur any longer.  However, wxhaskell is still not
> > > > working as now programs fail with:
> > > >
> > > > (process:3353): GLib-GObject-CRITICAL
> > > > **: /build/buildd/glib2.0-2.16.6/gobject/gtype.c:2248: initialization
> > > > assertion failed, use IA__g_type_init() prior to this function
> > > >
> > > > (process:3353): GLib-CRITICAL **: g_once_init_leave: assertion
> > > > `initialization_value != 0' failed
> > > >
> > > > (process:3353): Gdk-CRITICAL **: gdk_cursor_new_for_display:
> > > > assertion `GDK_IS_DISPLAY (display)' failed
> > > >
> > > > This happens for the example I mentioned in my previous e-mail but
> > > > also for the examples included with wxhaskell (BoxedCombinator etc).
> > > >
> > > > Any help with this?  The parameters stayed the same as in my previous
> > > > e-mail (Ubuntu 8.04, wxwidgets/wxgtk 2.8.7 ubuntu version), I even
> > > > tried updating to wxwidgets 2.8.9, but to no avail, same error.
> > > > I build wxhaskell with "cabal" install, followed by the cd wx en
> > > > usual build process if that may be of any help.
> > > >
> > > > Kind regards,
> >
> > -------------------------------------------------------------------------
> >-- --- Check out the new SourceForge.net Marketplace.
> > It is the best place to buy or sell services for
> > just about anything Open Source.
> > http://p.sf.net/sfu/Xq1LFB
> > _______________________________________________
> > wxhaskell-users mailing list
> > wxhaskell-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wxhaskell-users
>
> ---------------------------------------------------------------------------
>--- Check out the new SourceForge.net Marketplace.
> It is the best place to buy or sell services for
> just about anything Open Source.
> http://p.sf.net/sfu/Xq1LFB
> _______________________________________________
> wxhaskell-users mailing list
> wxhaskell-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wxhaskell-users



------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
wxhaskell-users mailing list
wxhaskell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users

Reply via email to