Fri 29 Feb 2008 02:19:14 AM UTC, comment #7:
Here is a backtrace from FTP.
The attached sample program reproduces the issue. I believe that it is caused by the run loop and the spawned thread attempting to update the graphics context at the same time. Should we consider having locks in those methods to prevent this type of thing occurring for multi threaded apps?
719 _terminate();
(gdb) bt
#0 0x55ed6327 in raise () from /lib/tls/libc.so.6
#1 0x55ed7b75 in abort () from /lib/tls/libc.so.6
#2 0x55ad762c in _terminate () at NSException.m:692
#3 0x55ad78cd in _NSFoundationUncaughtExceptionHandler (exception=0x5700a100)
at NSException.m:719
#4 0x55ad80a0 in -[NSException raise] (self=0x5700a100, _cmd=0x558a7360)
at NSException.m:859
#5 0x5562544f in _NSAppKitUncaughtExceptionHandler (exception=0x5700a100)
at NSApplication.m:123
#6 0x55ad8095 in -[NSException raise] (self=0x5700a100, _cmd=0x55ddbd80)
at NSException.m:850
#7 0x55ad7af2 in +[NSException raise:format:arguments:] (self=0x55ddb7e0,
_cmd=0x55ddbd68, name=0x55ddb55c, format=0x55db3f60,
argList=0x56fa75b0 "0À\211UØaA\bØuúV§ækU\200\e") at NSException.m:762
#8 0x55ad7a2a in +[NSException raise:format:] (self=0x55ddb7e0,
_cmd=0x55db49a0, name=0x55ddb55c, format=0x55db3f60) at NSException.m:748
#9 0x55a22d83 in -[GSMutableArray addObject:] (self=0x570061a0,
_cmd=0x558df010, anObject=0x0) at GSArray.m:411
#10 0x556bf0d2 in +[NSGraphicsContext saveGraphicsState] (self=0x558debc0,
_cmd=0x55936ce8) at NSGraphicsContext.m:269
#11 0x5579ffaa in -[NSView _lockFocusInContext:inRect:] (self=0x835a978,
_cmd=0x55936d78, ctxt=0x82b2058, rect=
{origin = {x = 0, y = 0}, size = {width = 170, height = 22}})
---Type <return> to continue, or q <return> to quit---
at NSView.m:1928
#12 0x557a208b in -[NSView displayRectIgnoringOpacity:inContext:] (
self=0x835a978, _cmd=0x55936dd8, aRect=
{origin = {x = 0, y = 0}, size = {width = 170, height = 22}},
context=0x82b2058) at NSView.m:2391
#13 0x557a1dc6 in -[NSView displayRectIgnoringOpacity:] (self=0x835a978,
_cmd=0x55936dc8, aRect=
{origin = {x = 0, y = 0}, size = {width = 170, height = 22}})
at NSView.m:2338
#14 0x557a19ce in -[NSView displayIfNeededInRectIgnoringOpacity:] (
self=0x835a978, _cmd=0x55936db8, aRect=
{origin = {x = 0, y = 0}, size = {width = 170, height = 22}})
at NSView.m:2270
#15 0x557a1b7e in -[NSView displayIfNeededInRectIgnoringOpacity:] (
self=0x82b2528, _cmd=0x55936db8, aRect=
{origin = {x = 0, y = 0}, size = {width = 455, height = 347}})
at NSView.m:2295
#16 0x557a1b7e in -[NSView displayIfNeededInRectIgnoringOpacity:] (
self=0x828cd20, _cmd=0x55936db8, aRect=
{origin = {x = 0, y = 0}, size = {width = 457, height = 379}})
at NSView.m:2295
#17 0x557a1846 in -[NSView displayIfNeededInRect:] (self=0x828cd20,
_cmd=0x55936db0, aRect=
---Type <return> to continue, or q <return> to quit---
{origin = {x = 0, y = 0}, size = {width = 457, height = 379}})
at NSView.m:2248
#18 0x557a1704 in -[NSView displayIfNeeded] (self=0x828cd20, _cmd=0x5593d800)
at NSView.m:2230
#19 0x557b4f61 in -[NSWindow displayIfNeeded] (self=0x828cc28, _cmd=0x8056e30)
at NSWindow.m:2226
#20 0x0804af4d in -[AppController setTransferBegin::] (self=0x8364818,
_cmd=0x80585d8, name=0x822fb18, size=7968532) at AppController.m:374
#21 0x0804dbb6 in -[FtpClient retrieveFile:to:beingAt:] (self=0x8390cf0,
_cmd=0x8056e08, file=0x828cba0, localClient=0x840d698, depth=0)
at ftpclient.m:385
#22 0x0804a846 in -[AppController performRetrieveFile:] (self=0x8364818,
_cmd=0x8056dd8, parameters=0x0) at AppController.m:278
#23 0x55b21a2b in -[NSObject performSelector:withObject:] (self=0x8364818,
_cmd=0x55e06718, aSelector=0x8056dd8, anObject=0x0) at NSObject.m:1947
#24 0x55b86490 in -[NSThread main] (self=0x8318f98, _cmd=0x55e06728)
at NSThread.m:858
#25 0x55e83850 in __objc_thread_detach_function (istate=0x8232330)
at /home/heron/Development/gcc-4.1.2/libobjc/thr.c:106
#26 0x55e66927 in start_thread () from /lib/tls/libpthread.so.0
#27 0x55f68e8e in clone () from /lib/tls/libc.so.6
(gdb) up
(file #15139)
|
Tue 08 Jan 2008 12:07:20 AM UTC, comment #4:
I tried to reproduce this on FreeBSD (so a different OS).Here I get a freeze without getting an exception panel, so it is different, but it happens when doing the same things. DOes this trace make more sense to you?
#0 0x28bd1888 in XAddExtension () from /usr/local/lib/libX11.so.6
#1 0x28d27ffa in _XftDisplayInfoGet () from /usr/X11R6/lib/libXft.so.2
#2 0x28d2c5ee in XftFontLoadGlyphs () from /usr/X11R6/lib/libXft.so.2
#3 0x28d2a27f in XftGlyphExtents () from /usr/X11R6/lib/libXft.so.2
#4 0x28d2a633 in XftTextExtents32 () from /usr/X11R6/lib/libXft.so.2
#5 0x28d04803 in -[GSXftFontInfo(Private) xGlyphInfo:] (self=0x8423e08,
_cmd=0x28d20928, glyph=43) at GSXftFontInfo.m:726
#6 0x28d03a24 in -[GSXftFontInfo advancementForGlyph:] (self=0x8423e08,
_cmd=0x28404be8, glyph=43) at GSXftFontInfo.m:330
#7 0x282fbee3 in -[GSHorizontalTypesetter layoutLineNewParagraph:] (
self=0x8356408, _cmd=0x28404cc0, newParagraph=1 '\001')
at GSHorizontalTypesetter.m:957
#8 0x282fcd9c in -[GSHorizontalTypesetter layoutGlyphsInLayoutManager:inTextContainer:startingAtGlyphIndex:previousLineFragmentRect:nextGlyphIndex:numberOfLineFragments:] (self=0x8356408, _cmd=0x28402fb0, layoutManager=0x8423d08,
textContainer=0x841f248, glyphIndex=15434, previousLineFragRect=
{origin = {x = 0, y = 4480}, size = {width = 409, height = 14}},
nextGlyphIndex=0xbf8fa940, howMany=0) at GSHorizontalTypesetter.m:1246
#9 0x282f67b4 in -[GSLayoutManager(LayoutHelpers) _doLayoutToContainer:] (
self=0x8423d08, _cmd=0x28402f98, cindex=0) at GSLayoutManager.m:1689
#10 0x282f63e2 in -[GSLayoutManager(LayoutHelpers) _doLayout] (self=0x8423d08,
_cmd=0x2838c898) at GSLayoutManager.m:1577
#11 0x281dbf5f in -[NSLayoutManager(layout) _insertionPointRectForCharacterIndex:textContainer:] (self=0x8423d08, _cmd=0x2838c968, cindex=15622,
textContainer=0xbf8faa6c) at NSLayoutManager.m:801
#12 0x281dc669 in -[NSLayoutManager(layout) insertionPointRectForCharacterIndex:inTextContainer:] (self=0x8423d08, _cmd=0x283fe768, cindex=15622,
textContainer=0x841f248) at NSLayoutManager.m:884
#13 0x282e9243 in -[NSTextView(leftovers) updateInsertionPointStateAndRestartTimer:] (self=0x840bc08, _cmd=0x283fe278, restartFlag=1 '\001')
at NSTextView.m:3596
#14 0x282e81e0 in -[NSTextView(leftovers) setSelectedRange:affinity:stillSelecting:] (self=0x840bc08, _cmd=0x283fe850, charRange=
{location = 15622, length = 0}, affinity=NSSelectionAffinityUpstream,
stillSelectingFlag=0 '\000') at NSTextView.m:3288
#15 0x282e7ca7 in -[NSTextView(leftovers) setSelectedRange:] (self=0x840bc08,
_cmd=0x2838cac8, charRange={location = 15622, length = 0})
at NSTextView.m:3125
#16 0x281dfe09 in -[NSLayoutManager textStorage:edited:range:changeInLength:invalidatedRange:] (self=0x8423d08, _cmd=0x283d1f10, aTextStorage=0x841f208,
mask=3, range={location = 15560, length = 62}, lengthChange=62,
invalidatedRange={location = 15560, length = 62}) at NSLayoutManager.m:2251
#17 0x2827e0bc in -[NSTextStorage processEditing] (self=0x841f208,
_cmd=0x283d1ec8) at NSTextStorage.m:260
#18 0x2827dbbe in -[NSTextStorage endEditing] (self=0x841f208, _cmd=0x28739b20)
at NSTextStorage.m:128
#19 0x284d6a9f in -[NSMutableAttributedString replaceCharactersInRange:withAttributedString:] (self=0x841f208, _cmd=0x28739b28, aRange=
---Type <return> to continue, or q <return> to quit---
{location = 15560, length = 0}, attributedString=0x8466308)
at NSAttributedString.m:916
#20 0x284d680c in -[NSMutableAttributedString appendAttributedString:] (
self=0x841f208, _cmd=0x8055b70, attributedString=0x8466308)
at NSAttributedString.m:860
#21 0x0804bf5d in -[AppController appendTextToLog:] (self=0x8408808,
_cmd=0x8057288, textChunk=0x84662e8) at AppController.m:540
#22 0x0804ca4e in -[FtpClient logIt:] (self=0x82ca688, _cmd=0x80572a0,
str=0x84662c8) at ftpclient.m:129
#23 0x08050031 in -[FtpClient dirContents] (self=0x82ca688, _cmd=0x8057300)
at ftpclient.m:1019
#24 0x0804d40e in -[FtpClient retrieveFile:to:beingAt:] (self=0x82ca688,
_cmd=0x8055aa8, file=0x840c6e8, localClient=0x853d988, depth=0)
at ftpclient.m:330
#25 0x0804a6fc in -[AppController performRetrieveFile:] (self=0x8408808,
_cmd=0x8055a78, parameters=0x0) at AppController.m:278
#26 0x285734ba in -[NSObject performSelector:withObject:] (self=0x8408808,
_cmd=0x2877d8f8, aSelector=0x8055a78, anObject=0x0) at NSObject.m:1947
#27 0x285ce639 in -[NSThread main] (self=0x82fb208, _cmd=0x2877d908)
at NSThread.m:858
#28 0x287b87a4 in objc_thread_exit () from /usr/lib/libobjc.so.2
#29 0x287e73a5 in pthread_create () from /lib/libpthread.so.2
#30 0x288a4137 in _ctx_start () from /lib/libc.so.6
|
Sun 15 Jul 2007 09:44:26 PM UTC, comment #2:
this is stack trace just on download, I don't think an alert panel should have popped up, thus it is a problem with the update from a thread, I suppose. On Mac or Linux I never got that. Xlib backend.
#0 0xbd3fc023 in poll () from /usr/lib/libc.so.12
#1 0xbd4deded in poll () from /usr/lib/libpthread.so.0
#2 0xbd0ad8d4 in _XPollfdCacheDel () from /usr/X11R6/lib/libX11.so.6
#3 0xbd0ae605 in _XRead () from /usr/X11R6/lib/libX11.so.6
#4 0xbd0af047 in _XReply () from /usr/X11R6/lib/libX11.so.6
#5 0xbd068e48 in XGetImage () from /usr/X11R6/lib/libX11.so.6
#6 0xbd1a25e6 in RGetXImage (context=0x81d2980, d=14680339, x=0, y=0,
width=17, height=13) at xutil.c:229
#7 0xbd1c89b7 in i_XGGState_Ops_DPSimage__________ (self=0x83f6e08,
_cmd=0xbd1e18d8, matrix=0x8404d08, pixelsWide=17, pixelsHigh=13,
bitsPerSample=8, samplesPerPixel=4, bitsPerPixel=32, bytesPerRow=68,
isPlanar=0 '\0', hasAlpha=1 '\001', colorSpaceName=0xbdbd6e1c,
data=0x8411dc0) at XGGState.m:1714
#8 0xbd18fdaa in i_GSContext_NSGraphics_NSDrawBitmap__________ (
self=0x857b048, _cmd=0xbdb94fe0, rect=
{origin = {x = 0, y = 0}, size = {width = 17, height = 13}},
pixelsWide=17, pixelsHigh=13, bitsPerSample=8, samplesPerPixel=4,
bitsPerPixel=32, bytesPerRow=68, isPlanar=0 '\0', hasAlpha=1 '\001',
colorSpaceName=0xbdbd6e1c, data=0x8411dc0) at GSContext.m:859
#9 0xbd934247 in NSDrawBitmap (rect=
{origin = {x = 0, y = 0}, size = {width = 17, height = 13}},
pixelsWide=17, pixelsHigh=13, bitsPerSample=8, samplesPerPixel=4,
bitsPerPixel=32, bytesPerRow=68, isPlanar=0 '\0', hasAlpha=1 '\001',
colorSpaceName=0xbdbd6e1c, data=0x8411dc0)
at ../Headers/AppKit/NSGraphics.h:180
#10 0xbd932b34 in _i_NSBitmapImageRep__draw (self=0x8413208, _cmd=0xbdbad248)
at NSBitmapImageRep.m:644
#11 0xbd9b1f5d in i_NSImageRep__drawAtPoint (self=0x8413208,
_cmd=0xbdbac110, aPoint={x = 0, y = 0}) at NSImageRep.m:461
#12 0xbd9aabdb in i_NSImage__drawRepresentation_inRect (self=0x8416148,
_cmd=0xbdbac0a8, imageRep=0x8413208, aRect=
{origin = {x = 0, y = 0}, size = {width = 17, height = 13}})
at NSImage.m:943
#13 0xbd9ae2ef in _i_NSImage_Private__doImageCache (self=0x8416148,
_cmd=0xbdbac088) at NSImage.m:1825
#14 0xbd9a9c37 in i_NSImage__compositeToPoint_fromRect_operation (
self=0x8416148, _cmd=0xbdbac078, aPoint={x = 9.5, y = 11.5}, aRect=
{origin = {x = 0, y = 0}, size = {width = 17, height = 13}},
op=NSCompositeSourceOver) at NSImage.m:734
#15 0xbd9a9b86 in i_NSImage__compositeToPoint_operation (self=0x8416148,
_cmd=0xbdb99228, aPoint={x = 9.5, y = 11.5}, op=NSCompositeSourceOver)
at NSImage.m:716
#16 0xbd94b7ef in i_NSButtonCell__drawImage_withFrame_inView (
self=0x8413188, _cmd=0xbdb992a0, anImage=0x8416148, aRect=
{origin = {x = 3, y = 3}, size = {width = 30, height = 30}},
controlView=0x8415708) at NSButtonCell.m:909
#17 0xbd94c6f9 in i_NSButtonCell__drawInteriorWithFrame_inView (
self=0x8413188, _cmd=0xbdb9aaa8, cellFrame=
{origin = {x = 3, y = 3}, size = {width = 30, height = 30}},
controlView=0x8415708) at NSButtonCell.m:1265
#18 0xbd954812 in i_NSCell__drawWithFrame_inView (self=0x8413188,
_cmd=0xbdb8daf8, cellFrame=
{origin = {x = 0, y = 0}, size = {width = 36, height = 36}},
controlView=0x8415708) at NSCell.m:2046
#19 0xbd908000 in i_NSActionCell__drawWithFrame_inView (self=0x8413188,
_cmd=0xbdba12e8, cellFrame=
{origin = {x = 0, y = 0}, size = {width = 36, height = 36}},
controlView=0x8415708) at NSActionCell.m:278
#20 0xbd977286 in i_NSControl__drawCell (self=0x8415708, _cmd=0xbdba12e0,
aCell=0x8413188) at NSControl.m:629
#21 0xbd97721d in i_NSControl__drawRect (self=0x8415708, _cmd=0xbdbcdcc8,
aRect={origin = {x = 0, y = 0}, size = {width = 36, height = 36}})
at NSControl.m:619
#22 0xbda6344a in i_NSView__displayRectIgnoringOpacity_inContext (
self=0x8415708, _cmd=0xbdbcdcb8, aRect=
{origin = {x = 0, y = 0}, size = {width = 36, height = 36}},
context=0x836f408) at NSView.m:2375
#23 0xbda631fd in i_NSView__displayRectIgnoringOpacity (self=0x8415708,
_cmd=0xbdbcdca8, aRect=
{origin = {x = 0, y = 0}, size = {width = 36, height = 36}})
at NSView.m:2321
#24 0xbda62ee6 in i_NSView__displayIfNeededInRectIgnoringOpacity (
self=0x8415708, _cmd=0xbdbcdc98, aRect=
{origin = {x = 0, y = 0}, size = {width = 36, height = 36}})
at NSView.m:2253
#25 0xbda63048 in i_NSView__displayIfNeededInRectIgnoringOpacity (
self=0x8374608, _cmd=0xbdbcdc98, aRect=
{origin = {x = 0, y = 0}, size = {width = 455, height = 347}})
at NSView.m:2278
#26 0xbda63048 in i_NSView__displayIfNeededInRectIgnoringOpacity (
self=0x8374408, _cmd=0xbdbcdc98, aRect=
{origin = {x = 0, y = 0}, size = {width = 457, height = 379}})
at NSView.m:2278
#27 0xbda62dc0 in i_NSView__displayIfNeededInRect (self=0x8374408,
_cmd=0xbdbcdc90, aRect=
{origin = {x = 0, y = 0}, size = {width = 457, height = 379}})
at NSView.m:2231
#28 0xbda62c98 in _i_NSView__displayIfNeeded (self=0x8374408, _cmd=0xbdbd01b8)
at NSView.m:2213
#29 0xbda73acc in _i_NSWindow__displayIfNeeded (self=0x8374308,
_cmd=0xbdbcfc18) at NSWindow.m:2081
#30 0xbda6d2ec in _i_NSWindow_GNUstepPrivate__handleAutodisplay (
self=0x8374308, _cmd=0xbdbcfc38) at NSWindow.m:134
#31 0xbda6d3af in c_NSWindow_GNUstepPrivate__handleAutodisplay (
self=0xbdb92360, _cmd=0xbdbcfc48, bogus=0x0) at NSWindow.m:173
#32 0xbd6347cb in i_NSObject__performSelector_withObject (self=0xbdb92360,
_cmd=0xbd8483e0, aSelector=0xbdbcfc48, anObject=0x0) at NSObject.m:1947
#33 0xbd663156 in _i_GSRunLoopPerformer (self=0x840b528, _cmd=0xbd848498)
at NSRunLoop.m:111
#34 0xbd664131 in i_NSRunLoop_Private__checkPerformers (self=0x81e6c28,
_cmd=0xbd848530, context=0x81d2e88) at NSRunLoop.m:471
#35 0xbd665578 in i_NSRunLoop__acceptInputForMode_beforeDate (
self=0x81e6c28, _cmd=0xbd848578, mode=0xbd848650, limit_date=0x81e6ee8)
at NSRunLoop.m:973
#36 0xbd6658f2 in i_NSRunLoop__runMode_beforeDate (self=0x81e6c28,
_cmd=0xbdbd33b8, mode=0xbd848650, date=0x8215168) at NSRunLoop.m:1043
#37 0xbda89d89 in i_GSDisplayServer_EventOps_getEventMatchingMask_beforeDate_inMode_dequeue (self=0x81a0808, _cmd=0xbd1e5000, mask=4294967295,
limit=0x8215168, mode=0xbd848650, flag=1 '\001') at GSDisplayServer.m:970
#38 0xbd1aa17c in i_XGServer_X11Ops_getEventMatchingMask_beforeDate_inMode_dequeue (self=0x81a0808, _cmd=0xbdb926d8, mask=4294967295, limit=0x8215168,
mode=0xbd848650, flag=1 '\001') at XGServerEvent.m:2306
#39 0xbd925584 in DPSGetEvent (ctxt=0x81a0808, mask=4294967295,
limit=0x8215168, mode=0xbd848650)
at ../Headers/Additions/GNUstepGUI/GSDisplayServer.h:180
#40 0xbd92007d in i_NSApplication__nextEventMatchingMask_untilDate_inMode_dequeue (self=0x81a1c88, _cmd=0xbdb92920, mask=4294967295, expiration=0x8215168,
mode=0xbd848650, flag=1 '\001') at NSApplication.m:1917
#41 0xbd91eaf5 in _i_NSApplication__run (self=0x81a1c88, _cmd=0xbdb8d748)
at NSApplication.m:1360
#42 0xbd9040f7 in NSApplicationMain (argc=1, argv=0xbfbfdc5c) at Functions.m:72
#43 0x08052fb2 in gnustep_base_user_main (argc=1, argv=0xbfbfdc5c) at main.m:30
#44 0xbd652467 in main (argc=1, argv=0xbfbfdc5c, env=0xbfbfdc64)
at NSProcessInfo.m:897
#45 0x08049536 in ___start ()
|