VASL development question

Hi all,

I’m gearing up to do some VASL development and have a few questions. To date here’s what I’ve done:

  1. Created a branch of the ASL-src trunk in SourceForge. This should have VASL 5.10 beta 1 if I’m following along correctly.

  2. Set up a VASL project in my development environment (IntelliJ), checked out my branch and built the code. It builds fine.

So, my questions:

  1. What version of Java should I be using?

  2. When I make changes to VASL how are those changes going to get picked up by VASSAL? VASSAL is looking for a module and my assumption is it’s getting the VASL class files from the vmod file. How do I override this behavior? Do I unzip the VASL module and point VASSAL to the directory?

  3. I’m getting an error running the VASSAL launcher:

2013-07-21 10:05:44,587 [0-main] INFO VASSAL.launch.StartUp - Starting
2013-07-21 10:05:44,590 [0-main] INFO VASSAL.launch.StartUp - OS Windows 7
2013-07-21 10:05:44,590 [0-main] INFO VASSAL.launch.StartUp - Java version 1.7.0_17
2013-07-21 10:05:44,591 [0-main] INFO VASSAL.launch.StartUp - VASSAL version 3.2.2
2013-07-21 10:05:44,634 [0-AWT-EventQueue-0] INFO VASSAL.launch.ModuleManager - Manager
2013-07-21 10:06:24,488 [0-AWT-EventQueue-0] INFO VASSAL.launch.ModuleManagerWindow - Exiting
2013-07-21 10:06:24,550 [0-Java2D Disposer] WARN VASSAL.tools.logging.LoggedOutputStream - java.lang.InterruptedException
2013-07-21 10:06:24,550 [0-Java2D Disposer] WARN VASSAL.tools.logging.LoggedOutputStream -

2013-07-21 10:06:24,550 [0-Java2D Disposer] WARN VASSAL.tools.logging.LoggedOutputStream - at java.lang.Object.wait(Native Method)
2013-07-21 10:06:24,550 [0-Java2D Disposer] WARN VASSAL.tools.logging.LoggedOutputStream -

2013-07-21 10:06:24,550 [0-Java2D Disposer] WARN VASSAL.tools.logging.LoggedOutputStream - at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
2013-07-21 10:06:24,551 [0-Java2D Disposer] WARN VASSAL.tools.logging.LoggedOutputStream -

2013-07-21 10:06:24,551 [0-Java2D Disposer] WARN VASSAL.tools.logging.LoggedOutputStream - at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
2013-07-21 10:06:24,551 [0-Java2D Disposer] WARN VASSAL.tools.logging.LoggedOutputStream -

2013-07-21 10:06:24,551 [0-Java2D Disposer] WARN VASSAL.tools.logging.LoggedOutputStream - at sun.java2d.Disposer.run(Disposer.java:145)
2013-07-21 10:06:24,551 [0-Java2D Disposer] WARN VASSAL.tools.logging.LoggedOutputStream -

2013-07-21 10:06:24,551 [0-Java2D Disposer] WARN VASSAL.tools.logging.LoggedOutputStream - at java.lang.Thread.run(Thread.java:722)
2013-07-21 10:06:24,551 [0-Java2D Disposer] WARN VASSAL.tools.logging.LoggedOutputStream -

2013-07-21 10:06:28,475 [0-main] INFO VASSAL.launch.StartUp - Starting
2013-07-21 10:06:28,480 [0-main] INFO VASSAL.launch.StartUp - OS Windows 7
2013-07-21 10:06:28,480 [0-main] INFO VASSAL.launch.StartUp - Java version 1.7.0_17
2013-07-21 10:06:28,481 [0-main] INFO VASSAL.launch.StartUp - VASSAL version 3.2.2
2013-07-21 10:06:28,482 [0-main] INFO VASSAL.launch.Launcher - Player
2013-07-21 10:06:28,527 [0-main] ERROR VASSAL.tools.ErrorDialog -
java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:454) ~[na:1.7.0_17]
at java.lang.Integer.parseInt(Integer.java:527) ~[na:1.7.0_17]
at VASSAL.launch.Launcher.(Launcher.java:120) ~[Vengine.jar:na]
at VASSAL.launch.Player.(Player.java:61) ~[Vengine.jar:na]
at VASSAL.launch.Player.main(Player.java:56) ~[Vengine.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_17]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_17]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_17]
at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_17]
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) ~[idea_rt.jar:na]
2013-07-21 10:12:48,557 [0-main] INFO VASSAL.launch.StartUp - Starting
2013-07-21 10:12:48,564 [0-main] INFO VASSAL.launch.StartUp - OS Windows 7
2013-07-21 10:12:48,564 [0-main] INFO VASSAL.launch.StartUp - Java version 1.7.0_17
2013-07-21 10:12:48,566 [0-main] INFO VASSAL.launch.StartUp - VASSAL version 3.2.2
2013-07-21 10:12:48,566 [0-main] INFO VASSAL.launch.Launcher - Player
2013-07-21 10:12:48,699 [0-main] ERROR VASSAL.tools.ErrorDialog -
java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:454) ~[na:1.7.0_17]
at java.lang.Integer.parseInt(Integer.java:527) ~[na:1.7.0_17]
at VASSAL.launch.Launcher.(Launcher.java:120) ~[Vengine.jar:na]
at VASSAL.launch.Player.(Player.java:61) ~[Vengine.jar:na]
at VASSAL.launch.Player.main(Player.java:56) ~[Vengine.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_17]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_17]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_17]
at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_17]
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) ~[idea_rt.jar:na]

