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


Permlink Replies: 9 - Pages: 1 - Last Post: 9 Feb 21, 12:30 Last Post By: AndreWolff
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
Problems with jAlbum variable originalDate
Posted: 2 Feb 21, 10:27
 
  Click to reply to this thread Reply
I see the a problem with variable originalDate, see this test album.

I use variable originalDate to display the Exposure date in my FancyBox skin, where I use the next code to save these dates in FancyBox page slidePage.js :
var exposureDate = [<ja:fileiterator start="0" >
<ja:if exists="originalDate">
'${originalDate}',
</ja:if><ja:else>'',</ja:else>
</ja:fileiterator>
];

Another FancyBox user reported a wrong display of the exposure date: In a short test album the exposure date was displayed correctly while in another album the exposure date of the same picture was incorrectly displayed.

In the correct album the slidePage.js file shows:
var exposureDate = [
'24-04-2011 15:09 ',
'24-04-2011 15:10 ',
'24-04-2011 15:18 ',
'24 -04-2011 17:21 ',
'30-04-2011 13:37 ',
'30-04-2011 13:38 ',  test photo
];
This array is in the incorrect album :
var exposureDate = [
'',
'',
'',
'',
'27 -03-2011 21:31 ',
'',
'',
'02-04-2011 09:59 ',
'',
'02 -04-2011 11:22 ',
'02 -04-2011 11:24 ',
'02 -04-2011 11:45 ',
'02 -04-2011 11:57 ',
'02 -04-2011 13:22 ',
'02 -04-2011 15:38 ',
'02 -04-2011 17:29 ',
'17-04-2011 16:32 ',
'17-04-2011 16:43 ',
'17-04-2011 17:13 ',
'23-04-2011 14:27 ',
'23-04-2011 14:33 ',
'23-04-2011 14:46 ',
'23-04-2011 15:21 ',
'23-04-2011 15:25 ',
'23-04-2011 15:29 ',
'23-04-2011 15:30 ',
'24-04-2011 14:39 ',
'24-04-2011 14:53 ',
'24-04-2011 15:09 ',
'24-04-2011 15:10 ',
'24-04-2011 15:18 ',
'24-04-2011 15:58 ', test photo wrong date
'24 -04-2011 17:21 ',
'30-04-2011 13:37 ',
'30-04-2011 13:38 ',  this is the correct date of the test photo
'30-04-2011 15:00 ',

You see the correct date is shifted. Notice too the extra spaces in some dates.

Is this a bug in jAlbum?

System Windows 10 and jAlbum version 23.1.3

Edited by: AndreWolff on 02-Feb-2021 12:32
davidekholm

Posts: 3,440
Registered: 18-Oct-2002
Re: Problems with jAlbum variable originalDate
Posted: 2 Feb 21, 15:09   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
See if only certain images produce these incorrect dates, then attach one of them here. Another test is to simply iterate through the images and print the originalDate to the system console without any attempts to concatenate strings.
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
Re: Problems with jAlbum variable originalDate
Posted: 2 Feb 21, 17:54   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Attachment Exif_data.PNG.jpg (121.9 KB)
Well David, in the attached screen-shot you see the slide page with the wrong exposure date in the upper left corner from the variable originalDate.
At the bottom you see the EXIF data, where the exposure date is calculated with my getExifInfo() function:
public String getExifInfo() {
 if ((meta != void)&& (meta != null)) {
  bv= meta.get("Date/Time Original");
  if ((bv == void)||(bv == null)) {  /* Video? */
  	bv= meta.get("Quicktime.Creation Time");
	if ((bv == void)||(bv == null))  bv= meta.get("Quicktime video.Creation Time");
	if ((bv == void)||(bv == null))  bv= meta.get("Mp4 video.Creation Time");
	if ((bv != void)&&(bv != null) && bv.startsWith("Fri Jan 01 00:00:00")) bv= meta.get("File.File Modified Date"); 
  }
  if ((bv != void)&&(bv != null))  {
     DT= getText("expDate") + ": " + bv +", "; 
   }

The picture which causes the problem is not of me, so I can't attach this. Hopefully will my client do this and answer the other question.
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
Re: Problems with jAlbum variable originalDate
Posted: 8 Feb 21, 09:44   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
The client did solve this problem by removing the first 8 pictures, making the album and next inserting again the 8 images.

The array reported above did no longer show format errors:
var exposureDate = [
'',
'',
'27-03-2011 21:31',
'',
'02-04-2011 09:59',
'',
'02-04-2011 11:22',
'02-04-2011 11:24',
'02-04-2011 11:45',
'02-04-2011 11:57',
'02-04-2011 13:22',
'02-04-2011 15:38',
'02-04-2011 17:29',
'17-04-2011 16:32',
'17-04-2011 16:43',
'17-04-2011 17:13',
'23-04-2011 14:27',
'23-04-2011 14:33',
'23-04-2011 14:46',
'23-04-2011 15:21',
'23-04-2011 15:25',
'23-04-2011 15:29',
'23-04-2011 15:30',
'24-04-2011 14:39',
'24-04-2011 14:53',
'24-04-2011 15:09',
'24-04-2011 15:10',
'24-04-2011 15:18',
'24-04-2011 15:58',
'24-04-2011 17:21',
'30-04-2011 13:37',
'30-04-2011 13:38',
'30-04-2011 15:00',
'30-04-2011 15:44',
'01-05-2011 15:30',
davidekholm

Posts: 3,440
Registered: 18-Oct-2002
Re: Problems with jAlbum variable originalDate
Posted: 8 Feb 21, 10:00   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
André, sounds like a thread safety bug. Can you reproduce this problem at will?
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
Re: Problems with jAlbum variable originalDate
Posted: 8 Feb 21, 10:33   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
André, sounds like a thread safety bug. Can you reproduce this problem at will?
Sadly enough I don't know, because I have no access to the images, only my client can answer this question.
davidekholm

Posts: 3,440
Registered: 18-Oct-2002
Re: Problems with jAlbum variable originalDate
Posted: 8 Feb 21, 10:54   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
If the client can reproduce the problem, ask him/her to change the # of threads under Preferences to 1, then retry. This will affect performance negatively, but will help me understand if this problem is due to some kind of thread race condition (which I suspect)
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
Re: Problems with jAlbum variable originalDate
Posted: 9 Feb 21, 09:21   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
If the client can reproduce the problem, ask him/her to change the # of threads under Preferences to 1, then retry.
He tried it too with one thread, but it makes no difference.

I will mail you a link.
davidekholm

Posts: 3,440
Registered: 18-Oct-2002
Re: Problems with jAlbum variable originalDate
Posted: 9 Feb 21, 09:42   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
I see. The most efficient way forward is if you can get that customer to pass you/me a zip of a minimal project that replicates the problem. It should tell what's the expected output and show how the real output differs from it.
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
Re: Problems with jAlbum variable originalDate
Posted: 9 Feb 21, 12:30   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
The problem is found and it has nothing to do with the jAlbum core.
Thanks for your advices.
Legend
Forum admins
Helpful Answer
Correct Answer

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