This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 7 - Pages: 1 - Last Post: 16 Sep 22, 13:14 Last Post By: JeffTucker
JeffTucker

Posts: 8,039
Registered: 31-Jan-2006
Import Published Album bug
Posted: 14 Sep 22, 15:53
 
  Click to reply to this thread Reply
I created a project with 146 images, and uploaded the album to my jalbum.net hosting. I then closed the project, and selected File > Import > Import Published Album, and pointed it to the album I had just uploaded.

The download proceeded without any apparent errors. But the imported project shows only 140 images. The albumfiles.txt file lists all 146, and the output slides directory does, in fact, contain 146, but the image directory shows only 140 image files.

I believe I've identified a pattern to the omitted images. If the file name of one of the images is a substring of another image file name, it gets skipped. For example:

Tarantula by Webb.jpg
Tarantula.jpg

The second image is not copied from the slides directory back into the image directory.

But it's even a bit stranger than that. Take these files, e.g.,:

Orion - ESO.jpg
Orion by Hubble.jpg
Orion Nebula Detail.jpg
Orion Nebula.jpg
Orion.jpg

The one that ends up missing is Orion Nebula.jpg. The other four are still there. Not quite what I would have predicted!

Let me know if you want access to my jalbum.net account, and you can experiment.
JeffTucker

Posts: 8,039
Registered: 31-Jan-2006
Re: Import Published Album bug
Posted: 14 Sep 22, 16:06   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
I'm also getting sporadic console error messages when importing a published album. These don't seem to be causing any actual problems, but they appear often:
Folder download: 6.182s
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.isExpanded()" because "this.root" is null
	at java.desktop/javax.swing.tree.VariableHeightLayoutCache.rebuild(Unknown Source)
	at java.desktop/javax.swing.tree.VariableHeightLayoutCache.setModel(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicTreeUI.setModel(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicTreeUI$Handler.propertyChange(Unknown Source)
	at java.desktop/java.beans.PropertyChangeSupport.fire(Unknown Source)
	at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
	at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
	at java.desktop/java.awt.Component.firePropertyChange(Unknown Source)
	at java.desktop/javax.swing.JTree.setModel(Unknown Source)
	at se.datadosen.jalbum.JPublishWizard$PublishStep.onShow(JPublishWizard.java:1524)
	at se.datadosen.component.JWizard.setVisible(JWizard.java:124)
	at se.datadosen.jalbum.JPublishWizard.setVisible(JPublishWizard.java:204)
	at se.datadosen.jalbum.JAlbumFrame$JAlbumFrameActions$14.actionPerformed(JAlbumFrame.java:3709)
	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.BasicMenuItemUI.doClick(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
	at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)
	at java.desktop/javax.swing.JComponent.processMouseEvent(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.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(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$4.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	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$5.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	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)
Project settings found and imported
Images copied from C:\Users\jefft\Documents\My Albums\dlct-1\album to C:\Users\jefft\Documents\My Albums\dlct-1
No JSON data found
davidekholm

Posts: 3,442
Registered: 18-Oct-2002
Re: Import Published Album bug
Posted: 14 Sep 22, 18:34   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
I can reproduce that issue (missing importing some images). I'll work on fixing it.
JeffTucker

Posts: 8,039
Registered: 31-Jan-2006
Re: Import Published Album bug
Posted: 14 Sep 22, 18:37   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
It's one of those oddball bugs that could slip by unnoticed for years. :)

If you want it, here's a compact, 5-image album that puts it all on display!

(demo project removed)
davidekholm

Posts: 3,442
Registered: 18-Oct-2002
Re: Import Published Album bug
Posted: 15 Sep 22, 15:33   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
Thanks Jeff. Now fixed in https://jalbum.net/download/beta/jalbum-core.jar

(This version also handles picking the largest Variant in the recovery process)
JeffTucker

Posts: 8,039
Registered: 31-Jan-2006
Re: Import Published Album bug
Posted: 15 Sep 22, 16:09   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
That's better. :)

I'm still getting the occasional console error dump I reported above, but I can't detect any pattern to it. I can do half-a-dozen album imports without seeing it, then do another one, and get it. Seems to be harmless, so it can be ignored for now. If I can reproduce it reliably, I'll let you know.

One little semi-dangerous oddity....

Say you have a mydog album on the server, and you import the whole thing. That creates a mydog project on the PC. Then you decide to delete the whole project. It will also delete the published version. That's logical, and anyone who does that deserves what he gets.

But if you already have a mydog project on the PC, it creates mydog-1. So far, so good. But if you decide to delete the entire mydog-1 project, it deletes not only the local project, but also the published mydog - the original one. Of course, since you still have the mydog project on your PC in that situation, you can upload it again. It's just a little strange.
davidekholm

Posts: 3,442
Registered: 18-Oct-2002
Re: Import Published Album bug
Posted: 16 Sep 22, 12:40   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
Yes, I should eventually take care of that risky corner case too.
JeffTucker

Posts: 8,039
Registered: 31-Jan-2006
Re: Import Published Album bug
Posted: 16 Sep 22, 13:14   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
Yes, I should eventually take care of that risky corner case too.

And if you're paying attention to the dialog boxes, you know it's happening. When you delete the entire project, the second dialog box indicates that it will delete the published mydog album, and you can click No. Then everything's fine.
Legend
Forum admins
Helpful Answer
Correct Answer

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