On Mon, 2009-11-23 at 20:55 +0800, Andy Stewart wrote: > >> But strange is this error not always occur. > >> > >> If i remove `keyPress` callback. > >> Just fork child process in `socektMain` like below: > >> > >> ------------------------------> fork in socketMain start > >> <------------------------------ > >> forkPlugProcess notebook PlugEditor "Editor" -- create editor GtkPlug > >> forkPlugProcess notebook PlugTerminal "Terminal" -- create terminal > >> GtkPlug > >> ------------------------------> fork in socketMain end > >> <------------------------------ > >> > >> Won't haven't any problem. > >> > >> So problem must be occur when SocektMain handle `keyPress` callback. > >> But i don't know why, In logical, it should be works fine.
I cannot really explain why your program doesn't work and, in fact, I since there is not SEGFAULT it seems that this is not a bug in Gtk2Hs in the sane that you would get the same error if you had written the program in C. Maybe you should follow the advice (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) and run the whole thing in gdb in order to understand what happened before the program crashed. Cheers, Axel. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Gtk2hs-devel mailing list Gtk2hs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel