8 Replies - 247 Views - Last Post: 25 June 2013 - 09:53 AM Rate Topic: -----

#1 Metal Wing  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 14
  • Joined: 04-March 12

Runtime Error in JavaHelp

Posted 24 June 2013 - 07:57 AM

Hello,

This is an issue that I have been running into for months and have been unable to solve it. We have continued to develop our JavaHelp; however, we are at a point where this needs to be fixed and I am out of ideas.

What this is: A Java Application

Folder structure:

-src
--HelpsetProject.java //Main method to launch JavaHelp
--help-hs.xml
--help-idx.xml
--help-map.xml
--help-toc.xml
--Images/ //images folder
--Topics/ //Topics folder for html files


The issue:

The application builds and compiles fine. It launches and runs fine, displaying the help as intended. However, fairly often when launched, the left side (item list/tree) will have a blank line or will be completely blank:

Posted Image

I originally thought that this issue was caused by missing map-toc tags, mistyped/mismatched xml tags/elements and general typos, as I am not the one actually creating these. However, I went over the files, validated and checked XML, double checked that all items on the list link to a file and clicked on every item in the list to see that it displays. The issue still persists, unless I missed something.

Here is the source code on GitHub.

Here you can download the executable and run it several times to see the error for yourself (It really is a chance for it to work/not work).

Any help is appreciated. Thank You!

Is This A Good Question/Topic? 0
  • +

Replies To: Runtime Error in JavaHelp

#2 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon




Reputation: 10566
  • View blog
  • Posts: 39,107
  • Joined: 27-December 08

Re: Runtime Error in JavaHelp

Posted 24 June 2013 - 08:00 AM

Please make sure to post a sample of code that demonstrates the problem and can be run. That way, it's easy for us to ascertain where to look, and the code is here for future readers.
Was This Post Helpful? 0
  • +
  • -

#3 g00se  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 2720
  • View blog
  • Posts: 11,445
  • Joined: 20-September 08

Re: Runtime Error in JavaHelp

Posted 24 June 2013 - 08:03 AM

Quote

Here is the source code on GitHub.
Your last commit was wrong - your project does not build

Quote

Here you can download the executable
No evidence to me of any malfunction

This post has been edited by g00se: 24 June 2013 - 08:06 AM
Reason for edit:: Clarification

Was This Post Helpful? 0
  • +
  • -

#4 Metal Wing  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 14
  • Joined: 04-March 12

Re: Runtime Error in JavaHelp

Posted 24 June 2013 - 08:19 AM

View Postmacosxnerd101, on 24 June 2013 - 08:00 AM, said:

Please make sure to post a sample of code that demonstrates the problem and can be run. That way, it's easy for us to ascertain where to look, and the code is here for future readers.


Unfortunately I haven't got a clue as to what, even remotely, can cause the behavior that I am getting. the only JAVA in the entire project is in the HelpSetProject.java:

package helpsetproject;

// Import the javahelp files.
import java.awt.Dimension;
import java.awt.Toolkit;
import java.net.URL;
import javax.help.*;
import javax.swing.*;

public class HelpSetProject {

    public static void main(String args[]) throws HelpSetException {
        JHelp helpViewer = null;
        // Get the classloader of this class.
        ClassLoader cl = HelpSetProject.class.getClassLoader();
        URL url = HelpSetProject.class.getResource("help-hs.xml");
        // Create a new JHelp object with a new HelpSet.
        HelpSet hs = new HelpSet(cl, url);
        hs.setHomeID("overview");
        helpViewer = new JHelp(hs);

        // Create a new frame.
        JFrame frame = new JFrame("PICS Help");
        // Set it's size.
        Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
        frame.setSize(dim.width, dim.height - 50);
        // Add the created helpViewer to it.
        frame.getContentPane().add(helpViewer);
        // Set a default close operation.
        frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        // Make the frame visible.
        frame.setVisible(true);
//        frame.repaint();
    }
}



View Postg00se, on 24 June 2013 - 08:03 AM, said:

Quote

Here is the source code on GitHub.
Your last commit was wrong - your project does not build

Quote

Here you can download the executable
No evidence to me of any malfunction


Works for me after pulling from GitHub. Although I guess you may be missing 2 jars (the javahelp and netbeans) Here they are: org-netbeans-core.jar and JavaHelp Jar

Also, did you try to run executable a few times? When I ran it the first six times - it looks like this:
Posted Image

After I close and run again for the seventh time - you can see the blank/empty lines:
Posted Image
Was This Post Helpful? 0
  • +
  • -

#5 g00se  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 2720
  • View blog
  • Posts: 11,445
  • Joined: 20-September 08

Re: Runtime Error in JavaHelp

Posted 24 June 2013 - 08:31 AM

Quote

Although I guess you may be missing 2 jars (the javahelp and netbeans)

All jars required to build the project should be in github
Was This Post Helpful? 0
  • +
  • -

#6 Metal Wing  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 14
  • Joined: 04-March 12

Re: Runtime Error in JavaHelp

Posted 24 June 2013 - 09:08 AM

View Postg00se, on 24 June 2013 - 08:31 AM, said:

Quote

Although I guess you may be missing 2 jars (the javahelp and netbeans)

All jars required to build the project should be in github


Fixed, I believe. Jars are now there. Unfortunately, still getting the same blank lines/tree runtime behaviour :/
Was This Post Helpful? 0
  • +
  • -

#7 g00se  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 2720
  • View blog
  • Posts: 11,445
  • Joined: 20-September 08

Re: Runtime Error in JavaHelp

Posted 24 June 2013 - 04:16 PM

I don't get any errors
Was This Post Helpful? 0
  • +
  • -

#8 Metal Wing  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 14
  • Joined: 04-March 12

Re: Runtime Error in JavaHelp

Posted 25 June 2013 - 05:51 AM

View Postg00se, on 24 June 2013 - 04:16 PM, said:

I don't get any errors


After running it once or 10+ times? No blank spaces on the left side?

:/ Oh well... Sorry if this was a waste of your time. I am still getting this error for 3 months across 11 computers. Going to try and figure out what's wrong...

Thanks.
Was This Post Helpful? 0
  • +
  • -

#9 g00se  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 2720
  • View blog
  • Posts: 11,445
  • Joined: 20-September 08

Re: Runtime Error in JavaHelp

Posted 25 June 2013 - 09:53 AM

Quote

After running it once or 10+ times? No blank spaces on the left side?
Certainly a lot of times, and .. no
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1