Problems opening campaign file

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
TomeWyrm
Kobold
Posts: 3
Joined: Thu Aug 04, 2011 6:24 am

Problems opening campaign file

Post by TomeWyrm »

I'm using 1.3b86, and have been at least once a week since late April. I reformatted my PC (I'm using Windows XP), and upgraded to JRE v7 on the first of August.

I've saved and opened this file many times on this version of MapTool. I tried removing the .maptool folder and using a new download of 1.3b86. Nothing helped, though the error did change from

Code: Select all

2011-08-04 02:52:03,937 [util.ImageManager$BackgroundImageLoader:277] ERROR - BackgroundImageLoader.run(Campaign,6d96d19bdd99a15c35def8e00163e914): not resolved
java.io.IOException: Could not load image
	at net.rptools.lib.image.ImageUtil.bytesToImage(ImageUtil.java:295)
	at net.rptools.maptool.util.ImageManager$BackgroundImageLoader.run(ImageManager.java:275)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
2011-08-04 02:52:21,765 [client.MapTool:291] ERROR - PersistenceUtil.error.campaignVersion
to

Code: Select all

2011-08-04 04:52:58,406 [client.MapTool:291] ERROR - PersistenceUtil.error.campaignVersion
when I removed the .maptool folder. I'm about to try opening it on another computer with v6.26 of the JRE (my last version before the reformat), to see if it's Java or not. Just as soon as it decides that it won't take an hour for Windows Installer to prepare to uninstall the old Java version. Sometimes I hate Windows.

If there's anything else that's needed, I'll be happy to provide it. I'm a power user, but not a programmer, so go easy on the tech jargon if you can.

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Problems opening campaign file

Post by Azhrei »

There has been no testing of MapTool against Java 7 (that I know of) so it's likely the Java version.

It's interesting to see that though, as it indicates something being done by the current code will not be compatible with J7. If there are any areas where J7 will screw up MT it's probably image management and networking. MT turns off the image caching that Java does internally and uses its own cache management, and the networking stuff is klunky enough that it's fairly fragile IMO.

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Re: Problems opening campaign file

Post by jfrazierjr »

TomeWyrm wrote:I'm using 1.3b86, and have been at least once a week since late April. I reformatted my PC (I'm using Windows XP), and upgraded to JRE v7 on the first of August.

I've saved and opened this file many times on this version of MapTool. I tried removing the .maptool folder and using a new download of 1.3b86. Nothing helped, though the error did change from

Code: Select all

2011-08-04 02:52:03,937 [util.ImageManager$BackgroundImageLoader:277] ERROR - BackgroundImageLoader.run(Campaign,6d96d19bdd99a15c35def8e00163e914): not resolved
java.io.IOException: Could not load image
	at net.rptools.lib.image.ImageUtil.bytesToImage(ImageUtil.java:295)
	at net.rptools.maptool.util.ImageManager$BackgroundImageLoader.run(ImageManager.java:275)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
2011-08-04 02:52:21,765 [client.MapTool:291] ERROR - PersistenceUtil.error.campaignVersion
to

Code: Select all

2011-08-04 04:52:58,406 [client.MapTool:291] ERROR - PersistenceUtil.error.campaignVersion
when I removed the .maptool folder. I'm about to try opening it on another computer with v6.26 of the JRE (my last version before the reformat), to see if it's Java or not. Just as soon as it decides that it won't take an hour for Windows Installer to prepare to uninstall the old Java version. Sometimes I hate Windows.

If there's anything else that's needed, I'll be happy to provide it. I'm a power user, but not a programmer, so go easy on the tech jargon if you can.
If your tests show java 6 working, you can uninstall Java 7, reboot, install java 6, reboot, install java 7(make sure it's installed to a different folder!!!!!). Then you can modify the .bat file used the start MapTool and add paths to the 1.7 version of javaw.exe instead of letting windows pick for you(in which case it will pick Java 1.7).

You MIGHT also have set the classpath variable, but it will go out of scope once the bat file finishes running(not show how all this works, but you might have to use java.exe instead to keep it knowing where to go!!) Others will have to provide this type of info though.
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

User avatar
Meren9
Kobold
Posts: 2
Joined: Thu Aug 04, 2011 1:18 pm

Re: Problems opening campaign file

Post by Meren9 »

I am having a similar problem.

I was running a campaign for my friends as the DM and I saved the campaign because I ran into a computer issue that could only be solved by reformatting my HDD's.

After getting everything up and running again I went to open the file and continue working on it I go this error:

Code: Select all

2011-08-04 10:31:35,836 [client.MapTool:291] ERROR - PersistenceUtil.error.campaignVersion
com.thoughtworks.xstream.converters.ConversionException: Cannot construct sun.awt.geom.Order0 as it does not have a no-args constructor : Cannot construct sun.awt.geom.Order0 as it does not have a no-args constructor
---- Debugging information ----
message             : Cannot construct sun.awt.geom.Order0 as it does not have a no-args constructor
cause-exception     : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
cause-message       : Cannot construct sun.awt.geom.Order0 as it does not have a no-args constructor
class               : net.rptools.maptool.util.PersistenceUtil$PersistedCampaign
required-type       : sun.awt.geom.Order0
path                : /net.rptools.maptool.util.PersistenceUtil$PersistedCampaign/campaign/zones/entry/net.rptools.maptool.model.Zone/grid/cellShape/curves/sun.awt.geom.Order0
line number         : 21
-------------------------------
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:89)
	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:71)
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.populateCollection(CollectionConverter.java:68)
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.unmarshal(CollectionConverter.java:61)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:246)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:218)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:162)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:246)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:218)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:162)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:246)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:218)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:162)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:71)
	at com.thoughtworks.xstream.converters.collections.MapConverter.populateMap(MapConverter.java:79)
	at com.thoughtworks.xstream.converters.collections.MapConverter.unmarshal(MapConverter.java:66)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:246)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:218)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:162)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:246)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:218)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:162)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:137)
	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:33)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:923)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:909)
	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:853)
	at net.rptools.lib.io.PackedFile.getFileObject(PackedFile.java:552)
	at net.rptools.lib.io.PackedFile.getContent(PackedFile.java:230)
	at net.rptools.lib.io.PackedFile.getContent(PackedFile.java:207)
	at net.rptools.maptool.util.PersistenceUtil.loadCampaign(PersistenceUtil.java:413)
	at net.rptools.maptool.client.AppActions$71.run(AppActions.java:1977)
