Oh dear, is this with the darcs repository from yesterday? Although I'm not quite sure if this is a concurrency bug at all.
Axel. On Mon, 2009-11-23 at 18:55 +0800, Andy Stewart wrote: > Hi all, > > In file `demo/embedded/Embedded.hs` > (or > ) have below code snippets in function `socketMain`: > ------------------------------> code start <------------------------------ -- > Handle key press. window `on` keyPressEvent $ tryEvent $ do keyModifier <- > eventModifier keyName <- eventKeyName liftIO $ when (keyModifier == [Alt]) $ > case keyName of "m" -> forkPlugProcess notebook PlugEditor "Editor" -- create > editor GtkPlug "n" -> forkPlugProcess notebook PlugTerminal "Terminal" -- > create terminal GtkPlug ------------------------------> code end > <------------------------------ That's mean, when you press key `Alt-m` or > `Alt-n` will fork child process to build GtkPlug widget. But when i running > program and press `Alt-m` will crash Socket process with below error: > ------------------------------> error start <------------------------------ > Running in socket process : 2047 The program 'Embedded' received an X Window > System error. This probably reflects a bug in the program. The error was > 'BadValue (integer parameter out of range for operation)'. (Details: serial > 423 error_code 2 request_code 53 minor_code 0) (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.) > a...@ubuntu:~/Projects/Haskell/embbeded$ Running in plug process : 2049 > ------------------------------> error end <------------------------------ And > strange is above error is not occur always, most times works fine. If i just > instead above code snippets with: ------------------------------> new code > start <------------------------------ forkPlugProcess notebook PlugEditor > "Editor" -- create editor GtkPlug forkPlugProcess notebook PlugTerminal > "Terminal" -- create terminal GtkPlug ------------------------------> new > code end <------------------------------ Then program works fine. So i guess > Socekt process and Plug process still share *same* resource when user press > key, then make Socket crash. Any idea? Thanks, -- Andy > ------------------------------------------------------------------------------ > 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 ------------------------------------------------------------------------------ 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