HTML Help File - Bug suspected

Hi to the Vassal team,
Let me take this opportunity to thank you guys for this incredible great piece of software !

I strongly suspect a bug in the Vassal Module Editor, regarding management of HTML Help Files.

I am currently developping a new module, and when it came to the step of the on-line help, I have stumbled on the following issue.
I have quickly developped a small test module to reproduced the issue, because my actual module is not yet finalized and it is not necessary to upload such a big file when a small one is enough to illustrate the problem.

My config:
Compaq 8510w laptop, with an Intel Core2 duo CPU T8100 @ 2.1GHz and 4 GBytes RAM
Video card AMD/ATI] RV630/M76 [Mobility Radeon HD 2600]
OS Linux Kubuntu (Precise) 12.04, Kernel linux 3.2.0-61-generic-pae + KDE 4.8.5
Java version 1.6.0_31 from Sun Microsystems Inc.
Vassal v 3.2.13 (latest at the time of writing)
In the prefs, I have chosen the French language but the issue happens also in English.

The steps to reproduce the pb

  1. Create a test directory name “DummyModule” somewhere on your local computer, and extract the provided zip archive in it.
    You should have the following directory hierarchy:
  • [DummyModule]
    • Dummy.vmod
    • [Help]
      • DummyHelpPage.html
      • Smiley.png
  1. Check the size of the Dummy.vmod module file. It should be 2,0 Kb.
  2. Start Vassal 3.2.13
  3. Menu File/Edit a module, then select Dummy.vmod
  4. In the Vassal Module Editor, under the “Help Menu” folder, add an “HTML Help File” element. In the properties window, type “Online Help” in the “Menu Entry” textfield.
  5. Click on the “Content: Select” button and browse to the local “DummyModule/Help” subdirectory. The path to this directory is now displayed in the corresponding textfield
  6. Type the filename “DummyHelpPage.html” in the “Starting Page:” textfield
    8 ) Validate by clicking “OK”
  7. Try to display the HTML help page in the Vassal module game window. Select Menu “Help/Online Help”. This opens a popup error window with the following message:
    Unable to Read File
    VASSAL was unable to read the file ‘file:/tmp/VASSAL/help/Online_Help/DummyHelpPage.html’.
  8. go back to the Vassal Module Editor and check the properties of the “Online Help” element. The previously selected path in the “Contents” textfield has been removed and is now back to “null”.

Now I try the following:

  1. Check the size of the Dummy.vmod module file. It should still be 2,0 Kb.
  2. Rename the “DummyModule/Help” subdirectory as “DummyModule/Online Help” (same name as the “Menu Entry” field of the “HTML Help File” element)
  3. Open the properties of the “Online Help” element, and click on the “Content: Select” button and browse to the local “DummyModule” subdirectory (and NOT the “Online Help” subdir).
  4. Make sure the “starting Page” textfield still has the “DummyHelpPage.html” filename, and Validate by clicking “OK”
  5. Save the module file and check its size. On my side, it is now 9,3 Kb.
  6. Try to display the Online Help HTML page.
  7. Nothing happens, even not the above popup message window

The Log console of Vassal display the following traceback:

java.io.IOException: Failed to show URI:file:/tmp/VASSAL/help/Online_Help/DummyHelpPage.html
at sun.awt.X11.XDesktopPeer.launch(XDesktopPeer.java:93) ~[na:1.6.0_31]
at sun.awt.X11.XDesktopPeer.browse(XDesktopPeer.java:82) ~[na:1.6.0_31]
at java.awt.Desktop.browse(Desktop.java:386) ~[na:1.6.0_31]
at VASSAL.tools.BrowserSupport.openURL(BrowserSupport.java:77) ~[Vengine.jar:na]
at VASSAL.build.module.documentation.BrowserHelpFile.launch(BrowserHelpFile.java:97) ~[Vengine.jar:na]
at VASSAL.build.module.documentation.BrowserHelpFile$1.actionPerformed(BrowserHelpFile.java:87) ~[Vengine.jar:na]
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012) ~[na:1.6.0_31]
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335) ~[na:1.6.0_31]
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404) ~[na:1.6.0_31]
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) ~[na:1.6.0_31]
at javax.swing.AbstractButton.doClick(AbstractButton.java:374) ~[na:1.6.0_31]
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:829) ~[na:1.6.0_31]
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:873) ~[na:1.6.0_31]
at java.awt.Component.processMouseEvent(Component.java:6288) ~[na:1.6.0_31]
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) ~[na:1.6.0_31]
at java.awt.Component.processEvent(Component.java:6053) ~[na:1.6.0_31]
at java.awt.Container.processEvent(Container.java:2045) ~[na:1.6.0_31]
at java.awt.Component.dispatchEventImpl(Component.java:4649) ~[na:1.6.0_31]
at java.awt.Container.dispatchEventImpl(Container.java:2103) ~[na:1.6.0_31]
at java.awt.Component.dispatchEvent(Component.java:4475) ~[na:1.6.0_31]
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4633) ~[na:1.6.0_31]
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4297) ~[na:1.6.0_31]
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4227) ~[na:1.6.0_31]
at java.awt.Container.dispatchEventImpl(Container.java:2089) ~[na:1.6.0_31]
at java.awt.Window.dispatchEventImpl(Window.java:2588) ~[na:1.6.0_31]
at java.awt.Component.dispatchEvent(Component.java:4475) ~[na:1.6.0_31]
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:675) ~[na:1.6.0_31]
at java.awt.EventQueue.access$300(EventQueue.java:96) ~[na:1.6.0_31]
at java.awt.EventQueue$2.run(EventQueue.java:634) ~[na:1.6.0_31]
at java.awt.EventQueue$2.run(EventQueue.java:632) ~[na:1.6.0_31]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.6.0_31]
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:108) ~[na:1.6.0_31]
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:119) ~[na:1.6.0_31]
at java.awt.EventQueue$3.run(EventQueue.java:648) ~[na:1.6.0_31]
at java.awt.EventQueue$3.run(EventQueue.java:646) ~[na:1.6.0_31]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.6.0_31]
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:108) ~[na:1.6.0_31]
at java.awt.EventQueue.dispatchEvent(EventQueue.java:645) ~[na:1.6.0_31]
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275) ~[na:1.6.0_31]
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200) ~[na:1.6.0_31]
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190) ~[na:1.6.0_31]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185) ~[na:1.6.0_31]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177) ~[na:1.6.0_31]
at java.awt.EventDispatchThread.run(EventDispatchThread.java:138) ~[na:1.6.0_31]
2014-09-01 15:36:20,875 [3-AWT-EventQueue-0] ERROR VASSAL.build.module.documentation.BrowserHelpFile -
java.io.FileNotFoundException: /tmp/VASSAL/help/Online_Help/Online Help/DummyHelpPage.html (No such file or directory)
at java.io.FileOutputStream.open(Native Method) ~[na:1.6.0_31]
at java.io.FileOutputStream.(FileOutputStream.java:212) ~[na:1.6.0_31]
at java.io.FileOutputStream.(FileOutputStream.java:160) ~[na:1.6.0_31]
at VASSAL.build.module.documentation.BrowserHelpFile.extractContents(BrowserHelpFile.java:143) [Vengine.jar:na]
at VASSAL.build.module.documentation.BrowserHelpFile.launch(BrowserHelpFile.java:94) [Vengine.jar:na]
at VASSAL.build.module.documentation.BrowserHelpFile$1.actionPerformed(BrowserHelpFile.java:87) ~[Vengine.jar:na]
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012) ~[na:1.6.0_31]
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335) ~[na:1.6.0_31]
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404) ~[na:1.6.0_31]
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) ~[na:1.6.0_31]
at javax.swing.AbstractButton.doClick(AbstractButton.java:374) ~[na:1.6.0_31]
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:829) ~[na:1.6.0_31]
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:873) ~[na:1.6.0_31]
at java.awt.Component.processMouseEvent(Component.java:6288) ~[na:1.6.0_31]
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) ~[na:1.6.0_31]
at java.awt.Component.processEvent(Component.java:6053) ~[na:1.6.0_31]
at java.awt.Container.processEvent(Container.java:2045) ~[na:1.6.0_31]
at java.awt.Component.dispatchEventImpl(Component.java:4649) ~[na:1.6.0_31]
at java.awt.Container.dispatchEventImpl(Container.java:2103) ~[na:1.6.0_31]
at java.awt.Component.dispatchEvent(Component.java:4475) ~[na:1.6.0_31]
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4633) ~[na:1.6.0_31]
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4297) ~[na:1.6.0_31]
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4227) ~[na:1.6.0_31]
at java.awt.Container.dispatchEventImpl(Container.java:2089) ~[na:1.6.0_31]
at java.awt.Window.dispatchEventImpl(Window.java:2588) ~[na:1.6.0_31]
at java.awt.Component.dispatchEvent(Component.java:4475) ~[na:1.6.0_31]
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:675) ~[na:1.6.0_31]
at java.awt.EventQueue.access$300(EventQueue.java:96) ~[na:1.6.0_31]
at java.awt.EventQueue$2.run(EventQueue.java:634) ~[na:1.6.0_31]
at java.awt.EventQueue$2.run(EventQueue.java:632) ~[na:1.6.0_31]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.6.0_31]
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:108) ~[na:1.6.0_31]
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:119) ~[na:1.6.0_31]
at java.awt.EventQueue$3.run(EventQueue.java:648) ~[na:1.6.0_31]
at java.awt.EventQueue$3.run(EventQueue.java:646) ~[na:1.6.0_31]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.6.0_31]
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:108) ~[na:1.6.0_31]
at java.awt.EventQueue.dispatchEvent(EventQueue.java:645) ~[na:1.6.0_31]
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275) ~[na:1.6.0_31]
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200) ~[na:1.6.0_31]
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190) ~[na:1.6.0_31]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185) ~[na:1.6.0_31]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177) ~[na:1.6.0_31]
at java.awt.EventDispatchThread.run(EventDispatchThread.java:138) ~[na:1.6.0_31]