Caused by: com.thoughtworks.xstream.converters.reflection.ObjectAccessException: Cannot construct sun.awt.geom.Order0 as it does not have a no-args constructor
	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.newInstance(PureJavaReflectionProvider.java:71)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.instantiateNewInstance(AbstractReflectionConverter.java:308)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:161)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
	... 57 more
2011-08-04 10:31:37,655 [util.PersistenceUtil:437] WARN - Could not load campaign in the current format...  trying the legacy format.
2011-08-04 10:31:37,655 [client.MapTool:321] WARN - PersistenceUtil.warn.campaignNotLoaded
I am fairly sure the file is not corrupted because I can extract everything out of it with 7-zip. If you need any other info from me please do not hesitate to ask.

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Problems opening campaign file

Post by Azhrei »

Meren9 wrote:

Code: Select all

com.thoughtworks.xstream.converters.ConversionException: Cannot construct sun.awt.geom.Order0 as it does not have a no-args constructor : Cannot construct sun.awt.geom.Order0 as it does not have a no-args constructor
That's a very interesting error message. I'm looking at the code differences between Java 6 and OpenJDK 7 for that class and I don't see any significant differences in the code that would affect this.

It's true that neither has a "no-args" constructor, but then how could it work in Java 6?

I'm thinking there may be an error in your XML files embedded inside the campaign file. Can you upload your campaign file somewhere and then link to it here? I'd like to look at the XML.

User avatar
IMarvinTPA
Dragon
Posts: 467
Joined: Mon Sep 11, 2006 10:12 am
Contact:

Re: Problems opening campaign file

Post by IMarvinTPA »

Java 7 has turned on some optimizations that can cause crashes. (The same options are disabled in 6.)

http://developers.slashdot.org/story/11 ... -Community

IMarv

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Re: Problems opening campaign file

Post by Phergus »

I don't think it is the compiler optimizations or at least not the one that was mentioned in that thread.

It could still be some other Oracle screwup but I be just as likely to point the finger at the obsolete XStream library. Perhaps their use of reflection is why it thinks it is trying to call a no-arg Order0 constructor?

BTW, MT doesn't build with the JDK 7 release as the FTPClient package used by MT has apparently changed significantly. Resolving those issues (with empty stubs mostly) does allow it to build and run normally but it can't load any campaigns.

******
Follow up: Rebuilding XStream with JDK 7 didn't fix the issue.

User avatar
Meren9
Kobold
Posts: 2
Joined: Thu Aug 04, 2011 1:18 pm

Re: Problems opening campaign file

Post by Meren9 »

I just re-installed the whole shebang. It was Java 7. :(

TomeWyrm
Kobold
Posts: 3
Joined: Thu Aug 04, 2011 6:24 am

Re: Problems opening campaign file

Post by TomeWyrm »

Yeah, it loads just fine with Java 6.

I tried importing maps, macro sets, and tokens from the campaign (exported on the other computer) and it didn't like any of them. So I can confirm that MapTool under Java 7 doesn't like files created with Java 6.

Jfrazierjr, just to be clear, if I want to use Java 7, I'm going to have to install it (to a different folder, obviously). Then re-write the batch file I use to start MapTool to point to the version 6 javaw.exe or java.exe, and then I reach the end of my experience. The classpath variable stuff goes right over my head. Time for some research, meanwhile I'm just ignoring Java 7 until one of my programs complains strenuously that I need to upgrade.

Azhrei, I have the same exact debugging info in my log as Meren9 (almost identical error too. It's just .mapVersion instead of .campaignVersion), and can also extract all my files with 7-Zip.

Here's my campaign file if you want to take a look: http://www.mediafire.com/?mgteyulm9ykb1du

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Problems opening campaign file

Post by Azhrei »

That campaign file looks exactly like the others I have here. That means I have no idea what they could've changed in J7 that would screw this up.

Since Order0 does not have a no-args constructor, what is J6 doing to make this work? Whatever it is, they changed it in J7 apparently. The quickest way to determine that would be to step through the XStream XML library, but that code is pretty obtuse so I'm not going to spend the time on it. But I will add a comment to the Download page of the web site that Java 7 won't load campaigns from Java 6. Maybe that'll the new folks at least...

Edit: This was reported here where the person reporting the problem says that a snapshot release of Java 7 fixes it. They want to know if it's a bug in Java 7; it looks and sounds to me that it is.

Post Reply

Return to “MapTool”