GridCellNumberEditor crash

Robin Dunn wrote:

Ronald A. Stack wrote:

Hi,

My application crashes when I edit a cell in a grid control. The cell
has a GridCellNumberEditor() editor attached. The crash happens just
after I change the value and click off cell (pressing enter works
fine). More specifically once the EVT_GRID_CELL_CHANGE event triggers
a call to my handler, I use the SetCellEditor function to attach a new
editor having an updated range. This is when the crash happens. I am
using wxPython-2.6.3.2, python-2.4.3 on Windows XP. I have also managed
to reproduce this in the GridStdEdRend.py demo application by adding the
following:

I'm not able to duplicate the crash. Your change to GridStdEdRend works for me on wx 2.6, 2.7 and 2.8.

Robin,

I have since upgraded python to 2.4.4, and have installed both
   wxPython2.6-win32-ansi-2.6.3.3-py24.exe
and
   wxPython2.7-win32-ansi-2.7.2.0-py24.exe.

I am using wxversion to switch between versions and can reproduce
the crash for both 2.6 and 2.7 in my code and the example code. The
behavior is slightly different for 2.7 for my application; just
pressing enter triggers the crash. I'd be sure it was something
silly that I was doing if it wasn't for the grid example exhibiting
the same behavior. There are no debug symbols so the only useful
info I could extract was that there was an invalid memory location
accessed. I'll try compiling from source to see if can't track it
down. Let me know if you have any other ideas.

Thanks,

Ron

···

--
-------------------------------------------
Ronald A. Stack, Distant Focus Corporation
217-384-8350 (phone), 217-333-4050 (fax)

Ronald A. Stack wrote:

Robin Dunn wrote:

Ronald A. Stack wrote:

Hi,

My application crashes when I edit a cell in a grid control. The cell
has a GridCellNumberEditor() editor attached. The crash happens just
after I change the value and click off cell (pressing enter works
fine). More specifically once the EVT_GRID_CELL_CHANGE event triggers
a call to my handler, I use the SetCellEditor function to attach a new
editor having an updated range. This is when the crash happens. I am
using wxPython-2.6.3.2, python-2.4.3 on Windows XP. I have also managed
to reproduce this in the GridStdEdRend.py demo application by adding the
following:

I'm not able to duplicate the crash. Your change to GridStdEdRend works for me on wx 2.6, 2.7 and 2.8.

Robin,

I have since upgraded python to 2.4.4, and have installed both
  wxPython2.6-win32-ansi-2.6.3.3-py24.exe
and
  wxPython2.7-win32-ansi-2.7.2.0-py24.exe.

I am using wxversion to switch between versions and can reproduce
the crash for both 2.6 and 2.7 in my code and the example code. The
behavior is slightly different for 2.7 for my application; just
pressing enter triggers the crash. I'd be sure it was something
silly that I was doing if it wasn't for the grid example exhibiting
the same behavior. There are no debug symbols so the only useful
info I could extract was that there was an invalid memory location
accessed. I'll try compiling from source to see if can't track it
down. Let me know if you have any other ideas.

Just to make sure we are running the same thing please make a small standalone sample that shows the problem.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!