Using JUCE 3.1.1-392-g0fa2b1c. My app makes extensive use of TableListBox and TableListBoxModel. Everything works great so far.
My customer is testing it out this week. Believe it or not, most of his computers on his manufacturing shop floor are Windows XP. But he's got one particular computer running Windows 8.1, and it is on that computer that things crash whenever he accesses a screen with a TableListBox.
I added some debugging, and what is happening with Windows 8.1 is in every instance, TableListBoxModel::paintCell() is being called with a row index 1 past the size of the table. If TableListBoxModel::getNumRows() returns the value 6, then TableListBoxModel::paintCell() gets called with row indexes 0 through 6, for a total of 7 rows. With that last invalid row, I segfault trying to read past the end of my internal table data.
Is this a Windows 8.1 specific bug? Is it a JUCE bug? Or should I modify all of my paintCell() and paintRowBackground() to ensure the row index is valid?
Here is the example from morning's test run with the new debug logging:
2015-06-02 14:52:55.576034 info - SQL: non-transaction: SELECT id, name FROM workorder.credit_terms ORDER BY name 2015-06-02 14:52:55.577037 trace - SQL: non-transaction: total number of rows in the result: 6 2015-06-02 14:52:55.577037 trace - tab "credit terms" contains 6 rows ... 2015-06-02 14:52:55.579038 trace - tab "credit terms" contains 6 rows 2015-06-02 14:52:55.583048 trace - tab "credit terms": painting background for row #0 of 6, width=636, height=22, selected=false 2015-06-02 14:52:55.583048 trace - tab "credit terms": painting row #0 of 6, column #1, width=298, height=22, selected=false ... 2015-06-02 14:52:55.589053 trace - tab "credit terms": painting row #5 column #2, text="Visa" 2015-06-02 14:52:55.589053 trace - tab "credit terms": painting background for row #6 of 6, width=636, height=22, selected=false 2015-06-02 14:52:55.589053 trace - tab "credit terms": painting row #6 of 6, column #1, width=298, height=22, selected=false ...segfault happens here because there are only 6 (indexes zero to five) but JUCE is making a call to paint a 7th row.