help-gnustep
[Top][All Lists]
Advanced

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

NSActionCell _control_view


From: Rob Burns
Subject: NSActionCell _control_view
Date: Mon, 29 Dec 2003 11:10:38 +0700

I'm having problems displaying an NSTableView. when I run my app, sometimes it will behave as expected and display the contents of the NSTableView. And other times it will segfault when displaying the first item. This appears to be becuase the _control_view instance variable of NSActionCell gets set to something other than the NSTableView, in which the cell is being displayed. The gdb output thats attached shows this. also in my program I can print this variable when ever a cell is drawn by putting this:

   NSLog(@"cell control view - %@", [[aCell controlView] description]);

in

- (void) tableView: (NSTableView *) aTableView
    willDisplayCell: (id) aCell
     forTableColumn: (NSTableColumn *) aTableColumn
                row: (int) rowIndex

when the app functions correctly, a description of the NSTableView is printed. When the _control_view variable has gotten set to something else, it will sefgault on the NSLog. The program can be found here:

http://www.eskimo.com/~pburns/rob/Pimzler-1229.tar.gz

there are things you can do that will make it segfault sometimes. but, if you open two documents at the same time, and click on the 'vault' button, it will segfault every time. (two files can be found in the CardStacks directory).

Any ideas what might cause this?

Thanks
Rob


2003-12-28 16:48:17.543 Pimzler[16522] vaultListView - <PTableView: 83e3468>, 3 2003-12-28 16:48:17.543 Pimzler[16522] responder - <PTableView: 83e3468>

Breakpoint 1, -[NSTableView drawRow:clipRect:] (self=0x83e3468,
_cmd=0x402c4950, rowIndex=0, clipRect=
         {origin = {x = 0, y = 0}, size = {width = 397, height = 67}})
at NSTableView.m:5255
5255              [cell setObjectValue: [_dataSource tableView: self
(gdb) print self
$3 = (class NSTableView *) 0x83e3468
(gdb) print-object 0x83e3468
<PTableView: 83e3468>
(gdb) c
Continuing.

Breakpoint 2, -[StackModel tableView:objectValueForTableColumn:row:]
(self=0x83d6b38, _cmd=0x402c4928, aTableView=0x83e3468,
     aTableColumn=0x83e37e0, rowIndex=0) at StackModel.m:442
442         theValue = [[WORDS objectAtIndex: x] objectForKey:
@"FirstValue"];
(gdb) ch
Continuing.

Breakpoint 3, -[StackModel tableView:objectValueForTableColumn:row:]
(self=0x83d6b38, _cmd=0x402c4928, aTableView=0x83e3468,
     aTableColumn=0x83e37e0, rowIndex=0) at StackModel.m:443
443         return theValue;}
(gdb) s
451     }
(gdb) s
-[NSActionCell setObjectValue:] (self=0x83e3ae8, _cmd=0x402c4738,
anObject=0x83d7c78) at NSActionCell.m:159
159       [super setObjectValue: anObject];
(gdb) print _control_view
$4 = (class NSView *) 0x83e33a8
(gdb) print-object 0x83e33a8

Program received signal SIGSEGV, Segmentation fault.
0x4056b5fa in objc_msg_lookup () from
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/libobjc.so.1
The program being debugged was signaled while in a function called
from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on"
Evaluation of the expression containing the function
(_NSPrintForDebugger) will be abandoned.
(gdb)





reply via email to

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