Thus spake djsullivan:

Hi all,

I’m gearing up to do some VASL development and have a few questions. To
date here’s what I’ve done:

  1. Created a branch of the ASL-src trunk in SourceForge. This should
    have VASL 5.10 beta 1 if I’m following along correctly.

Yes, but please specify a commit message when you commit.

So, my questions:

  1. What version of Java should I be using?

Java 5 or later should work.

  1. When I make changes to VASL how are those changes going to get picked
    up by VASSAL? VASSAL is looking for a module and my assumption is it’s
    getting the VASL class files from the vmod file. How do I override this
    behavior?

It’s best not to.

Do I unzip the VASL module and point VASSAL to the directory?

No.

The easy way to test changes to VASL is to rebuild the module with
make. The hard way would be to run the Player/Editor manually and
add the directory with the VASL classes to the classpath.

  1. I’m getting an error running the VASSAL launcher:

I see some IntelliJ classes in one of the stack traces. That’s not
normal. How are you launching VASSAL?


J.

Will do.

I’ll have to rebuild the module every time I run VASL during the development cycle? That’s a major bummer. That means no Java debugger. I don’t know anything about make and the make file is for Unix. I know even less about Unix - I’m using Windows. How would I do this?

Is it possible to set up the VASSAL development environment and run the whole she-bang from my IDE? That’s how I did it last time.

I’ve set it up as a run configuration in IntelliJ per the develop setup instruction using VASSAL.launch.Player as the main class. I can launch the module manager this way without problem.

Thanks for the help Joel.

Thus spake djsullivan:

“uckelman” wrote:

  1. When I make changes to VASL how are those changes going to get
    picked
    up by VASSAL? VASSAL is looking for a module and my assumption is
    it’s
    getting the VASL class files from the vmod file. How do I override
    this
    behavior?

It’s best not to.

Do I unzip the VASL module and point VASSAL to the directory?

No.

The easy way to test changes to VASL is to rebuild the module with
make. The hard way would be to run the Player/Editor manually and
add the directory with the VASL classes to the classpath.

I’ll have to rebuild the module every time I run VASL during the
development cycle? That’s a major bummer. That means no Java debugger. I
don’t know anything about make and the make file is for Unix. I know
even less about Unix - I’m using Windows. How would I do this?

On Windows, you wouldn’t use the Makefile, unless you had cygwin
installed. I created the Makefile to expedite the 3.2-compatibility work
I was doing. I have no idea how anyone was packaging the VASL module
before I did that—maybe it was being done manually with a ZIP
archiver.

What’s the connection between this and using a debugger? I don’t follow.

Is it possible to set up the VASSAL development environment and run the
whole she-bang from my IDE? That’s how I did it last time.

It should be, but I can’t tell you precisely how you’d need to configure
your IDE. (I code in Vim.)

I’ve set it up as a run configuration in IntelliJ per the develop setup
instruction using VASSAL.launch.Player as the main class. I can launch
the module manager this way without problem.

Are you passing the Player the --standalone option? I’ll bet you’re not,
and that’s why it’s failing.


J.

Are you passing the Player the --standalone option? I’ll bet you’re not

You’re right! Adding that fixed the problem above. Is that documented somewhere? :slight_smile:

What’s the connection between this and using a debugger? I don’t follow.

When working in and IDE there’s going to be two copies of the VASL class file - those in the vmod file and those created by the IDE when you build. My question was, Which one is VASSAL loading and how do I control it?

Fortunately VASSAL and/or IntelliJ is smart enough to put the new class files ahead in the class path, so the changes I’m making are being picked up when I run VASL. I’m off and running.

Thanks again for the help.

-David

P.S. When I start VASL I see a couple of weird things. I get a board error (not sure why) and the splash screen is really small. Is anyone else seeing this?

Thus spake djsullivan:

When working in and IDE there’s going to be two copies of the VASL class
file - those in the vmod file and those created by the IDE when you
build. My question was, Which one is VASSAL loading and how do I control
it?

The class files being loaded are probably the ones one the classpath,
not the ones inside the module, if they exist in both places. I don’t
know of any way to exercise direct control over this short of modifying
the class-loading code in VASSAL.

P.S. When I start VASL I see a couple of weird things. I get a board
error (not sure why) and the splash screen is really small. Is anyone
else seeing this?

  1. Is the small window you’re referring to the Welcome Wizard? That’s
    of the parts of VASSAL which I’d completely replace were we continuing
    on with this codebase for V4.

  2. Is the board file bdBFPJ actually present in that directory?


J.

  1. Yes.
  2. Yes it is, along with dozens of other boards. I removed the board and the error went away. There must be something wrong with the board.

Thus spake djsullivan:

“uckelman” wrote:

  1. Is the small window you’re referring to the Welcome Wizard? That’s
    of the parts of VASSAL which I’d completely replace were we continuing
    on with this codebase for V4.

  2. Is the board file bdBFPJ actually present in that directory?


J.

  1. Yes.
  2. Yes it is, along with dozens of other boards. I removed the board and
    the error went away. There must be something wrong with the board.

Where can I get that board?


J.

Sent to your nomic email. -David

Hi guys,

Vassal/SourceForge Noob here with a few questions…

What do I need to checkout to be able to debug an existing module to see how it works? VASSAL-src/trunk? or ASL-src/trunk? etc.

How do I create a branch of the trunk in SourceForge? (As the OP stated)

I’m trying to add the repo to IntelliJ but it won’t accept my SourceForge credentials. Do I need to be approved for this project or something?

Many Thanks!

Never mind, figured it out myself.