ImageJ hangs up MacOS X 10.4.5 when SavingAs -- JFileDialog possible culprit

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

ImageJ hangs up MacOS X 10.4.5 when SavingAs -- JFileDialog possible culprit

Cezar M. Tigaret
Dear Wayne and ImageJ users,

I apologise if you find this redundant on the mailing list.

If not, then please read on.

Running ij version >= 1.35p on a MacOS X we got symptoms very similar to those
described on a very recent mailing list thread:

 https://list.nih.gov/cgi-bin/wa?A2=ind0602&L=IMAGEJ&D=0&I=-3&P=17614

Basically, we ImageJ erratically hang up after calling the File/SaveAs... menu
item (i.e. before the file selector dialog becomes visible). This is
regardless of the ij.jar version -- it also happens with ij.1.37a.

We're running ImageJ on Dual 2GHz PowerPC G5, 2 GB DDR2 SDRAM machines, MacOS
X 10.4.5, JDK 1.5.0 release 3 upgrade.

Two consecutive thread dumps on the G5 machines hinted that the deadlock
occurred in swing's JFileChooser (see the fragment at the end of my message).

We found the solution to be disabling the use of JFileChooser in
Edit|Options|Input/Output dialog and hence reverting to the awt's own file
dialog.

The down side of it is that one cannot use multiple selections in the file
dialogs anymore.

Cheers!

Cezar

P.S.

Interestingly enough, this never had occurred on a Linux x86 box (stock SuSE
10.0) also with 2 GB RAM, and JDK 1.5.0 that came with the distribution.

====================
Thread dump fragment:
===================
  Full thread dump Java HotSpot(TM) Client VM (1.5.0_05-48 mixed mode):

"Tiff..." prio=4 tid=0x00532d90 nid=0x19b3200 waiting for monitor entry
[0xf0e8c000..0xf0e8dad0]
        at apple.laf.AquaDirectoryModel.getRowCount(AquaDirectoryModel.java:183)
        - waiting to lock <0x065f5ca8> (a java.lang.Object)
        at javax.swing.JTable.getRowCount(JTable.java:1797)

<------------snip----------------------------------------------------------->

        at java.awt.Window.pack(Window.java:495)
        at javax.swing.JFileChooser.createDialog(JFileChooser.java:772)
        at javax.swing.JFileChooser.showDialog(JFileChooser.java:708)
        at javax.swing.JFileChooser.showSaveDialog(JFileChooser.java:645)
        at ij.io.SaveDialog.jsave(SaveDialog.java:95)

<------------snip----------------------------------------------------------->

"Thread-2" os::get_native_priority: pthread_getschedparam failed: 3
prio=11 tid=0x005197d0 nid=0x18eac00 runnable [0x00000000..0xf0e8d3d0]

"TimerQueue" daemon prio=5 tid=0x0051a910 nid=0x190b200 in Object.wait()
[0xf0c89000..0xf0c89ad0]
        at java.lang.Object.wait(Native Method)
        - waiting on <0x07c74128> (a javax.swing.TimerQueue)
        at javax.swing.TimerQueue.run(TimerQueue.java:233)
        - locked <0x07c74128> (a javax.swing.TimerQueue)
        at java.lang.Thread.run(Thread.java:613)

<------------snip----------------------------------------------------------->



--
Cezar M. Tigaret, MD, PhD

LMP/Pharmacology,
University College London,

Gower St., London, WC1E 6BT
United Kingdom

Tel: (+44) 020 7679 7857

Registered Linux User # 366455
Reply | Threaded
Open this post in threaded view
|

Re: ImageJ hangs up MacOS X 10.4.5 when SavingAs -- JFileDialog possible culprit

Wayne Rasband
ImageJ 1.37a, available at <http://rsb.info.nih.gov/ij/notes.html>,  
fixes a bug that could cause ImageJ to hang when saving if "Use  
JFileChooser to Open/Save" was checked in the Edit>Options>Input/Output  
dialog.

-wayne

On Mar 16, 2006, at 3:10 PM, Cezar M. Tigaret wrote:

> Dear Wayne and ImageJ users,
>
> I apologise if you find this redundant on the mailing list.
>
> If not, then please read on.
>
> Running ij version >= 1.35p on a MacOS X we got symptoms
> very similar to those described on a very recent mailing list thread:
>
>  https://list.nih.gov/cgi-bin/wa?A2=ind0602&L=IMAGEJ&D=0&I=-3&P=17614
>
> Basically, we ImageJ erratically hang up after calling the  
> File/SaveAs...
> menu item (i.e. before the file selector dialog becomes visible).
> This is regardless of the ij.jar version -- it also happens with  
> ij.1.37a.
>
> We're running ImageJ on Dual 2GHz PowerPC G5, 2 GB DDR2
> SDRAM machines, MacOS X 10.4.5, JDK 1.5.0 release 3 upgrade.
>
> Two consecutive thread dumps on the G5 machines hinted that the
> deadlock occurred in swing's JFileChooser (see the fragment at the end  
> of my message).
>
> We found the solution to be disabling the use of JFileChooser
> in Edit|Options|Input/Output dialog and hence reverting to
> the awt's own file dialog.
>
> The down side of it is that one cannot use multiple selections
> in the file  dialogs anymore.
>
> Cheers!
>
> Cezar
>
> P.S.
>
> Interestingly enough, this never had occurred on a Linux x86 box
> (stock SuSE 10.0) also with 2 GB RAM, and JDK 1.5.0 that came with the  
> distribution.
>
> ====================
> Thread dump fragment:
> ===================
>   Full thread dump Java HotSpot(TM) Client VM (1.5.0_05-48 mixed mode):
>
> "Tiff..." prio=4 tid=0x00532d90 nid=0x19b3200 waiting for monitor entry
> [0xf0e8c000..0xf0e8dad0]
> at  
> apple.laf.AquaDirectoryModel.getRowCount(AquaDirectoryModel.java:183)
> - waiting to lock <0x065f5ca8> (a java.lang.Object)
> at javax.swing.JTable.getRowCount(JTable.java:1797)
>
> <------------
> snip----------------------------------------------------------->
>
> at java.awt.Window.pack(Window.java:495)
> at javax.swing.JFileChooser.createDialog(JFileChooser.java:772)
> at javax.swing.JFileChooser.showDialog(JFileChooser.java:708)
> at javax.swing.JFileChooser.showSaveDialog(JFileChooser.java:645)
> at ij.io.SaveDialog.jsave(SaveDialog.java:95)
>
> <------------
> snip----------------------------------------------------------->
>
> "Thread-2" os::get_native_priority: pthread_getschedparam failed: 3
> prio=11 tid=0x005197d0 nid=0x18eac00 runnable [0x00000000..0xf0e8d3d0]
>
> "TimerQueue" daemon prio=5 tid=0x0051a910 nid=0x190b200 in  
> Object.wait()
> [0xf0c89000..0xf0c89ad0]
> at java.lang.Object.wait(Native Method)
> - waiting on <0x07c74128> (a javax.swing.TimerQueue)
> at javax.swing.TimerQueue.run(TimerQueue.java:233)
> - locked <0x07c74128> (a javax.swing.TimerQueue)
> at java.lang.Thread.run(Thread.java:613)
>
> <------------
> snip----------------------------------------------------------->
>
>
>
> --
> Cezar M. Tigaret, MD, PhD
>
> LMP/Pharmacology,
> University College London,
>
> Gower St., London, WC1E 6BT
> United Kingdom
>
> Tel: (+44) 020 7679 7857
>
> Registered Linux User # 366455
>