bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Every .app's segfault patch


From: Adam Fedor
Subject: Re: Every .app's segfault patch
Date: Tue, 30 Jul 2002 12:00:23 -0600
User-agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.0rc2) Gecko/20020513

Serg Stoyan wrote:
Hi everybody!

I think somebody noted segfaulting of any .app after Alt-Q press or Quit
menu item click... Backtrace in gdb points to the problems in
XCloseDisplay() call in the XGServer's dealloc method. I've tried to
place call of XCloseDisplay() from the bottom to top of dealloc method
and voila, segfault disappeared! I don't know exactly why this
happens... Maybe dpy variable freed in DESTROY(inputServer) or [self _destroyServerWindows] methods...

Patch attached.



------------------------------------------------------------------------

--- CVS/core/back/Source/x11/XGServer.m Mon Jul 15 09:28:22 2002
+++ back/Source/x11/XGServer.m  Tue Jul 30 16:06:34 2002
@@ -417,10 +417,10 @@
 - (void) dealloc
 {
   NSDebugLog(@"Destroying X11 Server");
+  XCloseDisplay(dpy);
   DESTROY(inputServer);
   [self _destroyServerWindows];
   NSFreeMapTable(screenList);
-  XCloseDisplay(dpy);
   [super dealloc];
 }

This probably just masks the problem, since you close the display before freeing any of the X resources (I wonder why it doesn't cause a segfault this way?).

Are you sure you are still getting a segfault (since version 0.7.9)? I fixed something and asked people to check it. If so, let me know.


--
Adam Fedor, Digital Optics Corp.      | I'm glad I hate spinach, because
http://www.doc.com                    | if I didn't, I'd eat it, and you
                                      | know how I hate the stuff.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]