sun.awt.X11.XToolkit processException java.lang.NullPointerException?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

sun.awt.X11.XToolkit processException java.lang.NullPointerException?

Thornton, Matthew
Dear IJ_list,

I am using FIJI installed on Ubuntu 12.10 (ImageJA 1.45i; Java 1.7.0_13 [64-bit]) when I start the program from the command line I am getting this error:

Feb 09, 2013 8:26:30 PM sun.awt.X11.XToolkit processException
WARNING: Exception on Toolkit thread
java.lang.NullPointerException
        at ij.gui.ImageWindow.toString(ImageWindow.java:642)
        at java.lang.String.valueOf(String.java:2854)
        at java.lang.StringBuilder.append(StringBuilder.java:128)
        at sun.awt.X11.XDecoratedPeer.requestWindowFocus(XDecoratedPeer.java:1139)
        at sun.awt.X11.XDecoratedPeer.handleWmTakeFocus(XDecoratedPeer.java:1008)
        at sun.awt.X11.XDecoratedPeer.handleClientMessage(XDecoratedPeer.java:1001)
        at sun.awt.X11.XBaseWindow.dispatchEvent(XBaseWindow.java:1084)
        at sun.awt.X11.XBaseWindow.dispatchToWindow(XBaseWindow.java:1066)
        at sun.awt.X11.XToolkit.dispatchEvent(XToolkit.java:561)
        at sun.awt.X11.XToolkit.run(XToolkit.java:670)
        at sun.awt.X11.XToolkit.run(XToolkit.java:591)
        at java.lang.Thread.run(Thread.java:722)

Feb 09, 2013 8:26:30 PM sun.awt.X11.XToolkit processException
WARNING: Exception on Toolkit thread
java.lang.NullPointerException
        at ij.gui.ImageWindow.toString(ImageWindow.java:642)
        at java.lang.String.valueOf(String.java:2854)
        at java.lang.StringBuilder.append(StringBuilder.java:128)
        at sun.awt.X11.XDecoratedPeer.requestWindowFocus(XDecoratedPeer.java:1139)
        at sun.awt.X11.XDecoratedPeer.handleWmTakeFocus(XDecoratedPeer.java:1008)
        at sun.awt.X11.XDecoratedPeer.handleClientMessage(XDecoratedPeer.java:1001)
        at sun.awt.X11.XBaseWindow.dispatchEvent(XBaseWindow.java:1084)
        at sun.awt.X11.XBaseWindow.dispatchToWindow(XBaseWindow.java:1066)
        at sun.awt.X11.XToolkit.dispatchEvent(XToolkit.java:561)
        at sun.awt.X11.XToolkit.run(XToolkit.java:670)
        at sun.awt.X11.XToolkit.run(XToolkit.java:591)
        at java.lang.Thread.run(Thread.java:722)

It doesn’t really stop me from using the program. I looked up NullPointerException and from what I read, it was pretty far out of my ability to handle. I am using the oracle java and not OpenJDK. If there is any information that you can give me about ways to fix this error I would greatly appreciate it.  Thank you for such a wonderful program!

Sincerely,

Matt


Matthew E. Thornton

Research Lab Specialist
Saban Research Institute

USC/Children’s Hospital Los Angeles
513X,  Mail Stop 35
4661 W. Sunset Blvd.
Los Angeles, CA 90027-6020

[hidden email]

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: sun.awt.X11.XToolkit processException java.lang.NullPointerException?

dscho
Hi Matt,

On Sun, 10 Feb 2013, Thornton, Matthew wrote:

> I am using FIJI installed on Ubuntu 12.10 (ImageJA 1.45i; Java 1.7.0_13
> [64-bit])

Your ImageJA is very old. The current version is ImageJ (not ImageJA)
version 1.47i, and I imagine that the bug you encountered was fixed in the
meantime.

It is possible that some plugins do not work as expected with 1.47i, but
the only way to go forward is really to fix those plugins to work with the
current version.

Ciao,
Johannes
 

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: sun.awt.X11.XToolkit processException java.lang.NullPointerException?

Thornton, Matthew
Hello,

Thank you Johannes and Wayne for your reply!  I needed to sudo to give ij updater write access for the update to work.  So far all of the plugins that I use work....

Hope you have a nice day!

Matt


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: sun.awt.X11.XToolkit processException java.lang.NullPointerException?

