heal-research / HeuristicLab

HeuristicLab - An environment for heuristic and evolutionary optimization
https://dev.heuristiclab.com
GNU General Public License v3.0
39 stars 16 forks source link

DataTable- and DataRowVisualProperties are not fully backwards compatible #1623

Closed HeuristicLab-Trac-Bot closed 12 years ago

HeuristicLab-Trac-Bot commented 13 years ago

Issue migrated from trac ticket # 1623

milestone: HeuristicLab 3.3.6 | component: Analysis | priority: highest | resolution: done

2011-08-18 16:33:25: @discostu105 created the issue


The quality charts of older runs cannot be viewed anymore. HL crashes with an exception:

System.InvalidOperationException: Achsenobjekt - Das automatische Intervall weist nicht den richtigen Wert auf.
   bei System.Windows.Forms.DataVisualization.Charting.Axis.EstimateAxis(Double& minimumValue, Double& maximumValue, Boolean autoMaximum, Boolean autoMinimum)
   bei System.Windows.Forms.DataVisualization.Charting.Axis.EstimateAxis()
   bei System.Windows.Forms.DataVisualization.Charting.ChartArea.SetDefaultAxesValues()
   bei System.Windows.Forms.DataVisualization.Charting.ChartArea.SetData(Boolean initializeAxes, Boolean checkIndexedAligned)
   bei System.Windows.Forms.DataVisualization.Charting.ChartPicture.Paint(Graphics graph, Boolean paintTopLevelElementOnly)
   bei System.Windows.Forms.DataVisualization.Charting.Chart.OnPaint(PaintEventArgs e)
   bei System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
   bei System.Windows.Forms.Control.WmPaint(Message& m)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

The file in question (attached) is dated 04.02.2011.

HeuristicLab-Trac-Bot commented 13 years ago

2011-08-18 16:33:47: @discostu105 uploaded file QualityChartBug.hl (507.2 KiB)

HeuristicLab-Trac-Bot commented 13 years ago

2011-08-19 10:34:44: @mkommend changed status from new to assigned

HeuristicLab-Trac-Bot commented 13 years ago

2011-08-19 10:34:44: @mkommend changed owner from swagner to abeham

HeuristicLab-Trac-Bot commented 13 years ago

2011-08-19 10:34:44: @mkommend commented


I've also encountered this problem when working with older GP algorithm runs. It occurs when displaying all data tables and not only with the quality chart and that's why I think it is related to the changes in the EnhancedChart or the DataTableView.

HeuristicLab-Trac-Bot commented 13 years ago

2011-08-21 20:41:50: @abeham changed status from assigned to accepted

HeuristicLab-Trac-Bot commented 13 years ago

2011-08-22 00:42:54: @abeham commented


Thanks for reporting this issue. I looked into the problem and think I've found the cause. Actually the defect was introduced with changes made back in May. In the problematic change which is related to ticket #1465 I've added several visual properties to the DataTable, set to specific default values. I've missed adding these initializations to the storable constructor as well, as the deserializer does not use the default constructor for object initialization. All the new visual properties are set to their .Net defaults which creates an illegal configuration (axis interval set to 0-0). The storable constructor would need to also assign the default values. However another problem is that if you resaved such a DataTable these values are now stored within the file. So, I would fix this in an AfterDeserialization hook and check if the respective properties are all set to their defaults in which case I can then reset them to the default values that they should have.

I'll try to test and commit this tomorrow.

HeuristicLab-Trac-Bot commented 13 years ago

2011-08-22 10:20:15: @abeham changed status from accepted to reviewing

HeuristicLab-Trac-Bot commented 13 years ago

2011-08-22 10:20:15: @abeham changed component from Analysis.Views to Analysis

HeuristicLab-Trac-Bot commented 13 years ago

2011-08-22 10:20:15: @abeham changed title from Quality chart throws an exception for older runs to DataTable- and DataRowVisualProperties are not fully backwards compatible

HeuristicLab-Trac-Bot commented 13 years ago

2011-08-22 10:20:15: @abeham changed priority from high to highest

HeuristicLab-Trac-Bot commented 13 years ago

2011-08-22 10:20:15: @abeham changed milestone from HeuristicLab 3.3.x Backlog to HeuristicLab 3.3.6

HeuristicLab-Trac-Bot commented 13 years ago

2011-08-22 10:20:15: @abeham changed owner from abeham to mkommend

HeuristicLab-Trac-Bot commented 13 years ago

2011-08-22 10:20:15: @abeham commented


r6676

  • Added some range checks in the DataRowVisualPropertiesControl
  • Added a check to prevent axis minimum and maximum equality to avoid a crash
  • Added AfterDeserialization hooks to the visual properties to detect the illegal .Net default configuration
HeuristicLab-Trac-Bot commented 13 years ago

2011-09-13 15:20:42: @mkommend changed status from reviewing to readytorelease

HeuristicLab-Trac-Bot commented 13 years ago

2011-09-13 15:20:42: @mkommend changed owner from mkommend to abeham

HeuristicLab-Trac-Bot commented 13 years ago

2011-09-13 15:20:42: @mkommend commented


Thx for correcting this bug; everything works as expected.

HeuristicLab-Trac-Bot commented 12 years ago

2012-01-03 05:14:14: @s-wagner changed status from readytorelease to closed

HeuristicLab-Trac-Bot commented 12 years ago

2012-01-03 05:14:14: @s-wagner removed resolution