NPE during map scrolling due to off-EDT Swing calls

On 8/05/2009 at 3:07 PM uckelman wrote:

Ah, good. There have been a few strange bugs thrown up by the CounterDetailViewer that did not make sense. Hopefully they where caused by this.


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

Post generated using Mail2Forum (mail2forum.com)

Which reminds me that there is a bug in the CounterDetailViewer. If you quickly pick up a stack of units and start dragging them, the CounterDetailView still pops up and shows the contents of the stack eventhough the cursor is now nowhere near the stack and not hovering over it.

B.


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

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

BTW, that was the last Thread we were creating explicitly which was not
in the server code or in code less than a year old. I think that all of
our Swing calls are done from the EDT now—so that’s a whole category
of bugs we should not see again.


J.


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

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

This is easy to fix (I’ve already fixed it) if having the CDV pop up when
a mouse button is depressed is not essential behavior. The one area where
I can see that this makes much difference is that you can’t get a CDV while
you’re hovering during a lasso drag.


J.


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

Post generated using Mail2Forum (mail2forum.com)

On May 8, 2009, at 3:26 PM, Joel Uckelman wrote:

Yay!


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

Post generated using Mail2Forum (mail2forum.com)

Thus spake Joel Uckelman:

I’ve commited a fix to 3.1@5593 which preserves the behavior the CDV had
before (except that it won’t pop up during piece drags, which was the bug).


J.


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

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

With a smaller map, you have less time to accelerate before you hit
an edge.


J.


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

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

I just tried this. It’s fine that the border is 30px instead of 15. However,
scrolling feels agonizingly slow to me, and the range over which you can move
the mouse to affect acceleration is far too small.


J.


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

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

I think it’s worth trying, but for 3.2. I’ve uploaded a build which
I think has approximately the same behavior as the old autoscroll
(5px/20ms, but smoother, and with a 30px boundary). Try svn5597 and let
me know if this is the same for you:

nomic.net/~uckelman/tmp/vassal/


J.


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

Post generated using Mail2Forum (mail2forum.com)

Yes, I agree, on a large map, the top speed is way too slow. This was a rough hack to test an idea, and needs tweaking, but you get the idea.


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

Post generated using Mail2Forum (mail2forum.com)

Huh? I just installed this and tried Afika II and scrolling is positively glacial, more than twice as slow as the current 3.1 version. It is smooth though!


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

Post generated using Mail2Forum (mail2forum.com)

Old Vassal took 6 seconds to scroll right accross the Afrika II map (8.3 Scenario). svn5597 takes 12 seconds, but definitely much smoother.


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

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

I don’t understand what’s going on here. 3.1.4 takes about 30 seconds to
scroll across the whole map for me, as does svn5597.


J.


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

Post generated using Mail2Forum (mail2forum.com)

Thus spake Joel Uckelman:

Brent, I just committed to 3.1@5599 something I’d like you to test. I
adjusted the scroller to try to take into account at each firing of
the timing event how long it’s been since the previous firing, and then
adjust the amount scrolled based on that.

Now it takes me 12 seconds to scroll across the whole map. This is too
slow, but I think it will also take just about 12 seconds for you, as
well. We should both be autoscrolling at a rate of 0.25px/ms now.


J.


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

Post generated using Mail2Forum (mail2forum.com)

Yes, 12 seconds for me.

B.


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

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

Good. Now we’re getting the same results across machines. I’ve changed the
velocity to 0.5px/ms in 3.1@5601, which should give you the same scroll
speed in 3.1.4 as with the 3.1 branch. (For me, this is about twice as fast
as 3.1.4 is, but I see no problem with that, since 3.1.4 was far too slow
for me.) We can work on improving this for 3.2.

I’m uploading 3.1.5-svn5602 now, which I’d like to release as 3.1.5, barring
objections.


J.


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

Post generated using Mail2Forum (mail2forum.com)