startup problem on ubuntu with x forwarding

55 views
Skip to first unread message

Dominic Mai

unread,
Jun 25, 2013, 10:57:07 AM6/25/13
to icy-so...@googlegroups.com
Hi,

I just installed icy on ubuntu 12.04 and it runs nicely on my local machine.

my home is also mounted on a more powerful server with the same ubunut and java-version as my desktop machine

maid@joan:~/localsoft/icy$ java -version
java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.5) (6b27-1.12.5-0ubuntu0.12.04.1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)


but when i start it in a shell with X-forwarding, I get the following error and no application window appears:

maid@sprtschk:~/localsoft/icy$ java -jar icy.jar
Initializing...

Caused by : java.awt.HeadlessException
java.lang.ExceptionInInitializerError
        at org.pushingpixels.substance.internal.contrib.jgoodies.looks.common.ShadowPopupFactory.install(ShadowPopupFactory.java:115)
        at org.pushingpixels.substance.api.SubstanceLookAndFeel.initialize(SubstanceLookAndFeel.java:1830)
        at javax.swing.UIManager.setLookAndFeel(UIManager.java:529)
        at org.pushingpixels.substance.api.SubstanceLookAndFeel.setSkin(SubstanceLookAndFeel.java:2197)
        at org.pushingpixels.substance.api.SubstanceLookAndFeel.setSkin(SubstanceLookAndFeel.java:2298)
        at org.pushingpixels.substance.api.SubstanceLookAndFeel.setSkin(SubstanceLookAndFeel.java:2334)
        at icy.gui.util.LookAndFeelUtil$3.run(LookAndFeelUtil.java:368)
        at icy.system.thread.ThreadUtil.invokeLater(ThreadUtil.java:158)
        at icy.system.thread.ThreadUtil.invokeLater(ThreadUtil.java:143)
        at icy.gui.util.LookAndFeelUtil.setSkin(LookAndFeelUtil.java:361)
        at icy.gui.util.LookAndFeelUtil.init(LookAndFeelUtil.java:178)
        at icy.main.Icy$2.run(Icy.java:236)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:216)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:673)
        at java.awt.EventQueue.access$300(EventQueue.java:96)
        at java.awt.EventQueue$2.run(EventQueue.java:634)
        at java.awt.EventQueue$2.run(EventQueue.java:632)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:643)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
Caused by: java.awt.HeadlessException
        at sun.awt.HeadlessToolkit.getScreenResolution(HeadlessToolkit.java:221)
        at org.pushingpixels.lafwidget.utils.LookUtils.isLowResolution(LookUtils.java:435)
        at org.pushingpixels.lafwidget.utils.LookUtils.<clinit>(LookUtils.java:233)
        ... 26 more
java.lang.ExceptionInInitializerError
ThreadUtil.invokeAndWait(...) error :
Caused by : java.awt.HeadlessException
java.lang.reflect.InvocationTargetException
        at java.awt.EventQueue.invokeAndWait(EventQueue.java:1076)
        at java.awt.EventQueue.invokeAndWait(EventQueue.java:1053)
        at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1347)
        at icy.system.thread.ThreadUtil.invokeNow(ThreadUtil.java:126)
        at icy.main.Icy.main(Icy.java:228)
Caused by: java.awt.HeadlessException
        at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:173)
        at java.awt.Window.<init>(Window.java:546)
        at java.awt.Frame.<init>(Frame.java:419)
        at java.awt.Frame.<init>(Frame.java:384)
        at javax.swing.SwingUtilities$SharedOwnerFrame.<init>(SwingUtilities.java:1754)
        at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1831)
        at javax.swing.JOptionPane.getRootFrame(JOptionPane.java:1692)
        at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:864)
        at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:668)
        at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:639)
        at icy.main.Icy.fatalError(Icy.java:370)
        at icy.main.Icy$2.run(Icy.java:243)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:216)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:673)
        at java.awt.EventQueue.access$300(EventQueue.java:96)
        at java.awt.EventQueue$2.run(EventQueue.java:634)
        at java.awt.EventQueue$2.run(EventQueue.java:632)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:643)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
        at java.awt.EventQueue.invokeAndWait(EventQueue.java:1076)
        at java.awt.EventQueue.invokeAndWait(EventQueue.java:1053)
        at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1347)
        at icy.system.thread.ThreadUtil.invokeNow(ThreadUtil.java:126)
        at icy.main.Icy.main(Icy.java:228)
