Nullpointerexception & "Include toolbar button to s

Hi,

I get an NullPointerexception with the following errorlog text:

The steps to create this error is:

  1. Create a new module
  2. Under “Main Map->Map Boards” create a new board with default options, call it fx A.
  3. Now add a Chart to the module, again with default values.
  4. Add a Tabbed Panel to the newly created Chart, call it fx. A
  5. Now add a Map to the newly created chart. Giving the Map a name.

If you try to save now, you are warned that there are two maps called “Main Map”, so better rename one of them before we proceed. (Why not give the new map a name like “Main Map 2” etc?)

  1. Add a board to the map you created in step 5
  2. Save the mod
8) Close it down
  1. Open it again by editing module. No problems when opening!

  2. Right click your “Main Map” the first one created when you made the module and not the one you created in p. 5 and select properties.

  3. Now click the “Include toolbar button to show/hide” and click OK.

  4. Save the module.

  5. Close the module.

  6. Open it again, and voila, an NullPointerException

Ok back to reality…

I want to have my main map as a window on its own and a tapped panel with different maps where I can place order counters… I’m not sure if I’m doing something wrong or there is indeed an “feature” in Vassal.

Cheers
Mark

I have added the above module right before point 10…

Thus spake “Cougar_DK”:

I’ve verified that this still happens with trunk@3939, but I don’t see
myself what the source of the problem is.

Brent, you’ve looked at ComponentSplitter more recently than anyone else;
would you mind taking a look at this one?


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

I looked a little at this one. I think it happens when there is no Map docked into the main window. I can fix it.

rk

Post generated using Mail2Forum (mail2forum.com)

I was able to reproduce the bug in v3.0, but it does not occur in the current 3.1 beta version.

rk

Post generated using Mail2Forum (mail2forum.com)

That’s good news, I was about to have a look at it.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Rodney Kinney”:

That’s peculiar. The test module works fine in trunk@3958 buf failed in
trunk@3939. I don’t see why the changes over that interval made a
difference for this.

Is it worth looking into why the problem went away?


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Sounds great guys.

I think some Map is calling ComponentSplitter.hideComponent() when no Map should be docked into the controls window. Since the offending code used to be wrapped in a SwingUtilities.invokeLater(), I’ll bet there’s some race condition where a Map calls hideComponent() before it un-docks itself from the main controls window.

rk

Post generated using Mail2Forum (mail2forum.com)