Strange errors - C++ assertion "!(lvi.mask & LVIF_STATE)" failed in

I have two clients who installed my software on Vista recently and they are getting strange errors here and there, but so far I can not recreate it on other Windows Platforms (XP and 2000 - can't try on Vista as I don't a machine running it). I had another client report a similar error some time ago, but again we can not pin it down on when it does happen.

The clients install a py2exe'd version of the software.

Any tips on how I could debug this would be very appreciated.

Best regards
Werner

Following some of the errors they see:

Error in sys.excepthook:
Traceback (most recent call last):
  File "twcb.py", line 277, in MyExceptionHandler
  File "twcb.py", line 363, in ReportException
  File "wx\_windows.pyo", line 688, in ShowModal
wx._core.PyAssertionError: C++ assertion "!(lvi.mask & LVIF_STATE)" failed in ..\..\src\msw\listctrl.cpp(2284): we don't support state callbacks yet!

Original exception was:
Traceback (most recent call last):
  File "dialogratingtype2.pyo", line 333, in OnItemSelected
  File "multilangdialogs.pyo", line 129, in LoadItemData
  File "wx\_windows.pyo", line 688, in ShowModal
wx._core.PyAssertionError: C++ assertion "!(lvi.mask & LVIF_STATE)" failed in ..\..\src\msw\listctrl.cpp(2284): we don't support state callbacks yet!
.pyo", line 13641, in Notify
PyAssertionError: C++ assertion "!(lvi.mask & LVIF_STATE)" failed in ..\..\src\msw\listctrl.cpp(2284): we don't support state callbacks yet!

- The line 363 in ReportException is "dlg.ShowModal()" and "dlg" is my error reporting dialog which contains some static text controls, some text controls and a few buttons.
- The line 129 in LoadItemData is "val = dlg.ShowModal()" and "dlg" is a wx.MessageDialog.
- The dialogratingtype2 has one listctrl and a few static text, few text controls and a few buttons.

C:\Program Files\TheWineCellarBook\lib\library.zip\fixedpoint.py:300: RuntimeWarning: tp_compare didn't return -1 or -2 for exception
", line 13641, in Notify
PyAssertionError: C++ assertion "!(lvi.mask & LVIF_STATE)" failed in ..\..\src\msw\listctrl.cpp(2284): we don't support state callbacks yet!

This one is really confusing, as fixedpoint.py (from the FixedPoint module) does not have a line 13641 and I don't see what the relation with listctrl is.

Werner F. Bruhin wrote:

I have two clients who installed my software on Vista recently and they are getting strange errors here and there, but so far I can not recreate it on other Windows Platforms (XP and 2000 - can't try on Vista as I don't a machine running it). I had another client report a similar error some time ago, but again we can not pin it down on when it does happen.

The clients install a py2exe'd version of the software.

Any tips on how I could debug this would be very appreciated.

Best regards
Werner

Following some of the errors they see:

Error in sys.excepthook:
Traceback (most recent call last):
File "twcb.py", line 277, in MyExceptionHandler
File "twcb.py", line 363, in ReportException
File "wx\_windows.pyo", line 688, in ShowModal
wx._core.PyAssertionError: C++ assertion "!(lvi.mask & LVIF_STATE)" failed in ..\..\src\msw\listctrl.cpp(2284): we don't support state callbacks yet!

What version of wxPython are you using? It looks to me like this assert has been removed.

This one is really confusing, as fixedpoint.py (from the FixedPoint module) does not have a line 13641 and I don't see what the relation with listctrl is.

Since the assertion/exception appears to be happening in a callback, there isn't a Python stack frame that is returned to right away. So it's very easy for it to appear to be coming from unrelated places, it just depends on what python code happens to be executed next or if something else happens to clear the exception.

···

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

Hi Robin,

Robin Dunn wrote:

Werner F. Bruhin wrote:

...
Following some of the errors they see:

Error in sys.excepthook:
Traceback (most recent call last):
File "twcb.py", line 277, in MyExceptionHandler
File "twcb.py", line 363, in ReportException
File "wx\_windows.pyo", line 688, in ShowModal
wx._core.PyAssertionError: C++ assertion "!(lvi.mask & LVIF_STATE)" failed in ..\..\src\msw\listctrl.cpp(2284): we don't support state callbacks yet!

What version of wxPython are you using? It looks to me like this assert has been removed.

wxPython 2.6.3.3 on Windows.

If this is 2.8 change will it/ can it be back ported?

Werner

Werner F. Bruhin wrote:

Hi Robin,

Robin Dunn wrote:

Werner F. Bruhin wrote:

...
Following some of the errors they see:

Error in sys.excepthook:
Traceback (most recent call last):
File "twcb.py", line 277, in MyExceptionHandler
File "twcb.py", line 363, in ReportException
File "wx\_windows.pyo", line 688, in ShowModal
wx._core.PyAssertionError: C++ assertion "!(lvi.mask & LVIF_STATE)" failed in ..\..\src\msw\listctrl.cpp(2284): we don't support state callbacks yet!

What version of wxPython are you using? It looks to me like this assert has been removed.

wxPython 2.6.3.3 on Windows.

If this is 2.8 change will it/ can it be back ported?

Possibly, as long as it doesn't make any binary incompatible changes.

···

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