Error with ListCtrl on win98 (C++ assertion failed)

Thank you for your quick answer.

The task manager gives me 177 GDI objects (memory used :
27Mb). Task Manager itself uses 116 GDI objects. I also
have the same version of netscape messenger installed and
running on winXP and win98 and 286 GDI objects are
reported...
Since ListCtrl seems to be pointed at by the traceback, I
had not envisaged other possiblities. My application also
uses 4 wx.Windows subclasses with a to
draw graphs (the drawing process is a direct copy of the
example of the wxPython demo "threads"). the painting part
is :
def OnPaint(self, evt):
        width, height = size =self.GetSize()
        bmp = wx.EmptyBitmap(width, height)

        dc = wx.MemoryDC()
        dc.SelectObject(bmp)
        
        self.Draw(dc, size)

        wdc = wx.PaintDC(self)
        wdc.BeginDrawing()
        wdc.Blit(0,0, size[0], size[1], dc, 0,0)
        wdc.EndDrawing()

        dc.SelectObject(wx.NullBitmap)

Is there a chance that this kind of construct is too heavy
on the system ? Should I use a double buffered DC instead
?(but then I assumed it would be even harder on the
system)

In addition, the ListCtrl is the virtually the first
widget created so I doubt that the following graphs
actually influence anything.

As for the number of users of win98, you'll be amazed at
how many win98 computers are still around in a production
plant. My tool is supposed to be simple one collecting
data from a measuring device and keeping track of it. I do
not want users to say that they wont use it because it
forces them to buy a new computer...

Best regards,

F. Capiez

   Hello,

   I don't think it's a bug, or better, it's not a

wxPython bug. It's a

Windows bug. I often got in the past this kind of errors

with older Windows

version, because older Windows were not able to allocate

enough resources to

create all the controls I needed. Just out of curiosity,

could you please do

the following on your XP machine:

1) Open the Windows Task Manager;
2) Select the "View" menu ==> "Select Columns";
3) Check the GDI object checkbox;
4) Run you application in Python.

And report the number of GDI objects used by your app? I

strongly suspect

that your app is somewhat too "resource consuming" to run

on Windows 98.

BTW, you really meant that *a lot* of your users still

have Windows 98???

Andrea.

"Imagination Is The Only Weapon In The War Against

Reality."

http://xoomer.virgilio.it/infinity77
From: "キャピエ ファブリス" <kappamonagare@yahoo.co.jp>
To: <wxpython-users@lists.wxwidgets.org>
Sent: Friday, February 03, 2006 12:11 AM
Subject: [wxPython-users] Error with ListCtrl on win98

(C++ assertion

failed)

Dear list,

I have developped an application with wxpython under
WinXPsp2 which include a wx.ListCtrl.
It runs perfectly fine as a python script as well as a
Py2exed compiled file on my development platform.
However, if I test the py2exed version on a win98
platform, I get the following error :

Traceback (most recent call last):
  File "BNTreaderWx.py", line 1546, in ?
  File "BNTreaderWx.py", line 838, in __init__
  File "BNTreaderWx.py", line 729, in __init__
  File "wx\_controls.pyc", line 4502, in __init__
wx._core.PyAssertionError: C++ assertion

"wxAssertFailure"

failed in ..\..\src\msw\control.cpp(162):
CreateWindowEx("SysListView32", flags=5201034d,
ex=00000200) failed

Anyone knows where this comes from and how to get rid

of

it ? A lot of my users depend on win98 so it is quite a
problem for me.
I tried to google this list with "SysListView32" but

could

not find anything.

more details concerning my environment :
I use Python 2.42 with wxPython 2.6.2.1 (unicode

version

···

----- Original Message -----

as my soft include Japanese characters, I have included
unicows.dll)
the ListCtrl is subclassed as following :

wx.ListCtrl.__init__(self,parent, id,

style=wx.LC_REPORT|wx.LC_AUTOARRANGE|wx.LC_EDIT_LABELS|wx.LC_SINGLE_SEL|wx.L
C_HRULES|wx.SUNKEN_BORDER|wx.FULL_REPAINT_ON_RESIZE)

Have I forgotten something ?
is this a bug ?

thank you in advance,
F. Capiez

--------------------------------------
GANBARE! NIPPON!
Yahoo! JAPAN JOC OFFICIAL INTERNET PORTAL SITE PARTNER
http://pr.mail.yahoo.co.jp/ganbare-nippon/