Free cookie consent management tool by TermsFeed Policy Generator

Opened 9 years ago

Closed 7 years ago

#2540 closed defect (done)

StringConvertibleMatrixView may throw an exception if it is reused

Reported by: abeham Owned by: mkommend
Priority: medium Milestone: HeuristicLab 3.3.15
Component: Encodings.RealVectorEncoding Version: 3.3.13
Keywords: Cc:

Description (last modified by abeham)

This problem first appeared when changing a parameter of the PSO. To reproduce:

  1. Open the PSO sample
  2. Clear the value of the VelocityBounds parameter in the SwarmUpdater operator
  3. Set a new value and choose DoubleMatrix

A workaround exists, if the view is switched to another parameter and then back to the VelociyBounds parameter the matrix can be set without error.

Explanation: The ViewHost caches the current view. So after clearing the old matrix, its view as well as the matrix are still present in memory, but the view is hidden. When a new matrix is created, the view is reused again. When the Content property is changed UpdateData is called and there the non-empty collection of columns of this view are cleared. This triggers a cell validating event. The event however is canceled as it does not address a valid cell (the new DoubleMatrix doesn't have rows or columns). When UpdateData continues to clear the rows the datagridview complains that there are cells that are not comitted.

Change History (7)

comment:1 Changed 8 years ago by mkommend

  • Milestone changed from HeuristicLab 3.3.14 to HeuristicLab 3.3.15

comment:2 Changed 7 years ago by mkommend

  • Owner set to abeham
  • Status changed from new to assigned

comment:3 Changed 7 years ago by abeham

  • Owner changed from abeham to mkommend

comment:4 Changed 7 years ago by mkommend

  • Owner changed from mkommend to abeham
  • Status changed from assigned to reviewing

r15074: Changed StringConvertibleMatrixView to avoid CellValidating events of not existing cells.

comment:5 Changed 7 years ago by abeham

  • Description modified (diff)
  • Summary changed from Exception is thrown when setting a new DoubleMatrix for parameter VelocityBounds in the SwarmUpdater to StringConvertibleMatrixView may throw an exception if it is reused

Reviewed r15074: ok.

comment:6 Changed 7 years ago by abeham

  • Owner changed from abeham to mkommend
  • Status changed from reviewing to readytorelease

Please release when you think this has been tested enough.

comment:7 Changed 7 years ago by mkommend

  • Resolution set to done
  • Status changed from readytorelease to closed

r15237: Merged r15074 into stable.

Note: See TracTickets for help on using tickets.