The menu bar is not redrawn

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
jabial
In need of some credit
In need of some credit
Posts: 6
Joined: Tue Feb 15, 2005 9:41 am

The menu bar is not redrawn

Post by jabial » Tue Feb 15, 2005 9:50 am

I currently have a problem with wxPython. Let me describe it :

- randomly, my menu bar becomes "frozen" (NOT with the freeze method, as thaw has no effect) : it is not redrawn
- I however still can, using the hints given by the status bar as I move the mouse over the *invisible* menu items, use my menu : the events are still handled
- Refresh, Update, UpdateWindowUI(...RECURSE) has no effet on the parent window or the menu bar object either
- Whenever I use a button of my application (or an invisible menu item) to open a dialog box, my menu bar unfreezes and I can see it again
- When binding pdb to the SIGINT signal handler, I can see that the stack frame is exaclty the same whether or not the bug is currently in (mal)function

Where can this come from?

PS : I tried two different versions of wxPython, so if it is a wxPython bug, it's spread over several versions

jabial
In need of some credit
In need of some credit
Posts: 6
Joined: Tue Feb 15, 2005 9:41 am

Post by jabial » Tue Feb 15, 2005 11:21 am

Update : if I click on a button that does absolutely nothing (calls a function that does "pass") it will work again!

Very curious bug indeed.

arkanes
Experienced Solver
Experienced Solver
Posts: 59
Joined: Sun Oct 17, 2004 12:05 am

Post by arkanes » Tue Feb 15, 2005 4:36 pm

Which platform is this? It sounds like there's some sort of event stall in the native code which is preventing the menu from being repainted. Can you provide sample code that reproduces the error?

jabial
In need of some credit
In need of some credit
Posts: 6
Joined: Tue Feb 15, 2005 9:41 am

Post by jabial » Tue Feb 15, 2005 5:18 pm

It's wxPython 2.5.3 on Python 2.3.5 on Debian unstable.

I can't provide the source code as it is a part of a corporate software.

jabial
In need of some credit
In need of some credit
Posts: 6
Joined: Tue Feb 15, 2005 9:41 am

Post by jabial » Thu Feb 17, 2005 4:19 pm

I finally worked around it by using a timer to SetLabel() on a button to its standard label every second. I really think that this is a wxWindows bug, but I don't have the time to take it further and GDB it.

jabial
In need of some credit
In need of some credit
Posts: 6
Joined: Tue Feb 15, 2005 9:41 am

Post by jabial » Fri Feb 18, 2005 8:32 am

I must add that this bug never happend in the Windows version, so in my opinion it is linked to the wxWindows on GTK implementation. It may even be a GTK bug, but I rather doubt it - anyway my GTK version is 1.2.10

jabial
In need of some credit
In need of some credit
Posts: 6
Joined: Tue Feb 15, 2005 9:41 am

Post by jabial » Fri Feb 18, 2005 8:35 am

Oops, got confused by gtk-config. Its is built on GTK2, whose version, is 2.6.2-3

Post Reply