[kdiagram] [Bug 383160] Crash on showing investment price chart
Ralf Habacker
bugzilla_noreply at kde.org
Mon Aug 7 08:43:34 UTC 2017
https://bugs.kde.org/show_bug.cgi?id=383160
--- Comment #5 from Ralf Habacker <ralf.habacker at freenet.de> ---
(In reply to NSLW from comment #4)
> (In reply to Thomas Baumgart from comment #3)
it
> doesn't crash for me on master branch of KMM. Thomas, can you confirm Ralf's
> crash?
If it does not crash it does not mean that there is no bug. See the
implementation of CartesianDiagramDataCompressor::mapsToModelIndex
My observations shows that m_data is constructed as following:
m_data
[0] column 0
[0] row 0 of column 0
[1] row 1 of column 0
[m] row m of column 0
[1] column 1
[0] row 0 of column 1
[1] row 1 of column 1
[p] row p of column 1
[n] column n
[0] row 0 of column n
[1] row 1 of column n
[q] row q of column n
return m_model && m_data.size() > 0 && m_data[ 0 ].size() > 0 &&
position.column >= 0 &&
position.column < m_data.size() &&
-> this checks if the requested column is in m_data
- position.row >=0 && position.row < m_data[ 0 ].size();
-> this checks if the requested row is in column 0, which may be wrong if
+ position.row >=0 && position.row < m_data[ position.column
].size();
instead the requested row needs to be checked against m_data[position.column]
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the KMyMoney-devel
mailing list