mirror of
https://github.com/OPM/ResInsight.git
synced 2026-11-13 09:37:29 -06:00
The "Number of Bins" field accepts any integer. With 0 bins the histogram vector is resized to zero and m_maxIndex wraps to SIZE_MAX, so addValue() writes histogram[0] on an empty vector. Set a minimum value of 1 on the bin count fields of the histogram data sources (also clamping values read from project files), and treat 0 bins as a single bin in RigHistogramCalculator. Crash stack (signature 0a750847b697): [3] RigHistogramCalculator::addValue(double) at RigStatisticsMath.cpp:546 [5] RimEnsembleSummaryVectorHistogramDataSource::compute(...) const at RimEnsembleSummaryVectorHistogramDataSource.cpp:255 [6] RimHistogramCurve::onLoadDataAndUpdate(bool) at RimHistogramCurve.cpp:365 [11] caf::PdmFieldUiCap<caf::PdmField<int> >::setValueFromUiEditor(QVariant const&, bool)