Looking forward to hearing from you,
And keep on the good job !

Christophe
cmassaloux@free.fr

Thus spake Chatmourai:

Unable to Read File
VASSAL was unable to read the file
‘file:/tmp/VASSAL/help/Online_Help/DummyHelpPage.html’.

Does this file exist? If so, does your user account have the necessary
permissions to read it?


J.

Yes, the file exists and I have all permissions to read it.
But it is not located where Vassal tries to find it.
That’s the point.
In the path “file:/tmp/VASSAL/help/Online_Help/DummyHelpPage.html”, the part “/Online_Help/” was not typed by me, and has been added by the Vassal Module Editor.

Christophe.

Thus spake Chatmourai:

Yes, the file exists and I have all permissions to read it.
But it is not located where Vassal tries to find it.

What I’m asking about is /tmp/VASSAL/help/Online_Help/DummyHelpPage.html,
not the original file. Please answer with respect to that path, as that’s
the path in the error message.


J.

I have monitored the /tmp dir while re-doing all the process described in my first post.

  • At first, there is no Vassal-related file in /tmp
  • When I add the “HTML File Help” element in the “Help Menu” and validate, a file named “VASSALhelp4826631485298207392.zip” appears in /tmp. It contains 2 files: “DummyHelpFile.html” and “Smiley.png”
  • Then I save the module. The content of /tmp does not change
  • Finally, I select menu “Help/Online Help” in the Vassal module window and got the same popup error message.
    But in /tmp, there is a now new directory “VASSAL” with the following file hierarchy:
    /tmp/VASSAL/help/Online_Help/
  • DummyHelpPage.html
  • Smiley.png

All files have correct permissions as can be seen hereunder (as you can guess, I am log in as “christophe”)
$ ls -ld /tmp/V*
drwxrwxr-x 3 christophe christophe 4096 sept. 2 11:57 /tmp/VASSAL
-rw-rw-r-- 1 christophe christophe 5418 sept. 2 11:57 /tmp/VASSALhelp4826631485298207392.zip

$ ls -lR /tmp/VASSAL
/tmp/VASSAL:
total 4
drwxrwxr-x 3 christophe christophe 4096 sept. 2 11:57 help
/tmp/VASSAL/help:
total 4
drwxrwxr-x 2 christophe christophe 4096 sept. 2 11:57 Online_Help
/tmp/VASSAL/help/Online_Help:
total 12
-rw-rw-r-- 1 christophe christophe 381 sept. 2 11:57 DummyHelpPage.html
-rw-rw-r-- 1 christophe christophe 4882 sept. 2 11:57 Smiley.png

So, finally, to answer your first question: Yes, there is a file “/tmp/VASSAL/help/Online_Help/DummyHelpPage.html” although I’m not sure at what moment it was dropped here (I mean before or after Vassal tried to find it)

Christophe

Thus spake Chatmourai:

So, finally, to answer your first question: Yes, there is a file
“/tmp/VASSAL/help/Online_Help/DummyHelpPage.html” although I’m not sure
at what moment it was dropped here (I mean before or after Vassal tried
to find it)

The normal way for that file to be created is on extraction from the
module—which lookls like it’s happening successfully. All of this
looks ok.

You mentioned that you’re using KDE. I think the bug you’re facing is
due to Java’s braindead way of handling desktop integraiton:

java-hamster.blogspot.de/2007/06 … rowse.html
bugs.java.com/bugdatabase/view_b … id=6486393

The solution to this problem will come with VASSAL 4 when we stop using
Java. I don’t see that there’s much else we can do until then; submit
a workaround patch if you want, though. The relevant code is in
VASSAL.tools.BrowserSupport.openURL(), which you can see is already
quite gnarly with workarounds due to our dependencies being unreliable
garbage.


J.

I tried to reproduce the issue with another Vassal installed under Windows and, as one could expect, all is working fine and the HTML help file is correctly displayed in a browser.
This is a great news for me because it means I will be able to provide a fully integrated help file with my module.
It doesn’t matter if I cannot acces it myself,as it is obviously targeted to other (hopefully non-KDE) users.

So,this suspected bug was indeed a real bug … but in KDE or Java, not in Vassal.

Many thanks for taking time to read my explanations and posting such relevant answers.

Best regards,
Christophe