Task #5964 (closed)
Opened 13 years ago
Closed 13 years ago
BUG:Save As
Reported by: | omero-qa | Owned by: | jburel |
---|---|---|---|
Priority: | minor | Milestone: | OMERO-Beta4.3.1 |
Component: | Insight | Version: | n.a. |
Keywords: | n.a. | Cc: | A.Ferrand@…, saloynton |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | 0.0d |
Sprint: | 2011-07-07 (1) |
Description
http://qa.openmicroscopy.org.uk/qa/feedback/3824/
Add control to make sure folder is selected and not short cut.
java.lang.Exception: Abnormal termination due to an uncaught exception. java.lang.InternalError: Unable to bind \\homes.lifesci.dundee.ac.uk\aferrand\Desktop\LocalDisk (D) - Shortcut.lnk to parent at sun.awt.shell.Win32ShellFolder2$4.call(Unknown Source) at sun.awt.shell.Win32ShellFolder2$4.call(Unknown Source) at sun.awt.shell.Win32ShellFolderManager2$ComInvoker.invoke(Unknown Source) at sun.awt.shell.ShellFolder.invoke(Unknown Source) at sun.awt.shell.ShellFolder.invoke(Unknown Source) at sun.awt.shell.Win32ShellFolder2.getIShellFolder(Unknown Source) at sun.awt.shell.Win32ShellFolder2$17.call(Unknown Source) at sun.awt.shell.Win32ShellFolder2$17.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Abnormal termination due to an uncaught exception. java.lang.InternalError: Unable to bind \\homes.lifesci.dundee.ac.uk\aferrand\Desktop\LocalDisk (D) - Shortcut.lnk to parent at sun.awt.shell.Win32ShellFolder2$4.call(Unknown Source) at sun.awt.shell.Win32ShellFolder2$4.call(Unknown Source) at sun.awt.shell.Win32ShellFolderManager2$ComInvoker.invoke(Unknown Source) at sun.awt.shell.ShellFolder.invoke(Unknown Source) at sun.awt.shell.ShellFolder.invoke(Unknown Source) at sun.awt.shell.Win32ShellFolder2.getIShellFolder(Unknown Source) at sun.awt.shell.Win32ShellFolder2$17.call(Unknown Source) at sun.awt.shell.Win32ShellFolder2$17.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Exception in thread "AWT-EventQueue-0" at org.openmicroscopy.shoola.env.ui.UserNotifierImpl.showErrorDialog(UserNotifierImpl.java:183) at org.openmicroscopy.shoola.env.ui.UserNotifierImpl.notifyError(UserNotifierImpl.java:272) at org.openmicroscopy.shoola.env.AbnormalExitHandler.doTermination(AbnormalExitHandler.java:138) at org.openmicroscopy.shoola.env.AbnormalExitHandler.terminate(AbnormalExitHandler.java:83) at org.openmicroscopy.shoola.env.AWTExceptionHanlder.handle(AWTExceptionHanlder.java:99) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.awt.EventDispatchThread.handleException(Unknown Source) at java.awt.EventDispatchThread.processException(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.Dialog$1.run(Unknown Source) at java.awt.Dialog$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Dialog.show(Unknown Source) at java.awt.Component.show(Unknown Source) at java.awt.Component.setVisible(Unknown Source) at java.awt.Window.setVisible(Unknown Source) at java.awt.Dialog.setVisible(Unknown Source) at org.openmicroscopy.shoola.util.ui.UIUtilities.setLocationRelativeTo(UIUtilities.java:589) at org.openmicroscopy.shoola.util.ui.UIUtilities.setLocationRelativeToAndShow(UIUtilities.java:565) at org.openmicroscopy.shoola.agents.imviewer.actions.SaveAction.actionPerformed(SaveAction.java:116) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.AbstractButton.doClick(Unknown Source) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source) at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
Change History (12)
comment:1 Changed 13 years ago by jburel
- Component changed from from QA to Insight
- Milestone changed from Unscheduled to OMERO-Beta4.3.1
- Summary changed from BUG:Feedback 3824 to BUG:Save As
comment:2 Changed 13 years ago by saloynton
- Cc saloynton added
comment:3 Changed 13 years ago by jburel
- Remaining Time set to 0.25
- Status changed from new to accepted
comment:4 Changed 13 years ago by jburel
InternalError is thrown when calling File.listFiles() on a non directory file
When the File is both a shell File and a non directory file then anInternal Error is thrown.
import java.io.*; import java.util.*; import javax.swing.filechooser.*; public class Test { public static void main(String[] args) { FileSystemView fsv = FileSystemView.getFileSystemView(); File file = fsv.getHomeDirectory(); file = file.listFiles()[0].listFiles()[1].listFiles()[7]; File[] files = file.listFiles(); System.out.println(files == null ? "Not a Directory" : Arrays.asList(files).toString()); } }
comment:5 Changed 13 years ago by jburel
Problem is apparently fixed in Java 7, that should be released end of July.
Options:
- remove short cut (i.e. .lnk) displayed on the left hand-side of the File chooser under Windows
- Add entry in the FAQ indicating that if a folder is selected via "look in" drop-down menu, the error can happen depending on the version of Windows
Preferences?
comment:6 Changed 13 years ago by jburel
I have code ready for the first option, second option might be better
comment:7 Changed 13 years ago by jburel
- Owner jburel deleted
- Status changed from accepted to new
comment:8 Changed 13 years ago by jburel
- Owner set to jburel
comment:9 Changed 13 years ago by jburel
Removing the short cut is actually a possible solution.
Note that the problem only occurs when the short cut is selected from drop-down menu.
comment:10 Changed 13 years ago by jburel <j.burel@…>
(In [1b1cc99ba6d182a5fa7fc9b2d41a680acc64f9d5/ome.git] on branch develop) Do not set the directory using short cut (see #5964)
comment:11 Changed 13 years ago by jburel
- Status changed from new to accepted
comment:12 Changed 13 years ago by jburel <j.burel@…>
- Remaining Time changed from 0.25 to 0
- Resolution set to fixed
- Status changed from accepted to closed
(In [a50e30b24a90d20b8afa6b761f6a53c5321e61c3/ome.git] on branch develop) Replace file chooser by customized one to avoid crash
when selecting short cut from the selection box (close #5964)
Action: prepare code to be tested on windows platform