Re: cursor for display segv
- From: Torsten Schoenfeld <kaffeetisch gmx de>
- To: gtk-perl-list gnome org
- Subject: Re: cursor for display segv
- Date: Sun, 05 Dec 2010 16:34:10 +0100
On 30.11.2010 22:42, Kevin Ryde wrote:
The program below gets a segv for me with i386 debian "experimental" gtk
2.22 and glib 2.27.3.
I can reproduce this with my development installation, but not with the
system's gtk+. The code in question has not changed in quite a few
years. I think the different results might be due to the conditional in
_gdk_cursor_destroy:
if (!private->display->closed && private->xcursor)
XFreeCursor (GDK_DISPLAY_XDISPLAY (private->display),
private->xcursor);
In the test case, private->display is garbage, so its closed member
might come out true or false.
GdkCursor seems to simply assume that the GdkDisplay is valid throughout
the cursor's lifetime, but it doesn't take a reference on it. I don't
think it's the bindings' responsibility to do something about this.
GdkCursor should just take a reference on the display. In the meantime,
for your Perl code, I think you will have to keep the display around.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]