This question is answered.


Permlink Replies: 22 - Pages: 2 [ 1 2 | Next ] - Last Post: 14-Nov-2017 13:28 Last Post By: davidekholm Threads: [ Previous | Next ]
jGromit

Posts: 33,186
Registered: 31-Jan-2006
Image won't load
Posted: 10-Nov-2017 18:18
 
  Click to reply to this thread Reply
Here's a strange one! I've been using a collection of public domain astronomy images for several years, without a problem. But one of them will no longer load in a project. I either get a representing icon, or I get a console dump, and nothing.

Add the attached image to an album project. I get a blank window and this in the console:
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Width (-1) and height (-1) must be > 0
	at java.desktop/java.awt.image.SampleModel.<init>(Unknown Source)
	at java.desktop/java.awt.image.ComponentSampleModel.<init>(Unknown Source)
	at java.desktop/java.awt.image.PixelInterleavedSampleModel.<init>(Unknown Source)
	at java.desktop/java.awt.image.Raster.createInterleavedRaster(Unknown Source)
	at java.desktop/java.awt.image.Raster.createInterleavedRaster(Unknown Source)
	at java.desktop/java.awt.image.BufferedImage.<init>(Unknown Source)
	at se.datadosen.jalbum.AlbumObjectImpl.ensureBuffered(AlbumObjectImpl.java:2108)
	at se.datadosen.jalbum.AlbumObjectImpl.ensureBuffered(AlbumObjectImpl.java:2101)
	at se.datadosen.jalbum.AlbumObjectImpl.readEmbeddedThumbnail(AlbumObjectImpl.java:1890)
	at se.datadosen.jalbum.AlbumObjectImpl.doGetRepresentingIcon(AlbumObjectImpl.java:1844)
	at se.datadosen.jalbum.AlbumObjectImpl.getRepresentingIcon(AlbumObjectImpl.java:1748)
	at se.datadosen.jalbum.AlbumObjectImpl.getRepresentingIcon(AlbumObjectImpl.java:1702)
	at se.datadosen.explorer.JFolderPropertyPanel$JThumbnailSelector.setAlbumObject(JFolderPropertyPanel.java:334)
	at se.datadosen.explorer.JFolderPropertyPanel.lambda$new$0(JFolderPropertyPanel.java:94)
	at org.netbeans.editor.WeakPropertyChangeSupport.firePropertyChange(WeakPropertyChangeSupport.java:99)
	at se.datadosen.jalbum.AlbumObjectImpl.firePropertyChange(AlbumObjectImpl.java:2197)
	at se.datadosen.jalbum.AlbumObjectImpl.updateRepresentingIcon(AlbumObjectImpl.java:2304)
	at se.datadosen.jalbum.FileAlbumObject.getChildren(FileAlbumObject.java:121)
	at se.datadosen.jalbum.AlbumObjectImpl.add(AlbumObjectImpl.java:1558)
	at se.datadosen.explorer.JExplorerPanel.handleFileAdd(JExplorerPanel.java:1028)
	at se.datadosen.jalbum.JNewProjectDialog$1.actionPerformed(JNewProjectDialog.java:151)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at java.desktop/javax.swing.AbstractButton.doClick(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicRootPaneUI$Actions.actionPerformed(Unknown Source)
	at java.desktop/javax.swing.SwingUtilities.notifyAction(Unknown Source)
	at java.desktop/javax.swing.JComponent.processKeyBinding(Unknown Source)
	at java.desktop/javax.swing.KeyboardManager.fireBinding(Unknown Source)
	at java.desktop/javax.swing.KeyboardManager.fireKeyboardAction(Unknown Source)
	at java.desktop/javax.swing.JComponent.processKeyBindingsForAllComponents(Unknown Source)
	at java.desktop/javax.swing.JComponent.processKeyBindings(Unknown Source)
	at java.desktop/javax.swing.JComponent.processKeyEvent(Unknown Source)
	at java.desktop/java.awt.Component.processEvent(Unknown Source)
	at java.desktop/java.awt.Container.processEvent(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
	at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
	at java.desktop/java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
	at java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
	at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue.access$500(Unknown Source)
	at java.desktop/java.awt.EventQueue$3.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$3.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.WaitDispatchSupport$2.run(Unknown Source)
	at java.desktop/java.awt.WaitDispatchSupport$4.run(Unknown Source)
	at java.desktop/java.awt.WaitDispatchSupport$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.desktop/java.awt.WaitDispatchSupport.enter(Unknown Source)
	at java.desktop/java.awt.Dialog.show(Unknown Source)
	at java.desktop/java.awt.Component.show(Unknown Source)
	at java.desktop/java.awt.Component.setVisible(Unknown Source)
	at java.desktop/java.awt.Window.setVisible(Unknown Source)
	at java.desktop/java.awt.Dialog.setVisible(Unknown Source)
	at se.datadosen.component.JSmartDialog.setVisible(JSmartDialog.java:217)
	at se.datadosen.jalbum.JAlbumFrame.show(JAlbumFrame.java:2213)
	at se.datadosen.explorer.JExplorerPanel.showNewProjectDialog(JExplorerPanel.java:1293)
	at se.datadosen.explorer.JExplorerPanel.createOrLoadProject(JExplorerPanel.java:1281)
	at se.datadosen.explorer.JExplorerPanel.lambda$needsDelayedProcessing$5(JExplorerPanel.java:1257)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue.access$500(Unknown Source)
	at java.desktop/java.awt.EventQueue$3.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$3.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
jAlbum 14.2b13.
jGromit

Posts: 33,186
Registered: 31-Jan-2006
Re: Image won't load
Posted: 10-Nov-2017 18:21   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Happily, only two images out of 164 trigger this misbehavior. But where there's smoke....

Here's the second one.
jGromit

Posts: 33,186
Registered: 31-Jan-2006
Re: Image won't load
Posted: 10-Nov-2017 18:26   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Fails on macOS, as well, so it's not a Java 8/Java 9 difference.
jGromit

Posts: 33,186
Registered: 31-Jan-2006
Re: Image won't load
Posted: 10-Nov-2017 19:03   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
The good news is that opening these images in Picasa, making some trivial change, and re-saving them, cures whatever the problem is.
RobM

Posts: 4,382
Registered: 4-Aug-2006
Re: Image won't load
Posted: 10-Nov-2017 20:58   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Well, I can confirm everything except for the error, the images are added but have no thumbnail preview. The images do have a preview in the OS, just not in jAlbum.

Opening and saving the imported images in PS cures the problem.

I just don't get any error in the system console.
jGromit

Posts: 33,186
Registered: 31-Jan-2006
Re: Image won't load
Posted: 10-Nov-2017 21:28   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
The console error shows up if I start an empty project and add only that image. If I add it to a project that already has some objects, or add it along with several others, I get the representing icon. And once I get the console error, I'm in no-man's land, and have to shut down jAlbum.
RobM

Posts: 4,382
Registered: 4-Aug-2006
Re: Image won't load
Posted: 10-Nov-2017 21:43   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
The console error shows up if I start an empty project and add only that image. If I add it to a project that already has some objects, or add it along with several others, I get the representing icon. And once I get the console error, I'm in no-man's land, and have to shut down jAlbum.
Now I get the error too, on an empty project - and I have to quit jAlbum to do anything else. Also, you can only delete the new project outside of jAlbum.

But adding an image to an existing project I get a generic thumbnail place holder - no proper thumbnail image.

Maybe you should do a batch save as on that folder?
jGromit

Posts: 33,186
Registered: 31-Jan-2006
Re: Image won't load
Posted: 10-Nov-2017 21:52   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
Maybe you should do a batch save as on that folder?

I simply added all 164 of them to a new project, and found the two that were wonky. These are images I grabbed off the Interwebs - no problem with regular digital images, of course.
karlmistelberger

Posts: 736
Registered: 5-Dec-2013
Re: Image won't load
Posted: 11-Nov-2017 07:52   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
Here's a strange one! I've been using a collection of public domain astronomy images for several years, without a problem. But one of them will no longer load in a project. I either get a representing icon, or I get a console dump, and nothing.

There is nothing special with Butterfly Nebula or Zeta Ophiuchi:

http://karlmistelberger.jalbum.net/testjAlbum/index.html

Perhaps some enhanced user experience available on Windows type OS or some karmic misdeed of the users? Or simply another magic.

14.2b12.
jGromit

Posts: 33,186
Registered: 31-Jan-2006
Re: Image won't load
Posted: 11-Nov-2017 13:18   in response to: karlmistelberger in response to: karlmistelberger
 
  Click to reply to this thread Reply
Same error in Win10 and macOS 10.13.1, jAlbum 14.2b13, experienced by two different users, an ocean apart. The fact that you didn't get the error is irrelevant.

And yes, I can produce an album with those images, even if their thumbnails fail to appear in the jAlbum Explore view. That's not the point, which you seem to have missed.

If you don't have something useful to post, please don't.
karlmistelberger

Posts: 736
Registered: 5-Dec-2013
Re: Image won't load
Posted: 11-Nov-2017 14:07   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
Same error in Win10 and macOS 10.13.1, jAlbum 14.2b13, experienced by two different users, an ocean apart. The fact that you didn't get the error is irrelevant.

And yes, I can produce an album with those images, even if their thumbnails fail to appear in the jAlbum Explore view. That's not the point, which you seem to have missed.

I reiterate: There is nothing special with Butterfly Nebula or Zeta Ophiuchi. This implies that their thumbnails indeed appear in the jAlbum Explore view.

I simply added all 164 of them to a new project, and found the two that were wonky. These are images I grabbed off the Interwebs - no problem with regular digital images, of course.

They aren't wonky. They are regular jpegs. And any software displays thumbnails of these unaltered pictures, even jAlbum 14.2b13.

If you don't have something useful to post, please don't.
If you can't make use of my posts don't read them.
jGromit

Posts: 33,186
Registered: 31-Jan-2006
Re: Image won't load
Posted: 11-Nov-2017 14:22   in response to: karlmistelberger in response to: karlmistelberger
 
  Click to reply to this thread Reply
karlmistelberger wrote:
This implies that their thumbnails indeed appear in the jAlbum Explore view.

"Implies?" Screenshot, please. Don't open the images in some other image-processing application and re-save them. Use them directly as downloaded from here.

And what version of Java are you running jAlbum on? This is clearly related to the underlying image processing module.

Edit: And don't add these to an existing huge test project (do you really not know how to debug a problem?). Start a new, empty project. Add just one of these images. What happens?
karlmistelberger

Posts: 736
Registered: 5-Dec-2013
Re: Image won't load
Posted: 11-Nov-2017 14:52   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Attachment jalbum124.png (120,5 KB)
jGromit wrote:
karlmistelberger wrote:
This implies that their thumbnails indeed appear in the jAlbum Explore view.

"Implies?" Screenshot, please. Don't open the images in some other image-processing application and re-save them. Use them directly as downloaded from here.

Sure.
And what version of Java are you running jAlbum on? This is clearly related to the underlying image processing module.
karl@erlangen:~> /usr/lib/jalbum/jre64/bin/java -version
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
karl@erlangen:~>
Edit: And don't add these to an existing huge test project (do you really not know how to debug a problem?). Start a new, empty project. Add just one of these images. What happens?

Created project test containing Zeta Ophiuchi only, see screenshot.
karl@erlangen:~> /usr/lib/jalbum/jre64/bin/java -version
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
karl@erlangen:~> 
jGromit

Posts: 33,186
Registered: 31-Jan-2006
Re: Image won't load
Posted: 11-Nov-2017 15:04   in response to: karlmistelberger in response to: karlmistelberger
 
  Click to reply to this thread Reply
I'm surprised, but it does point to an underlying Java issue. On macOS, it's 1.8.0_152. On Win10, it's 9.0.1+11. And on both platforms, it fails.

Edit: Another data point. In macOS, jAlbum 13.10, running on Java 1.8.0_121, no error.
karlmistelberger

Posts: 736
Registered: 5-Dec-2013
Re: Image won't load
Posted: 11-Nov-2017 15:33   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
I'm surprised, but it does point to an underlying Java issue.
Given my 4 years of experience with jAlbum I am not surprised.
On macOS, it's 1.8.0_152. On Win10, it's 9.0.1+11. And on both platforms, it fails.
Tried both 1.8.0_151-b12 and 9.0.1+11 successfully on project test. This suggests that there is no problem with Zeta Ophiuchi.jpg

However clicking "Add" creates some nice output for both versions of Java and jAlbum 14.2b13, but not for 14.1.13 suggesting that 14.2b13 is wonky:
Album 14.2b13 system console running BeanShell (BeanShell Engine)
This section captures debug prints sent to System.out and System.err
The top section evaluates expressions.
Press Strg+E to evaluate an expression. (Evaluates selected text if selection is active)
You have access to the basic jAlbum implicit objects such as engine and window
 
Sample expressions:
4*(3+2); // Basic calculations
engine.getSkin(); // Use of implicit object
for (AlbumObject ao : selectedObjects) System.out.println(ao); // Iterate over selected objects
window.messageBox("You can interact with any Java object");
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
	at java.awt.Toolkit.createImage(Unknown Source)
	at javax.swing.ImageIcon.<init>(Unknown Source)
	at se.datadosen.jalbum.ThumbnailFileView.getThumbnail(ThumbnailFileView.java:73)
	at se.datadosen.jalbum.ThumbnailFileView.getIcon(ThumbnailFileView.java:62)
	at javax.swing.JFileChooser.getIcon(Unknown Source)
	at sun.swing.FilePane$FileRenderer.getListCellRendererComponent(Unknown Source)
	at javax.swing.plaf.basic.BasicListUI.updateLayoutState(Unknown Source)
	at javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(Unknown Source)
	at javax.swing.plaf.basic.BasicListUI.getPreferredSize(Unknown Source)
	at javax.swing.JComponent.getPreferredSize(Unknown Source)
	at javax.swing.ScrollPaneLayout.layoutContainer(Unknown Source)
	at java.awt.Container.layout(Unknown Source)
	at java.awt.Container.doLayout(Unknown Source)
	at java.awt.Container.validateTree(Unknown Source)
	at java.awt.Container.validateTree(Unknown Source)
	at java.awt.Container.validateTree(Unknown Source)
	at java.awt.Container.validateTree(Unknown Source)
	at java.awt.Container.validateTree(Unknown Source)
	at java.awt.Container.validateTree(Unknown Source)
	at java.awt.Container.validateTree(Unknown Source)
	at java.awt.Container.validateTree(Unknown Source)
	at java.awt.Container.validate(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "File chooser thread" java.lang.NullPointerException
	at java.awt.Toolkit.createImage(Unknown Source)
	at javax.swing.ImageIcon.<init>(Unknown Source)
	at se.datadosen.jalbum.ThumbnailFileView.getThumbnail(ThumbnailFileView.java:73)
	at se.datadosen.jalbum.ThumbnailFileView.getIcon(ThumbnailFileView.java:62)
	at javax.swing.JFileChooser.getIcon(Unknown Source)
	at sun.swing.FilePane$FileRenderer.getListCellRendererComponent(Unknown Source)
	at javax.swing.plaf.basic.BasicListUI.updateLayoutState(Unknown Source)
	at javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(Unknown Source)
	at javax.swing.plaf.basic.BasicListUI.getPreferredSize(Unknown Source)
	at javax.swing.JComponent.getPreferredSize(Unknown Source)
	at javax.swing.ScrollPaneLayout.layoutContainer(Unknown Source)
	at java.awt.Container.layout(Unknown Source)
	at java.awt.Container.doLayout(Unknown Source)
	at java.awt.Container.validateTree(Unknown Source)
	at java.awt.Container.validateTree(Unknown Source)
	at java.awt.Container.validateTree(Unknown Source)
	at java.awt.Container.validateTree(Unknown Source)
	at java.awt.Container.validateTree(Unknown Source)
	at java.awt.Container.validateTree(Unknown Source)
	at java.awt.Container.validateTree(Unknown Source)
	at java.awt.Container.validateTree(Unknown Source)
	at java.awt.Container.validate(Unknown Source)
	at java.awt.Container.validateUnconditionally(Unknown Source)
	at java.awt.Window.pack(Unknown Source)
	at javax.swing.JFileChooser.createDialog(Unknown Source)
	at javax.swing.JFileChooser.showDialog(Unknown Source)
	at se.datadosen.component.JSwingFileChooser.showDialog(JSwingFileChooser.java:82)
	at se.datadosen.explorer.JAlbumExplorer$2$1.run(JAlbumExplorer.java:349)
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums