[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 ==================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=6226&group_id=99
Changes by: Richard Frith-Macdonald <rfm@gnu.org>
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
finishing.
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
deallocated.
Adding the following method to GSDisplayServer and calling it from -dealloc
solves the problem.
Benhur
- (void) _removeFromWindowMap
{
NSMapEnumerator enumerator;
void *key;
void *val;
enumerator = NSEnumerateMapTable(windowmaps);
while (NSNextMapEnumeratorPair(&enumerator, &key, &val))
{
if (val == self)
{
NSMapRemove(windowmaps, key);
}
}
NSEndMapTableEnumeration(&enumerator);
}
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:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=6226&group_id=99
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/