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


Permlink Replies: 7 - Pages: 1 - Last Post: 20 Dec 24, 21:20 Last Post By: davidekholm Threads: [ Previous | Next ]
jorsh

Posts: 14
Registered: 15-Sep-2024
Java exception on a webloc created from a certain URLs
Posted: 16 Dec 24, 05:43
 
  Click to reply to this thread Reply
jAlbum 36.
On webloc created from a few URLs (drag-and-drop location from the FireFox on to jAlbum) I am getting Java exception when trying make an album:

java.io.UncheckedIOException: Cannot register variables for manual-webloc
	at se.datadosen.jalbum.AlbumObjectImpl.getVars(AlbumObjectImpl.java:2955)
	at se.datadosen.jalbum.AlbumBean.makeAlbumForFolder(AlbumBean.java:1880)
	at se.datadosen.jalbum.AlbumBean.makeAlbum(AlbumBean.java:3687)
	at se.datadosen.jalbum.AlbumBean.smartMakeAlbum(AlbumBean.java:3524)
	at se.datadosen.jalbum.MakeAlbumTask.doInBackground(MakeAlbumTask.java:176)
	at se.datadosen.jalbum.TaskManager$BackgroundTask.call(TaskManager.java:113)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.EOFException
	at java.desktop/javax.imageio.stream.ImageInputStreamImpl.readShort(Unknown Source)
	at java.desktop/javax.imageio.stream.ImageInputStreamImpl.readUnsignedShort(Unknown Source)
	at com.twelvemonkeys.imageio.metadata.jpeg.JPEGSegmentUtil.readSOI(JPEGSegmentUtil.java:161)
	at com.twelvemonkeys.imageio.metadata.jpeg.JPEGSegmentUtil.readSegments(JPEGSegmentUtil.java:102)
	at com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReader.readSegments(JPEGImageReader.java:844)
	at com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReader.initHeader(JPEGImageReader.java:693)
	at com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReader.initHeader(JPEGImageReader.java:728)
	at com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReader.getWidth(JPEGImageReader.java:184)
	at se.datadosen.util.FileFilters.getBasicImageInfo(FileFilters.java:608)
	at se.datadosen.jalbum.AlbumObjectImpl.getImageInfo(AlbumObjectImpl.java:328)
	at se.datadosen.jalbum.AlbumObjectImpl.getSize(AlbumObjectImpl.java:341)
	at se.datadosen.jalbum.AlbumObjectImpl.getSize(AlbumObjectImpl.java:336)
	at se.datadosen.jalbum.AlbumBean.addFilteredImageSizes(AlbumBean.java:4359)
	at se.datadosen.jalbum.AlbumBean.registerVariables(AlbumBean.java:3144)
	at se.datadosen.jalbum.AlbumObjectImpl.getVars(AlbumObjectImpl.java:2942)
	... 9 more


URLs to reproduce an issue:
1. https://www.forumcabasse.org/forum/viewtopic.php?t=10008
2. https://www.turntableneedles.com/D1507-DAC2-DAT2-PD07C-PD07T-Type-Special-Hi-tracking-Stylus-for-Pickering-V15-Stock-604-D7C_p_1180.html
3. http://hyperphysics.phy-astr.gsu.edu/hbase/Audio/cross.html
4. https://www.simplyspeakers.com/

Edited by: jorsh on 16 Dec 2024, 05:43
JeffTucker

Posts: 8,071
Registered: 31-Jan-2006
Re: Java exception on a webloc created from a certain URLs
Posted: 16 Dec 24, 07:46   in response to: jorsh in response to: jorsh
 
  Click to reply to this thread Reply
Using click-and-drag to enter the web locations, the routine fails to create a properly-formed webloc in some cases. I can't detect a pattern to the failures.

It works properly if, instead, I use right-click, New page, Web location, and paste the URL.
jorsh

Posts: 14
Registered: 15-Sep-2024
Re: Java exception on a webloc created from a certain URLs
Posted: 19 Dec 24, 03:55   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
I am trying create webloc files automatically from Windows URL shortcuts using groovy scrip and setting associated image using:

ao.getProperties().putHidden( "imageURI", se.datadosen.util.IO.urlEncode(imagefilename));


I found out that if for each URL in question I go into jAlbum and manually "Edit" on a new created webloc, click "Update" button next to the "image URL" text box, and wait for update complete I can make album without any issue and all references work fine.

Is there any way I can force this behavior from the groovy script?
RobM

Posts: 3,938
Registered: 4-Aug-2006
Re: Java exception on a webloc created from a certain URLs
Posted: 19 Dec 24, 09:44   in response to: jorsh in response to: jorsh
 
  Click to reply to this thread Reply
Daft question, but not showing more code so I have to ask, have you saved the property change?
See last entry of https://jalbum.net/help/en/Code_Snippets
jorsh

Posts: 14
Registered: 15-Sep-2024
Re: Java exception on a webloc created from a certain URLs
Posted: 19 Dec 24, 13:38   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Sorry for not posting code. Will try do better next time
     case "jalbum.imageurl":
             //window.messageBox( ao.getClass().getSimpleName() + ", imageURI: " + val );
             props.putHidden( "imageURI", se.datadosen.util.IO.urlEncode(val));
             props.save();
             break;


Yes, I do. Apart from the image I am also setting user variables, keywords, some other properties and then save them all at once.

Also, I can confirm image file is set to an webloc object because when open "Edit" I see a new image name in the "image URI" text box and it stay there after jAlbum restart.

Edited by: jorsh on 19 Dec 2024, 13:42

Edited by: jorsh on 19 Dec 2024, 13:43
RobM

Posts: 3,938
Registered: 4-Aug-2006
Re: Java exception on a webloc created from a certain URLs
Posted: 19 Dec 24, 21:48   in response to: jorsh in response to: jorsh
 
  Click to reply to this thread Reply
I think you are going to need the help of David. He will really need much more of your code to help though.
jorsh

Posts: 14
Registered: 15-Sep-2024
Re: Java exception on a webloc created from a certain URLs
Posted: 20 Dec 24, 04:43   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
There is at least one scenario I was able consistently reproduce. I found sometimes for URLs in question corresponding image in the ".jalbum\cache" may have zero length, even though "imageURI" hidden property set to a valid local file. Once this happen album will consistently fail to make.

Once I delete zero sized file I can make album with no errors and "cache" will get a new file with a proper size.

At the moment, as a workaround, I am thinking to clear all zero length files from the external command.

Edited by: jorsh on 20 Dec 2024, 04:44
davidekholm

Posts: 3,689
Registered: 18-Oct-2002
Re: Java exception on a webloc created from a certain URLs
Posted: 20 Dec 24, 21:20   in response to: jorsh in response to: jorsh
 
  Click to reply to this thread Reply
Good. Let me know if you're able to reproduce a scenario that causes a zero length cache file!
Legend
Forum admins
Helpful Answer
Correct Answer

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