PyAssertionError on Win98

Just did another little test.

Wanted to see what area of code was using up all these resources, so I put in a MessageDialog after each call to gc. This showed clearly that the heavy use starts when I build the pages which later go onto a notebook.

But guess what due to this MessageDialog resources go down, but once in a while they go up again, actually they never when less then 50% free. Obviously this is not a solution but at least a pointer where I need to keep the gc.collect stuff and were to put whatever call to tell Win98 to free resources.

See you
Werner

Werner F. Bruhin wrote:

ยทยทยท

Werner F. Bruhin wrote:

Hi Andrea,

andrea_gavana@tin.it wrote:

Hello Werner,

File "wx\_controls.pyo", line 581, in __init__
wx._core.PyAssertionError: C++ assertion "wxAssertFailure" failed in ..\..\src\msw\control.cpp(162): CreateWindowEx("COMBOBOX", flags=46310043, ex=00000000) failed
  
This is not a py2exe, wxPython or Python faults. It is a Window$ one. This
is because Windows is not able to create another widget, probably because
you already have created a lot of them before. There are not enough resources
to build another widget on your Win98 machine.
Could you please try the following:

1) On your XP or 2000, launch you application;
2) Open the task manager (Ctrl+Alt+Del --> Task manager);
3) Visualize the GDI count: In the Task manager window, open the 3rd window
menu (I don't know its name in english, in italian is "Visualizza". Select
the sub-menu "Select Columns". Select GDI objects.
4) Now look at the new column for you application: How many GDI count you
have for it?

I don't know *why* Windows should have this limitation. As far as I know,
Unix/Linux machines don't have this limit. *Weird*.

Did a bit more testing/looking around and found the "Resource Meter" tool on Windows 98 (Start/Programs/Accessories/System Tools) when I run this and then start my application I get an warning at some point that more then 90% of resources are used up. At that point the Resource Meter shows GDI of about 50% free, but the System and User usages are down to about 5% (five) free!

So, I reinstalled the older version of the app (Python 2.3, wxPython 2.4) and I see more or less the same numbers, but NO PyAssertionError.

After that warning is shown things keep on working, the application starts up and works normally from then onwards. NOTE that resources get somehow released and go up to around 70% free.

I wonder if one could force this freeing of resources earlier on in the process?

I tried freeing these system and user resources on Win98 by adding some gc.collect() calls here and there and I also added a wx.Sleep after each call to gc to see if Windows wakes up and does it's clean up but to no effect.

I also tried wx.SafeYield(onlyIfNeeded = True) after each call to gc but no difference either.

Win98 only seems to reclaim these resources when it hits a real minimum (between 5 and 10% free).

Is there some call for Win98 to force this reclaim to happen?

See you
Werner

HTH.

Andrea.

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org