wxListCtrl GetItem/SetItem crash

Robin Dunn wrote:

Richard Cooper wrote:
> In an application I am working on I have the following requirements:
>
> * I have a listCrtl which has quite a lot of data in it
> * I need to occasionally DeleteAllItems and repopulate it
> * I need to alter the colour and font of some of the list items
>
> I produced a minimal sample (below) which shows my problem.
> If I don't call doVisuals() then it works fine, but if I do
> call doVisuals() to change the colour and font then something
> about doing GetItem/SetItem means that some subsequent call to
> DeleteAllItems will cause a memory access violation if there is
> lots of data in the list.
>

There is some discussion going on in wx-dev about this, or something
similar. We should have a fix soon. (Of course with that many items
you'll be much better off using the virtual style anyway. :slight_smile:

Browsing wx-users I noticed that there this issue seems to have been fixed
in "wxwindows 2.4.0, win2k vc++6 crash in wxListCtrl", which is great news.
I now need to decide whether to build wxPython from CVS or wait for a new
release. Normally I would wait but I have a deadline approaching, so my
question to Robin is:

Are you planning to do another release in the near future and will it
include this fix?

Thanks,

Rich.

Richard Cooper wrote:

Browsing wx-users I noticed that there this issue seems to have been fixed
in "wxwindows 2.4.0, win2k vc++6 crash in wxListCtrl", which is great news.
I now need to decide whether to build wxPython from CVS or wait for a new
release. Normally I would wait but I have a deadline approaching, so my
question to Robin is:

Are you planning to do another release in the near future and will it
include this fix?

I havn't given it much thought yet as I'm trying to get caught up on some other things. If you want to try doing your own build with just this fix you only need to replace src/msw/listctrl.cpp with the latest CVS version (from the WX_2_4_BRANCH branch.) That will minimize the amount of change impact for you and give you 2.4.0.2 + this fix.

ยทยทยท

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