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


Permlink Replies: 13 - Pages: 1 - Last Post: 20-Feb-2020 10:33 Last Post By: davidekholm Threads: [ Previous | Next ]
AndreWolff

Posts: 1,648
Registered: 14-Dec-2007
ArrayIndexOutOfBoundsException
Posted: 16-Feb-2020 10:05
 
  Click to reply to this thread Reply
With version 19.3.3 on my Windows 10 system I still get sometimes this error report:
feb. 14, 2020 10:11:04 P.M. se.datadosen.jalbum.ScriptEnginePool <init>
FINER: Initializing
feb. 14, 2020 10:11:05 P.M. se.datadosen.jalbum.AlbumBean prepareMakeAlbum
FINE: clean: 0.501s
feb. 14, 2020 10:11:05 P.M. se.datadosen.jalbum.ScriptEnginePool doGet
FINER: Initializing bsh.BshScriptEngine@2d950a1f
--- Image settings ---
{
  "filterStack": [
    {
      "class": "se.datadosen.jalbum.JAFilterNode",
      "filter": {
        "class": "ConstrainRatioFilter",
        "maxRatio": 2.2
      },
      "stage": 4
    }
  ],
  "imageSize": "1920x1080",
  "keepMetaData": false,
  "progressiveMode": false,
  "qualityPercent": 60,
  "scalingMethod": "ScaleMedium",
  "sharpenPercent": 50,
  "thumbScale": 2,
  "thumbSize": "800x160"
}
--- End of image settings ---
Make changes
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
Make album: 2m 27.365997s
But it is not reproducable and I see no problems in the generated album.
davidekholm

Posts: 3,473
Registered: 18-Oct-2002
Re: ArrayIndexOutOfBoundsException
Posted: 16-Feb-2020 11:01   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
See if you get a better stack trace if you set logging level to "FINER" and retry.
AndreWolff

Posts: 1,648
Registered: 14-Dec-2007
Re: ArrayIndexOutOfBoundsException
Posted: 16-Feb-2020 11:38   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
What you see is already done with level FINER.

This is an album of 2950 MB: https://www.andrewolff.nl/FotoSerie/Algarve/index.html

so it is not so easy to find the images giving problems!

It would help if you report if FINER is selected, the album and image location in case of an exception!
davidekholm

Posts: 3,473
Registered: 18-Oct-2002
Re: ArrayIndexOutOfBoundsException
Posted: 18-Feb-2020 11:24   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
I agree fully. jAlbum should usually give you enough info, but if the problem occurs within a skin, it might be that it's the skin that produces this less-than-ideal error report. What happens if you build the same album using Minimal or Tiger for instance?
jGromit

Posts: 7,791
Registered: 31-Jan-2006
Re: ArrayIndexOutOfBoundsException
Posted: 18-Feb-2020 13:30   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
I've seen this one, too, though it's usually:
java.lang.ArrayIndexOutOfBoundsException: Index -2147483648 out of bounds for length 8
And the index number appears to the same one André has gotten. And since that's 2*31, it's what I call a "suspicious number!"

Utterly random, though always with a large, existing project, like my family album. That one's using Pluto, but I'm sure I've seen it when it was using an earlier skin, like Neptune. Never does any harm, and doesn't occur if you just hit Make Album again. It does cough up a warning triangle at lower right, of course - otherwise, I'd never have noticed it.

I've set the logging level to FINER, and I'll see if I can track it down. But I don't hold out much hope, since it's completely non-reproducible.
AndreWolff

Posts: 1,648
Registered: 14-Dec-2007
Re: ArrayIndexOutOfBoundsException
Posted: 18-Feb-2020 17:42   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
What happens if you build the same album using Minimal or Tiger for instance?
Sorry, I am not at home and this is a very large album and the problem is not reproducible, so I Can’t do that yet.
But it would be greatif you could extend the error reporting as discussed above.
davidekholm

Posts: 3,473
Registered: 18-Oct-2002
Re: ArrayIndexOutOfBoundsException
Posted: 18-Feb-2020 19:41   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
Let me know if it happens with more than one skin. If it only happens within one skin, then it may be the skin itself that produces that error messa - something I can't simply add a file name to.
AndreWolff

