bugGNUstep - Bugs: bug #12299, NSMatrix segfaults on row/column...

Group
 
 

bug #12299: NSMatrix segfaults on row/column removal

Submitter:  Stefan Urbanek <stefanu>
Submitted:  Sun 13 Mar 2005 05:01:19 PM UTC
   
 
Category:  Gui/AppKit Severity:  2 - Minor
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  CaS
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 19 May 2005 12:07:10 PM UTC, comment #3: 

Marked as closed, as there was no follow up since Richards and my patch.

Fred Kiefer <FredKiefer>
Group Member
Mon 14 Mar 2005 10:55:45 AM UTC, comment #2: 

Fixed code producing uninitialised data in the cell array.

Richard Frith-Macdonald <CaS>
Group Member
Mon 14 Mar 2005 09:42:32 AM UTC, comment #1: 

I don't think the patch is correct ... it may well fix the problem, but only at the expense of introducing a memory leak as it fails to release cells in the region between _numCols and _maxCols.

You don't say where/how the crash happens ... but I assume it's a problem with a cell being released too many times for some reason (otherwise I don't see how leaking cells would fix it) ... but I think the extra release of the cell is happening elsewhere.

Please could you post a short test program demonstrating the problem, and I will attempt to locate where things are going wrong and fix it.

Richard Frith-Macdonald <CaS>
Group Member
Sun 13 Mar 2005 05:01:19 PM UTC, original submission:  

Following code and its variants (different ways of enumerating  rows and columns) caused NSMatrix to crash:

    while([matrix numberOfRows] > 0)
    {
        [matrix removeRow:0];
    }
In matrices with incomplete rows or columns it crashes too. By incomplete row I mean, for example rows with following number of cells per row: (4, 4, 4, 1).

Attached is a patch that fixes it.

Stefan Urbanek <stefanu>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #2722:  NSMatrix.m.patch added by stefanu (471B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 5 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-05-19 FredKiefer Open/ClosedIn Test Closed
2005-03-14 CaS StatusNone Fixed
    Open/ClosedOpen In Test
2005-03-14 CaS Assigned toNone CaS
2005-03-13 stefanu Attached File- Added NSMatrix.m.patch, #2300

Back to the top

Powered by Savane 3.13-caa5.
Corresponding source code