Mon 12 May 2008 10:24:58 AM UTC, comment #1:
Looks like I did cause this by a memory leak fix on NSWindow. There the graphics context kept a reference of the window in its attributes dictionary and the window itself had a reference on the graphics context. This resulted in both never being freed.
I resolved this by reducing the retain count of the window after the graphics context gets created and increasing it just before the graphics context for the window is freed.
What I don't see is how this correction should result in a segmentation fault in GWorkspace. There is either an error in my change or the code in GWorkspace was always incorrect, but the problem was hidden by the gui bug. And of course there are plenty more possibilities.
Could you please try to find out, which sort of window is causing this? I am currently away from my home computer and so it is hard for me to find out where a GSContext gets autoreleased and what GSIMaps a context keeps.
You should try to use all the build in memory debugging facilities of GNUstep like enableDoubleReleaseCheck: and all the rest I don't remember :-)
|
Mon 12 May 2008 02:11:17 AM UTC, original submission:
GWorkspace.app does not start up any more with the lastest SVN version of GNUStep- it segfaults. Here is the back trace (and I have attached the error when starting the app):
#0 0xb74315d4 in objc_msg_lookup () from /usr/X11R6/lib/libobjc.so.2
#1 0xb757c32d in GSIMapCleanMap (map=0x9f2c354) at ../Headers/Additions/GNUstepBase/GSIMap.h:864
#2 0xb757c1c4 in GSIMapEmptyMap (map=0x9f2c354) at ../Headers/Additions/GNUstepBase/GSIMap.h:894
#3 0xb757c175 in -[GSDictionary dealloc] (self=0x9f2c350, _cmd=0xb7a2b508) at GSDictionary.m:102
#4 0xb767236c in -[NSObject release] (self=0x9f2c350, _cmd=0xb7da9ef0) at NSObject.m:2025
#5 0xb7bc7ea2 in -[NSGraphicsContext dealloc] (self=0x9f2c3b0, _cmd=0xb6894550) at NSGraphicsContext.m:284
#6 0xb681d636 in -[GSContext dealloc] (self=0x9f2c3b0, _cmd=0xb7a2b508) at GSContext.m:223
#7 0xb767236c in -[NSObject release] (self=0x9f2c3b0, _cmd=0xb7a02050) at NSObject.m:2025
#8 0xb75c70d3 in -[NSAutoreleasePool emptyPool] (self=0x83828d8, _cmd=0xb7a020b8) at NSAutoreleasePool.m:420
#9 0xb75c6ede in -[NSAutoreleasePool dealloc] (self=0x83828d8, _cmd=0xb7a020b0) at NSAutoreleasePool.m:324
#10 0xb75c6e93 in -[NSAutoreleasePool release] (self=0x83828d8, _cmd=0xb7ef6e98) at NSAutoreleasePool.m:317
#11 0xb7ea555d in -[FSNodeRep(Icons) resizedIcon:ofSize:] (self=0x8411860, _cmd=0xb7ef6dc0, icon=0x9f25308, size=24) at FSNodeRepIcons.m:417
#12 0xb7ea4307 in -[FSNodeRep(Icons) cachedIconOfSize:forKey:] (self=0x8411860, _cmd=0xb7ef6d98, size=24, key=0x9f25160)
at FSNodeRepIcons.m:231
#13 0xb7ea4510 in -[FSNodeRep(Icons) cachedIconOfSize:forKey:addBaseIcon:] (self=0x8411860, _cmd=0xb7ef6da8, size=24, key=0x9f25160,
baseIcon=0x9f25308) at FSNodeRepIcons.m:257
#14 0xb7ea3dfc in -[FSNodeRep(Icons) iconOfSize:forNode:] (self=0x8411860, _cmd=0xb7efa690, size=24, node=0x9f06818) at FSNodeRepIcons.m:163
#15 0xb7ea873c in -[FSNBrowserCell setIcon] (self=0x9f069d0, _cmd=0x8137ce8) at FSNBrowserCell.m:127
#16 0x080b6c35 in -[Finder addSearchPlaceWithPath:] (self=0x9f136f8, _cmd=0x8137a30, spath=0x824ec40) at Finder/Finder.m:603
#17 0x080b3634 in -[Finder init] (self=0x9f136f8, _cmd=0x81378d8) at Finder/Finder.m:149
#18 0x080b294d in +[Finder finder] (self=0x8137560, _cmd=0x8113430) at Finder/Finder.m:61
#19 0x08052aad in -[GWorkspace applicationWillFinishLaunching:] (self=0x82e84f8, _cmd=0xb7d72be0, aNotification=0x8447198)
at GWorkspace.m:454
#20 0xb7662c30 in -[NSNotificationCenter _postAndRelease:] (self=0x81e66d0, _cmd=0xb7a26c48, notification=0x8447198)
at NSNotificationCenter.m:1070
#21 0xb766354c in -[NSNotificationCenter postNotificationName:object:userInfo:] (self=0x81e66d0, _cmd=0xb7a26c50, name=0xb7e15200,
object=0x830de50, info=0x0) at NSNotificationCenter.m:1129
#22 0xb7663401 in -[NSNotificationCenter postNotificationName:object:] (self=0x81e66d0, _cmd=0xb7d726a0, name=0xb7e15200, object=0x830de50)
at NSNotificationCenter.m:1109
#23 0xb7b32278 in -[NSApplication finishLaunching] (self=0x830de50, _cmd=0xb7d72808) at NSApplication.m:952
#24 0xb7b33f77 in -[NSApplication run] (self=0x830de50, _cmd=0x810dab0) at NSApplication.m:1366
#25 0x0804d84b in main () at main.m:37
Thanks.
Charles
|