Jump to content

MIT giving an ArrayIndexOutOfBoundsException


Guest G-Mon

Recommended Posts

Guest G-Mon

Yesterday I was trying to use MIT v5.1.11 to make a secondary copy of a fresh Baldur's Gate 2 installation (I find myself reinstalling MG series games semi-frequently, for various reasons, and I'm trying to reduce said frequency). Only problem was MIT didn't want to play ball; when I tried it interactively, I was greeted by several grayed-out controls. I think that screenshot was with a slightly older version of Java, although installing the latest version didn't change anything. Next step: command line options. Still no dice. Then I tried turning on the "verbose" option and got the following error message:

 

java.lang.ArrayIndexOutOfBoundsException: 0
	at CloningData.instanceFor(CloningData.java:232)
	at MultiInstall.main(MultiInstall.java:64)

 

I'm currently running Windows XP Home with Sun JRE 6 update 2, if it matters any. If anyone can help figure this out, I'd appreciate it. Thanks in advance!

Link to comment
Guest Guest

The greyed-out controls is normal - the checkboxes activate when you select a source, depending on the game; 'Go' when you have a valid source and sink; and 'Cancel' when a clone is going.

 

I think the exception you post is causing the source to not register as valid. The offending code is this:

java.io.FileFilter exeFilter = new CaseInsensitiveFileFilter(possible.exeName);
if(source.listFiles(exeFilter)[0].length() != (long) possible.exeSize

 

Which would mean it can't find bgmain.exe . But I check for this case a few lines above:

for(Object fileobj : neededFiles){
String file = fileobj.toString();
if(source.listFiles(new CaseInsensitiveFileFilter(file)).length == 0){
	continue;	
}
}

 

Can anyone else see what's going on here? Because I'm lost.

Link to comment
Guest G-Mon

Actually, I think I should've mentioned earlier--I'm using BG2:The Collection with full installs of both SoA and ToB, with nothing else but the bonus disc and ToB patch from the expansion CD. As I may have mentioned indirectly, I'm also running the latest version of Sun's JRE available (after uninstalling older versions and a couple reboots). When running the MIT interactively, all of the controls (apart from the two "Browse" buttons) are grayed out even after putting in a valid source and sink. When I try using the command line with the same source and sink with the --batch and --verbose options, I get the above error. (Without --batch, it just shows the main screen with the source and sink pre-filled, but no other controls are usable.) Hope that helps a little better.

Link to comment
Guest Guest

Okay, I just played with it a bit more. It didn't recognize my EasyTutu install as valid, but it did recognize my BG1 install. However, nothing seemed to happen when I picked a sink for it and hit Go (the Cancel button became available, but I had no HD activity and clicking Cancel didn't seem to work). Again, none of these are modded in any way, apart from the official patches for BG1 and BG2.

Link to comment
Guest G-Mon

Tried --batch --verbose with BG1, and I got this:

 

Exception in thread "main" java.lang.NoClassDefFoundError: org/jdesktop/swingworker/SwingWorker
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at java.security.SecureClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.access$000(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClassInternal(Unknown Source)
	at MultiInstall.main(MultiInstall.java:65)

 

As an aside, it's now 5 AM here and I am tired. I'll likely be coming by for the next few days at least, but for now, I'm going to bed. :)

Link to comment

Ok, I see what's happening. That class missed out on being included in the jar somehow. Thing is, it is now also included in the standard library, under the name javax.swing.SwingWorker , but only in the newest version (from last December).

 

So, the question is - what is the best way to fix this? Should I include org.jdesktop.swingworker.SwingWorker in the MIT jar, or is it now safe to depend on the newer Java?

Link to comment
Guest G-Mon

Well, I'm not on the computer with my Baldur's Gate installs (mother's currently playing Sims 2...*mutter* and has been all day...), but I'll give it a shot when I can get on it. I can just get the updated MIT from its download page, right?

Link to comment
Guest G-Mon

Hmm. Looks like it got BG1 to copy (and it seems to work in initial testing), but I'm still at square one with BG2. Oh well, at least it's some progress, right?

Link to comment
Guest G-Mon

Yeah, there's a regular BG2 install on my machine. I was just playing around with the MIT for a bit when I tried it with EasyTutu. I'll probably do some more playing around with MIT over the weekend, in varying permutations of BG2 installs.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...