Create account / Log in

Nesting Toolbar Menus causes Vassal to freeze

Topics related to the main Vassal engine.

Moderators: Tim M, uckelman

Nesting Toolbar Menus causes Vassal to freeze

Postby uckelman » June 25th, 2009, 8:31 am

Thus spake "Brent Easton":
Hi Rodney,

Do you have time to look at this one? It is your code and you may have some i
nsight into what is going wrong. I've spent a couple of hours on it and am no
t getting very far.

The symptom of Vassal freezing is just a side effect of deeply nested Toolbar
menus not rebuilding properly. If you build a series of nested Toolbar menus
, no submenu appears for the items on the second level down. If you pick one
of these items, Swing hangs trying to run non-existent items.

As far as I can see, there is some sort of race condition caused by the sched
uling of the buildMenu() method by scheduleBuildMenu(). The menu structure ap
pears to build itself correctly, then proceeds to unbuild itself in an orderl
y fashion until finally, only the top-level is built, with it's submenu of 2n
d level items and nothing else.

I'll have a look at it, since you think it's a threading problem. It's
not my code though---almost all of the commits are Rodney's. (I'll bet
you're thinking of the menu-handling code for the menu bar, which I did


Messages mailing list ...

Post generated using Mail2Forum (
User avatar
Site Admin
Posts: 8380
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 3 guests