Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command line error when GUI required #605

Closed
stefanogermano opened this issue Aug 2, 2023 · 0 comments · Fixed by #619
Closed

Command line error when GUI required #605

stefanogermano opened this issue Aug 2, 2023 · 0 comments · Fixed by #619
Assignees
Labels
bug pressing Will fix issue in next release
Milestone

Comments

@stefanogermano
Copy link

Describe the bug

When you run WIDOCO through the command line, but an operation requires the GUI (and it cannot be executed), it throws an exception:

[main] ERROR widoco.gui.GuiController - Error while generating the documentation: 
No X11 DISPLAY variable was set,
but this program performed an operation which requires it.
java.awt.HeadlessException: 
No X11 DISPLAY variable was set,
but this program performed an operation which requires it.
        at java.desktop/java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:166)
        at java.desktop/java.awt.Window.<init>(Window.java:553)
        at java.desktop/java.awt.Frame.<init>(Frame.java:428)
        at java.desktop/java.awt.Frame.<init>(Frame.java:393)
        at java.desktop/javax.swing.SwingUtilities$SharedOwnerFrame.<init>(SwingUtilities.java:1919)
        at java.desktop/javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1995)
        at java.desktop/javax.swing.JOptionPane.getRootFrame(JOptionPane.java:1695)
        at java.desktop/javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:874)
        at widoco.CreateResources.saveDocument(CreateResources.java:394)
        at widoco.CreateResources.createAbstractSection(CreateResources.java:228)
        at widoco.CreateResources.generateDocumentation(CreateResources.java:90)
        at widoco.gui.GuiController.<init>(GuiController.java:275)
        at widoco.gui.GuiController.main(GuiController.java:501)

To Reproduce

Steps to reproduce the behavior:

  1. Run WIDOCO through the command line on a machine where the GUI cannot be executed
  2. Use an behaviour that requires the GUI (for instance, running on a previously generated folder without the -rewriteAll option)
  3. See the error shown above

Expected behavior

I see two possibilities:

  • An clear statement is printed explaining that (and perhaps why) the specific operation requires the GUI
  • Make all operations also available via the command line
@dgarijo dgarijo added bug pressing Will fix issue in next release labels Aug 10, 2023
@dgarijo dgarijo self-assigned this Aug 10, 2023
@dgarijo dgarijo added this to the v1.4.xx milestone Aug 10, 2023
dgarijo added a commit that referenced this issue Aug 25, 2023
dgarijo added a commit that referenced this issue Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug pressing Will fix issue in next release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants