Assertion error in 2.9.4.1 grid (reproducible in demo)

Mears wrote:

Pop open the demo and launch the draggable row/column grid.

Click the divider between rows 1 and 2 and resize row 1 to be larger
than it was before. Once it's resized, drag row 1 beneath row 3. This is
the result:

Traceback (most recent call last):
File "/disk01/data/davidsj2/wxPython-2.9.4.0/demo/GridDragable.py", line
186, in OnRowMove
self.GetTable().MoveRow(frm,to)
File "/disk01/data/davidsj2/wxPython-2.9.4.0/demo/GridDragable.py", line
150, in MoveRow
grid.ProcessTableMessage(msg)
File "/disk01/lib/python2.7/site-packages/wx-2.9.4-gtk2/wx/grid.py",
line 1253, in ProcessTableMessage
return _grid.Grid_ProcessTableMessage(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "uiIndex < m_nCount" failed at
/disk01/data/davidsj2/wxPython-src-2.9.4.0/include/wx/dynarray.h(835) in
Item():

Thanks. The fix shouldn't be too difficult if you would like to submit a patch.

···

--
Robin Dunn
Software Craftsman

Opened an issue on Trac with a patch: wxTrac has been migrated to GitHub Issues - wxWidgets

···

On Friday, January 25, 2013 11:11:48 AM UTC-7, Robin Dunn wrote:

Mears wrote:

Pop open the demo and launch the draggable row/column grid.

Click the divider between rows 1 and 2 and resize row 1 to be larger

than it was before. Once it’s resized, drag row 1 beneath row 3. This is

the result:

Traceback (most recent call last):

File “/disk01/data/davidsj2/wxPython-2.9.4.0/demo/GridDragable.py”, line

186, in OnRowMove

self.GetTable().MoveRow(frm,to)

File “/disk01/data/davidsj2/wxPython-2.9.4.0/demo/GridDragable.py”, line

150, in MoveRow

grid.ProcessTableMessage(msg)

File “/disk01/lib/python2.7/site-packages/wx-2.9.4-gtk2/wx/grid.py”,

line 1253, in ProcessTableMessage

return _grid.Grid_ProcessTableMessage(*args, **kwargs)

wx._core.PyAssertionError: C++ assertion “uiIndex < m_nCount” failed at

/disk01/data/davidsj2/wxPython-src-2.9.4.0/include/wx/dynarray.h(835) in

Item():

Thanks. The fix shouldn’t be too difficult if you would like to submit
a patch.


Robin Dunn

Software Craftsman

http://wxPython.org

Hey, I noticed that grid was fixed in SVN. FYI, the demo will still not work correctly unless the second patch from the ticket (GridDraggable.py.patch) is also applied.

···

On Monday, January 28, 2013 1:37:50 PM UTC-7, Mears wrote:

Opened an issue on Trac with a patch: http://trac.wxwidgets.org/ticket/15007

On Friday, January 25, 2013 11:11:48 AM UTC-7, Robin Dunn wrote:

Mears wrote:

Pop open the demo and launch the draggable row/column grid.

Click the divider between rows 1 and 2 and resize row 1 to be larger

than it was before. Once it’s resized, drag row 1 beneath row 3. This is

the result:

Traceback (most recent call last):

File “/disk01/data/davidsj2/wxPython-2.9.4.0/demo/GridDragable.py”, line

186, in OnRowMove

self.GetTable().MoveRow(frm,to)

File “/disk01/data/davidsj2/wxPython-2.9.4.0/demo/GridDragable.py”, line

150, in MoveRow

grid.ProcessTableMessage(msg)

File “/disk01/lib/python2.7/site-packages/wx-2.9.4-gtk2/wx/grid.py”,

line 1253, in ProcessTableMessage

return _grid.Grid_ProcessTableMessage(*args, **kwargs)

wx._core.PyAssertionError: C++ assertion “uiIndex < m_nCount” failed at

/disk01/data/davidsj2/wxPython-src-2.9.4.0/include/wx/dynarray.h(835) in

Item():

Thanks. The fix shouldn’t be too difficult if you would like to submit
a patch.


Robin Dunn

Software Craftsman

http://wxPython.org

Mears wrote:

Hey, I noticed that grid was fixed in SVN. FYI, the demo will still not
work correctly unless the second patch from the ticket
(GridDraggable.py.patch) is also applied.

Sorry, for some reason I didn't notice the 2nd patch file. I'll look at it later today, but can you give me a brief explanation of what it changes in the demo and why? The demo seemed to work fine for me with just the library file changes.

P.S. Next time please include all the changes in a single patch file and also please use the unified diff format as it is easier to parse by a human.

···

--
Robin Dunn
Software Craftsman

If you resize the 2nd row and drag it under row 3, you should get the same crash as mentioned in the OP. The change to the demo was to send an APPEND vs INSERTED messages when adding to the end of the sheet. Don’t be fooled if you just apply the demo patch without the first and it works. If memory serves, the patch to the library was to fix an error that only happens sporadically.

···

On Monday, February 4, 2013 2:16:20 PM UTC-7, Robin Dunn wrote:

Sorry, for some reason I didn’t notice the 2nd patch file. I’ll look at
it later today, but can you give me a brief explanation of what it
changes in the demo and why? The demo seemed to work fine for me with
just the library file changes.