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

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #12299: NSMatrix segfaults on row/column removal

Submitted by:  Stefan Urbanek <stefanu>
Submitted on:  Sun 13 Mar 2005 05:01:19 PM UTC  
 
Category: Gui/AppKitSeverity: 2 - Minor
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: Richard Frith-Macdonald <CaS>
Open/Closed: Closed

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>
Project 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>
Project MemberIn charge of this item.
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>
Project MemberIn charge of this item.
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>
Project Member

 

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

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 5 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Thu 19 May 2005 12:07:10 PM UTCFredKieferOpen/ClosedIn Test=>Closed
Mon 14 Mar 2005 10:55:45 AM UTCCaSStatusNone=>Fixed
  Open/ClosedOpen=>In Test
Mon 14 Mar 2005 09:42:32 AM UTCCaSAssigned toNone=>CaS
Sun 13 Mar 2005 05:01:19 PM UTCstefanuAttached File-=>Added NSMatrix.m.patch, #2300

Back to the top


Powered by Savane 3.1-cleanup1