Thornton, Matthew
Hello again!

I spoke too soon.  I figured that the java.lang.NullPointerException was fixed because it didn't come up when I start fiji from the command line. I am now running ImageJ 1.47i; java 1.7.0_13 [64bit].  When I run a macro, I get this error:

gserver% fiji -Dplugins.dir=$FDIR -macro ./MontageMacro3.ijm -batch &
[1] 11974
gserver% java.lang.NullPointerException
        at fiji.User_Plugins.runPlugIn(User_Plugins.java:142)
        at fiji.User_Plugins.installScripts(User_Plugins.java:153)
        at fiji.User_Plugins.run(User_Plugins.java:99)
        at fiji.Main.setup(Main.java:331)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at ij.macro.Functions.call(Functions.java:3696)
        at ij.macro.Functions.getStringFunction(Functions.java:262)
        at ij.macro.Interpreter.getStringTerm(Interpreter.java:1220)
        at ij.macro.Interpreter.getString(Interpreter.java:1199)
        at ij.macro.Interpreter.doStatement(Interpreter.java:264)
        at ij.macro.Interpreter.doStatements(Interpreter.java:207)
        at ij.macro.Interpreter.run(Interpreter.java:104)
        at ij.macro.Interpreter.run(Interpreter.java:74)
        at ij.macro.Interpreter.run(Interpreter.java:85)
        at ij.plugin.Macro_Runner.runMacro(Macro_Runner.java:105)
        at ij.IJ.runMacro(IJ.java:104)
        at ij.IJ.runMacro(IJ.java:93)
        at ij.ImageJ.main(ImageJ.java:678)
        at fiji.Main.main(Main.java:363)

Here is the Macro:

input = "/home/gserver/Pictures/Microscopy/08Feb13/ND_files/";
output = "/home/gserver/Pictures/Microscopy/08Feb13/processed/";

setBatchMode(true);
list = getFileList(input);
for (i = 0; i < list.length; i++)
        action(input, output, list[i]);
setBatchMode(false);

function action(input, output, filename) {
        open(input + filename);
        run("RGB Color");
        saveAs("Tiff", "/tmp/Z0.tif");
        run("Z Project...", "start=1 stop=3 projection=[Max Intensity]");
        run("Scale Bar...", "width=100 height=5 font=18 color=White background=None location=[Lower Right] bold");
        run("Flatten");
        saveAs("Tiff", "/tmp/fijitemp/A1.tif");
        close();
        close();
        open("/tmp/Z0.tif");
        run("Stack to Images");
        run("Scale Bar...", "width=100 height=5 font=18 color=White background=None location=[Lower Right] bold");
        run("Flatten");
        saveAs("Tiff", "/tmp/fijitemp/A2.tif");
        close();
        close();
        run("Scale Bar...", "width=100 height=5 font=18 color=White background=None location=[Lower Right] bold");
        run("Flatten");
        saveAs("Tiff", "/tmp/fijitemp/A3.tif");
        close();
        close();
        run("Scale Bar...", "width=100 height=5 font=18 color=White background=None location=[Lower Right] bold");
        run("Flatten");
        saveAs("Tiff", "/tmp/fijitemp/A4.tif");
        close();
        close();
        run("Image Sequence...", "open=/tmp/fijitemp/ number=4 starting=1 increment=1 scale=100 file=[] or=[] sort");
        run("Make Montage...", "columns=2 rows=2 scale=0.50 first=1 last=4 increment=1 border=0 font=12");
        saveAs("TIFF", output + filename);
        close();
}

setBatchMode(false);
//setTool("angle");

I am automating the conversion of ND2 files from a Nikon microscope to montage tifs.  Maybe the macro is calling a non-compatible plugin. Hopefully not bio-formats?  Any help or information is greatly appreciated!!  Thanks!

Matt

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: sun.awt.X11.XToolkit processException java.lang.NullPointerException?

dscho
In reply to this post by Thornton, Matthew
Hi Matt,

On Mon, 11 Feb 2013, Thornton, Matthew wrote:

> Thank you Johannes and Wayne for your reply!  I needed to sudo to give
> ij updater write access for the update to work.  So far all of the
> plugins that I use work....

May I suggest to install Fiji into a location where it can update itself
without administrator privileges?  E.g. Desktop...

Ciao,
Johannes

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html