bug-gnustep
[Top][All Lists]
Advanced

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

[bug #20453] netbsd gui thread safety


From: Gregory John Casamento
Subject: [bug #20453] netbsd gui thread safety
Date: Fri, 29 Feb 2008 02:19:15 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12

Follow-up Comment #7, bug #20453 (project gnustep):

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ØaAbØuúV§ækU200e") 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)
    _______________________________________________________

Additional Item Attachment:

File name: GuiTest.tgz                    Size:10 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?20453>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

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