Posts: 1,648
Registered: 14-Dec-2007
Re: ArrayIndexOutOfBoundsException
Posted: 18-Feb-2020 19:45   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Well, jGromit uses other skins as I do and he sees the same problem, so I don’t think it is skin dependent, but I think it depends on the images.
karlmistelberger

Posts: 462
Registered: 5-Dec-2013
Re: ArrayIndexOutOfBoundsException
Posted: 19-Feb-2020 08:02   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
Let me know if it happens with more than one skin. If it only happens within one skin, then it may be the skin itself that produces that error messa - something I can't simply add a file name to.

FYI: In the dark times (late 80s), when Windows would only handle 64K pages David Bailey solved the problem of index out of bounds and uninitialized variables by providing a debugger pointing to the offending line of code and variable:

https://www.silverfrost.com/manuals/77userguide.pdf
davidekholm

Posts: 3,473
Registered: 18-Oct-2002
Re: ArrayIndexOutOfBoundsException
Posted: 19-Feb-2020 08:53   in response to: karlmistelberger in response to: karlmistelberger
 
  Click to reply to this thread Reply
karlmistelberger wrote:
davidekholm wrote:
Let me know if it happens with more than one skin. If it only happens within one skin, then it may be the skin itself that produces that error messa - something I can't simply add a file name to.

FYI: In the dark times (late 80s), when Windows would only handle 64K pages David Bailey solved the problem of index out of bounds and uninitialized variables by providing a debugger pointing to the offending line of code and variable:

https://www.silverfrost.com/manuals/77userguide.pdf


Sure, but NO environment can intercept and handle this error if it's already being "taken care" of by a skin, for instance with code like this:
try {
  // error produced here
} catch (Exception ex) {
  System.err.println(ex);
}
I'm not saying this is actually the case here, just saying that IF a skin contains code like that, then no amount of clever coding environment can produce a better error report as the error is being "handled" by the skin itself
karlmistelberger

Posts: 462
Registered: 5-Dec-2013
Re: ArrayIndexOutOfBoundsException
Posted: 19-Feb-2020 09:04   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
karlmistelberger wrote:
davidekholm wrote:
Let me know if it happens with more than one skin. If it only happens within one skin, then it may be the skin itself that produces that error messa - something I can't simply add a file name to.

FYI: In the dark times (late 80s), when Windows would only handle 64K pages David Bailey solved the problem of index out of bounds and uninitialized variables by providing a debugger pointing to the offending line of code and variable:

https://www.silverfrost.com/manuals/77userguide.pdf

Sure, but NO environment can intercept and handle this error if it's already being "taken care" of by a skin, for instance with code like this:

try {
  // error produced here
} catch (Exception ex) {
  System.err.println(ex);
}
I'm not saying this is actually the case here, just saying that IF a skin contains code like that, then no amount of clever coding environment can produce a better error report as the error is being "handled" by the skin itself

Sure, it's up to the author of the skin to provide run-time diagnostics. :-)
davidekholm

Posts: 3,473
Registered: 18-Oct-2002
Re: ArrayIndexOutOfBoundsException
Posted: 19-Feb-2020 09:17   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
I've checked jAlbum's source code for possibly causes to this bad error reporting and found one location: If an image's metadata structure confuses jAlbum's image orientation detection during album build, then that error message might be produced, but the album build continues and jAlbum assumes a normally oriented image. I've now adjusted the error reporting to include a full stack trace and file name of the offending file (do a core update). If we can isolate this then I may be able to make jAlbum's orientation detection handle these files too. (I suspect a big endian vs little endian mismatch. The number -2147483648 is 10000000000000000000000000000000 in binary.)
AndreWolff

Posts: 1,648
Registered: 14-Dec-2007
Re: ArrayIndexOutOfBoundsException
Posted: 19-Feb-2020 11:34   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
But can you explain why it is not reproducible?

Anyhow I did a core update and next a Make All with my album. after an hour the album was ready without giving the error report.
davidekholm

Posts: 3,473
Registered: 18-Oct-2002
Re: ArrayIndexOutOfBoundsException
Posted: 20-Feb-2020 10:33   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
But can you explain why it is not reproducible?

No. Such intermittent problems are usually the cause of multi threaded race conditions, but in the case with the image orientation detection, there is no shared code among threads.
Legend
Forum admins
Helpful Answer
Correct Answer

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