Caused by: java.awt.HeadlessException
        at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:173)
        at java.awt.Window.<init>(Window.java:546)
        at java.awt.Frame.<init>(Frame.java:419)
        at java.awt.Frame.<init>(Frame.java:384)
        at javax.swing.SwingUtilities$SharedOwnerFrame.<init>(SwingUtilities.java:1754)
        at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1831)
        at javax.swing.JOptionPane.getRootFrame(JOptionPane.java:1692)
        at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:864)
        at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:668)
        at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:639)
        at icy.main.Icy.fatalError(Icy.java:370)
        at icy.main.Icy$2.run(Icy.java:243)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:216)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:673)
        at java.awt.EventQueue.access$300(EventQueue.java:96)
        at java.awt.EventQueue$2.run(EventQueue.java:634)
        at java.awt.EventQueue$2.run(EventQueue.java:632)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:643)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
OpenJDK Runtime Environment 1.6.0_27-b27 (64 bit)
Running on Linux 3.2.0-38-generic (amd64)
Number of processors : 6
System total memory : 23.5 GB
System available memory : 2576.3 MB
Max java memory : 5358.3 MB

Cannot load VTK library...

Icy Version 1.3.6.0 started !



Any Ideas what could be the error?

many thanks,

Dominic

Stephane

unread,
Jun 26, 2013, 5:06:15 AM6/26/13
to icy-so...@googlegroups.com
Hi,

To launch icy from the command line it's better to use:
java -jar updater.jar

As it will apply the correct specific JVM parameters (as allocated memory) to launch icy.
About your error, it looks like the JVM does not see the X-forwarding and just assume you try to start Icy on a headless system (no screen device). Icy should support headless mode (you can then only launch batch plugin on a specified image) but it looks like there is a problem with it. Anyway i guess it is not supposed to work in headless, did you get other java application working with X-forwarding ?

Dominic Mai

unread,
Jun 26, 2013, 5:34:28 AM6/26/13
to icy-so...@googlegroups.com
Hi,

thanks for the reply.

If I try to launch icy with:

java -jar updater.jar  or  java -Djava.awt.headless=true -jar updater.jar

nothing happens - it returns to the command prompt more or less immediately with no output or opened windows.

Also, when I use the " -Djava.awt.headless=true" option, it has the same output as above.


I regularly use imageJ and MATLAB on this machine (the one with X-forwarding) without problems. 


best regards,
Dominic


2013/6/26 Stephane <stephane.da...@pasteur.fr>
--
You received this message because you are subscribed to a topic in the Google Groups "Icy imaging" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/icy-software/Ss4aO1hb_qg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to icy-software...@googlegroups.com.
To post to this group, send email to icy-so...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/icy-software/388fcfd8-aa13-491d-a5ee-fee1f22a2944%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Stephane

unread,
Jun 28, 2013, 9:47:20 AM6/28/13
to icy-so...@googlegroups.com, domin...@gmx.de
Hi,

Actually if you set manually java.awt.headless to true Icy will directly detect the headless mode and return immediately if you don't specify any command (plugin execution mainly).
I guess there is a bug in the substance library (the look and feel we use in Icy) so it does not detect correctly the graphical device and think we are headless where that is not the case as you do X-forwarding.
I will report that issue to the developers of the library so they can fix it. Hopefully we have our own dev branch of the lib so we can fix it on our side. I hope to deliver a fix for that in the next version :)
Thanks for the report !

- Stephane

Stephane

unread,
Jun 28, 2013, 10:11:05 AM6/28/13
to icy-so...@googlegroups.com, domin...@gmx.de
I replied a bit quickly, after dig in the code the problem seems to be on the java side and more specifically with the Toolkit.getDefaultToolkit() method which actually returns the headless instance of the toolkit where it should not...
I guess the default sun.awt.X11.XToolkit should be loaded but that is not the case here.
Do you use a specific command for the X-forwading ? You may need to set some variables to inform java about the X-forwarding.
I even surprised it does work with ImageJ as the ToolKit problem should appears too (or ImageJ does not use Toolkit class but that would be surprising).
Reply all
Reply to author
Forward
0 new messages