bug-gnustep
[Top][All Lists]
Advanced

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

Re: [bug #6726] Segmentation fault from GSTest


From: Fred Kiefer
Subject: Re: [bug #6726] Segmentation fault from GSTest
Date: Fri, 28 Nov 2003 00:38:36 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030821

HI Alexander,

thank you for fixing this. I was totally distracted by the actual error message that I didn't even thing about starting memory debugging.

Fred

nobody@savannah.gnu.org wrote:
=================== BUG #6726: LATEST MODIFICATIONS ==================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=6726&group_id=99

Changes by: Alexander Malmberg <alexander@malmberg.org>
Date: Wed 11/26/2003 at 02:29 (Europe/Stockholm)

            What     | Removed                   | Added
---------------------------------------------------------------------------
         Assigned to | None                      | alexm
              Status | Open                      | Analyzed


------------------ Additional Follow-up Comments ----------------------------
Errors like that (random crashes, or clearly bogus message/receiver 
combinations) are generally caused by memory corruption, or freeing memory that 
is still in use. Zombies are useful when debugging.



In this case, the keyboard input test is releasing (and thus deallocating) its 
window while it's still key and main. NSApp keeps (unretained) references to 
these around, but doesn't clear them when the window is deallocated. Thus, when 
it later tries to send messages to them, Bad Things happen.



Fixed locally. I'll commit it tomorrow, once I decide whether to stick the new 
private method in NSApplication.h or GSGuiPrivate.h...





=================== BUG #6726: FULL BUG SNAPSHOT ===================


Submitted by: FredKiefer Project: GNUstep Submitted on: Mon 11/24/2003 at 00:16 Category: Gui/AppKit Severity: 2 Bug Group: Bug Resolution: None Assigned to: alexm Status: Analyzed
Summary:  Segmentation fault from GSTest

Original Submission:  I sometimes get the the fllowing execption from 
GSTest.app:

/usr/src/gnustep/usr-apps/examples/gui/GSTest/GSTest.app/GSTest: Uncaught 
exception NSInvalidArgumentException, reason: NSConstantString(instance) does 
not recognize setEnabled:

It is hard to reproduce but did show up rather often when testing the caps lock 
change. That is start GSTest, open the check input panel, type a key, switch on 
caps lock, press quit.

The gdb back trace was:
...
#12 0x4036e72b in +[NSException raise:format:] ()
   from /usr/GNUstep/System/Library/Libraries/libgnustep-base.so.1
#13 0x40391875 in -[NSObject doesNotRecognizeSelector:] ()
   from /usr/GNUstep/System/Library/Libraries/libgnustep-base.so.1
#14 0x40391a13 in -[NSObject forwardInvocation:] ()
   from /usr/GNUstep/System/Library/Libraries/libgnustep-base.so.1
#15 0x403ed7c7 in GSInvocationCallback ()
   from /usr/GNUstep/System/Library/Libraries/libgnustep-base.so.1
#16 0x4041a9fd in __vacall_r ()
   from /usr/GNUstep/System/Library/Libraries/libgnustep-base.so.1
#17 0x40498ee0 in ff_callback_map ()
   from /usr/GNUstep/System/Library/Libraries/libgnustep-base.so.1
#18 0xbfffdb04 in ?? ()
#19 0x00000004 in ?? ()
#20 0xbfffdb3c in ?? ()

And test where done on a SuSE 9.0 Linux system with todays GNUstep CVS sources.

Once I also did get this exception, but was not able to reproduce it again:
 Uncaught exception NSInvalidArgumentException, reason: 
GSCBufferString(instance) does not recognize resignKeyWindow


Follow-up Comments
*******************

-------------------------------------------------------
Date: Wed 11/26/2003 at 02:29       By: alexm
Errors like that (random crashes, or clearly bogus message/receiver 
combinations) are generally caused by memory corruption, or freeing memory that 
is still in use. Zombies are useful when debugging.



In this case, the keyboard input test is releasing (and thus deallocating) its 
window while it's still key and main. NSApp keeps (unretained) references to 
these around, but doesn't clear them when the window is deallocated. Thus, when 
it later tries to send messages to them, Bad Things happen.



Fixed locally. I'll commit it tomorrow, once I decide whether to stick the new 
private method in NSApplication.h or GSGuiPrivate.h...




CC list is empty


No files currently attached


For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=6726&group_id=99

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/








reply via email to

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