[Top][All Lists]

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

[bug #6226] Segmentation fault when application finishes

From: nobody
Subject: [bug #6226] Segmentation fault when application finishes
Date: Wed, 29 Oct 2003 02:02:19 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20031010 Debian/1.4-6

=================== BUG #6226: LATEST MODIFICATIONS ==================

Changes by: Richard Frith-Macdonald <address@hidden>
Date: Wed 10/29/03 at 07:02 (GMT)

            What     | Removed                   | Added
          Resolution | None                      | Fixed
              Status | Open                      | Closed

------------------ Additional Follow-up Comments ----------------------------
I applied that fix ... thanks.

=================== BUG #6226: FULL BUG SNAPSHOT ===================

Submitted by: benhur                  Project: GNUstep                      
Submitted on: Tue 10/28/03 at 23:45
Category:  Gui/AppKit                 Severity:  2                          
Bug Group:  Bug                       Resolution:  Fixed                    
Assigned to:  None                    Status:  Closed                       

Summary:  Segmentation fault when application finishes

Original Submission:  Some applications generate a segmentation fault when 

It goes like this:

NSApplication -dealloc releases the GSDisplayServer associated

to _app_icon_window. It gets deallocated.

NSResponder (NSApplication's super) -dealloc releases _menu

menu releases it's window.

NSWindow's dealloc calls GSServerForWindow(self) and obtains a pointer to the 
deallocated server.

NSWindow sends removeDragTypes:fromWindow to this deallocated object... boom!

The problem is that there is a NSMapTable to map windows to 

DisplayServers, and this map doesn't get updated when a displayserver is 

Adding the following method to GSDisplayServer and calling it from -dealloc 
solves the problem.


- (void) _removeFromWindowMap


  NSMapEnumerator enumerator;

  void *key;

  void *val;

  enumerator = NSEnumerateMapTable(windowmaps);

  while (NSNextMapEnumeratorPair(&enumerator, &key, &val))


      if (val == self)


          NSMapRemove(windowmaps, key);





Follow-up Comments

Date: Wed 10/29/03 at 07:02         By: CaS
I applied that fix ... thanks.

CC list is empty

No files currently attached

For detailed info, follow this link:

  Message sent via/by Savannah

reply via email to

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