[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
need hints on debugging both classpath and jamvm to run ImageJ
From: |
Albert Cardona |
Subject: |
need hints on debugging both classpath and jamvm to run ImageJ |
Date: |
Sun, 10 Sep 2006 13:55:02 +0200 |
User-agent: |
KMail/1.9.1 |
Dear all,
I would like to run the public domain image analysis program ImageJ with GNU
Classpath/jamvm (or any free java for that matter). I compiled both classpath
0.92 and jamvm 1.4.3 with CFLAGS=-g and then run the program.
My system:
Powerbook Ti 3.5 1 GHz
kubuntu-ppc GNU/Linux
Some background: in ImageJ, a rectangle of an awt.Image is painted on an
ImageCanvas that extends Canvas and lives inside an awt.Window. The repaint()
method ends up calling the method public void paint(Graphics g) { ... }
ImageJ is an 800k AWT-only image processing application widely used in both
academic research and industry, with a user base of literally tens of
thousands of people, developed by the NIH and collaborators all around the
world. Making ImageJ run with Classpath and a free VM such as jamvm has the
potential of fostering usage of a free java. Thus my interest.
When running the distributed ImageJ ij.jar with Classpath 0.92 and jamvm, I
run into a number of issues:
- ImageJ runs but images are colored incorrectly. For example, grayscale
images show in a gradient of reds.
- ROIs are repainted leaving a dirty trail behind on 8-bit images. On RGB
images, painting ROIs is VERY slow, about 20 seconds to paint a small ROI.
- clicking on an image results in the image becoming whiter and whiter.
- filling ROIs (i.e. changing the byte[] and recreating the awt.Image and
calling repaint on the ImageCanvas (that extends awt.Canvas) doesn't repaint
the ImageCanvas at all.
- when creating a new image with File->New->Image... , a new window for the
image shows but the program goes into an infinite loop and has to be killed.
- closing an ImageWindow takes about 20 seconds for the checking popup to
query about really closing it.
- when clicking 'no' in a ij.gui.YesNoCancelDialog, several popups come up
complaing about "no images open" as if one had pushed keyboard commands
repeatedly. Some times this leads to:
Exception during event dispatch:
java.lang.NullPointerException
at java.awt.MenuItem.dispatchEventImpl(MenuItem.java:547)
at java.awt.CheckboxMenuItem.dispatchEventImpl(CheckboxMenuItem.java:296)
at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:347)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:479)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
Eventually ImageJ crashes or gets stuck.
Text windows though seem to work just fine.
None of this problems exist when ImageJ is run with Sun's java 1.3.1, 1.4.2,
1.5.0 or 1.6.0 beta.
So now: what is the best way to debug both classpath and jamvm ? When running
jamvm from ddd, I get:
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb)
run
-Xbootclasspath/a:/home/albertca/Programming/jamvm/jamvm-local/share/classpath/glibj.zip:/home/albertca/Programming/jamvm/jamvm-local/share/classpath/tools.zip:/home/albertca/Programming/jamvm/jamvm-local/share/classpath
-Dgnu.classpath.boot.library.path=/home/albertca/Programming/jamvm/jamvm-local/lib/classpath
-Xmx384Mb -classpath
./ij.jar:./jars/colt.jar:./jars/jai_imageio.jar:./jars/jimi.jar:./jars/jpedal/additional_jars/bcprov-jdk14-119.jar:./jars/jpedal/additional_jars/jdom.jar:./jars/jpedal/pjes.jar:./jars/jpedal/14_os_jpedal.jar:./jars/jython21/jython.jar:./jars/postgresql-8.1-405.jdbc3.jar
ij.ImageJ
[Thread debugging using libthread_db enabled]
[New Thread 805413360 (LWP 7972)]
[New Thread 1225315568 (LWP 7975)]
[New Thread 1233704176 (LWP 7976)]
Program received signal SIGUSR1, User defined signal 1.
[Switching to Thread 805413360 (LWP 7972)]
0x0fe52f68 in clone () from /lib/libc.so.6
Meaning, the program doesn't run at all! I can't see what is different than
running the program from the command line. Using a -classpath ij.jar only (no
extensions to ImageJ) results in exactly the same problem.
How is one to debug GNU Classpath and/or jamvm? Or are the above GNU Classpath
problems only?
Thanks for any hints.
Albert
--
Albert Cardona
Molecular Cell Developmental Biology
University of California Los Angeles
Tel +1 310 2067376
- need hints on debugging both classpath and jamvm to run ImageJ,
Albert Cardona <=