[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.lisp

GC error with gtk

Jim Newton

7/6/2015 2:55:00 PM

I'm getting the following message using cl-gtk2. Has anyone seen something
like this before? It seems to happy when I'm using sb-thread in sbcl. I have not seen the issue when I'm not using threads, but of course I can be sure it is connected.

The message suggest using the --sync command line arg. I"m not sure how to interpret that in the case that sbcl is my command line.


The program '<unknown>' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadGC (invalid GC parameter)'.
(Details: serial 5016 error_code 13 request_code 59 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.)

Process inferior-lisp exited abnormally with code 1
3 Answers

Jim Newton

7/7/2015 9:24:00 AM

0

I may have found a clue/fix/workaround.
I found a place in my code where it was possible that two different threads (sb-thread) might try to update the gtk canvas at the same time. I put this code into a mutex, and for the moment the crash seems to go away.

Zach Beane

7/7/2015 11:35:00 AM

0

Jim Newton <jimka.issy@gmail.com> writes:

> I may have found a clue/fix/workaround.
> I found a place in my code where it was possible that two different threads (sb-thread) might try to update the gtk canvas at the same time. I put this code into a mutex, and for the moment the crash seems to go away.

This might not be news, but in this context, the "GC" is the X graphics
context, not the Lisp garbage collector.

Zach

Jim Newton

7/7/2015 11:50:00 AM

0

Thanks for confirming that Zack. I suspected as much because one article I read about this subject reported the same error, even with a non-GC'd language.