bug-gnustep
[Top][All Lists]
Advanced

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

Re: [bug #6226] Segmentation fault when application finishes


From: Alex Perez
Subject: Re: [bug #6226] Segmentation fault when application finishes
Date: Tue, 28 Oct 2003 16:11:31 -0800 (PST)

I'd just like to mention that I have also experienced this behaviour, and 
it's definately not just something that is unique to his machine. I don't 
know how prevalent this is, and how many others have experienced it, but 
wanted to note that I've also had this problem

Regards,
Alex Perez

On Tue, 28 Oct 2003 address@hidden wrote:

> =================== BUG #6226: FULL BUG SNAPSHOT ===================
> http://savannah.gnu.org/bugs/?func=detailbug&bug_id=6226&group_id=99
> 
> Submitted by: benhur                  Project: GNUstep                      
> Submitted on: Tue 10/28/2003 at 21:45
> Category:  Gui/AppKit                 Severity:  2                          
> Bug Group:  Bug                       Resolution:  None                     
> Assigned to:  None                    Status:  Open                         
> 
> 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);
> 
> }
> 
> 
> 
> 
> 
> 
> 
> No Followups Have Been Posted
> 
> 
> 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/
> 
> 
> 
> _______________________________________________
> Bug-gnustep mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-gnustep
> 





reply via email to

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