My campaign file DIED, including backups.

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
Shoruke
Kobold
Posts: 4
Joined: Mon Nov 30, 2015 12:26 am

My campaign file DIED, including backups.

Post by Shoruke »

So I'm GMing some D&D 5e with my buds from some other forum.
Game is going fine. Well, the party is getting smacked pretty hard occasionally, but maptools is working fine.
And then suddenly, flood of error messages. I can't even type "omg help" into chat to indicate that things are going VERY WRONG.
Eventually the errors slow down.
I saved a chatlog. Successfully.
I tried to close maptools, and hit save so that we can keep our progress. Seems to save and close successfully.
I reopen maptools. I try to open the Campaign.

Error while reading campaign file.
java.lang.NullPointerException

Cannot determine campaign file format; not loaded.


Same errors when I try the backups. All of them.
Autosave folder is empty.
I passed the campaign file to one of the players and asked her to load it. Same error.

....AAAARGHGABL!?!?

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: My campaign file DIED, including backups.

Post by wolph42 »

couple of things:
- link the file here so we can have a look
- which backups did you try?
- if you referred to the MT backup directory: why on earth didn't you have a separate backup
- install dropbox and work from there (it has a 1 month repository so you can fall back to an older version if things go sour/th)
- can you recall what you were doing BEFORE everything went haywire?

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: My campaign file DIED, including backups.

Post by aliasmask »

Can you change the cmpgn extension to .zip and open the zip file. If not, then you may want to try a zip repair program. Also, did you save the file over the old one?

Shoruke
Kobold
Posts: 4
Joined: Mon Nov 30, 2015 12:26 am

Re: My campaign file DIED, including backups.

Post by Shoruke »

wolph42 wrote:couple of things:
- link the file here so we can have a look
- which backups did you try?
- if you referred to the MT backup directory: why on earth didn't you have a separate backup
- install dropbox and work from there (it has a 1 month repository so you can fall back to an older version if things go sour/th)
- can you recall what you were doing BEFORE everything went haywire?

- https://drive.google.com/file/d/0By4EdS ... sp=sharing
- I went to Users/myname/.maptools/backup and there were four backup files. I tried each of them.
- Why on Earth would I need more than four backups? You would think one would be sufficient, and two would be justifiably paranoid.
- Need campaign back first.
- The group was in combat. I think I clicked the chatbox to start typing, is what happened right before I got the stream of errors.

aliasmask wrote:Can you change the cmpgn extension to .zip and open the zip file. If not, then you may want to try a zip repair program. Also, did you save the file over the old one?
Thank you for the advice! But... it didn't work. Q_Q
DiskInternals .zip repair said it fixed everything, and... uh... well, it didn't.
(is maptools even able to load a campaign straight from a .zip file?)
And yes, I saved over the old file. I was panicking slightly, and figured 3 or 4 automatic backups really aught to suffice -_-

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: My campaign file DIED, including backups.

Post by Full Bleed »

Please provide a copy of your Help>Gather Debug Information from within MT.
Same errors when I try the backups. All of them.
Only way you would corrupt multiple backups (i.e. totally separate files) would be if you had a problem with your hard drive file system. It's possible that the active campaign file could become corrupted and/or be saved into a corrupted state (almost always due to a memory shortage problem) but separate files would not have been touched by MT during the corruption.
Autosave folder is empty.
This is not surprising. If you close MT "properly" the Autosave file is deleted. The file in the Autosave directory is only there for crash recovery (i.e. if MT close unexpectedly while using it).
I passed the campaign file to one of the players and asked her to load it. Same error.
How about one of your "backups"?
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: My campaign file DIED, including backups.

Post by wolph42 »

ok had a look and got the same error, tried b91 and 1.4 same result. Checked the content.xml (which is where stuff goes wrong) again nothing strange. So the only thing I can imagine is that one of you images got corrupted somehow and crashes the campaign file on load. (not that that is very helpful).
- I went to Users/myname/.maptools/backup and there were four backup files. I tried each of them.
- Why on Earth would I need more than four backups? You would think one would be sufficient, and two would be justifiably paranoid.
to be honest, of important stuff I have several backups, usually different versions. Indeed one backup is generally enough. However relying on the system (MT) making backups for you without you actually knowing
1. its doing a backup at all
2. what it *is* storing as backup
that is not creating a backup at all in my book.
With a 'backup' I mean a concious choice to copy a save file to another location. As I use dropbox I don't worry too much about this, but I do make a backup after every version (for stuff that I develop) and game session (usually before I start the evening).

you can at least extract the assets and still use those. You could also check all the assets to see if one is indeed broken and if so, remove all reference to it in the campaign file

Shoruke
Kobold
Posts: 4
Joined: Mon Nov 30, 2015 12:26 am

Re: My campaign file DIED, including backups.

Post by Shoruke »

wolph42 wrote: you can at least extract the assets and still use those. You could also check all the assets to see if one is indeed broken and if so, remove all reference to it in the campaign file
Could it have been an asset dropped into the campaign by one of the players?
I don't know how to remove assets from a campaign file without being able to load it, how do I do this?

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: My campaign file DIED, including backups.

Post by Full Bleed »

wolph42 wrote:you can at least extract the assets and still use those. You could also check all the assets to see if one is indeed broken and if so, remove all reference to it in the campaign file
What zip tool are you using to remake the cmpgn zip files after opening them? I've tried using WinRar (saving as a zip) and the zip tool built into Windows and both do not seem to zip the file together in a format that MT recognizes correctly.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: My campaign file DIED, including backups.

Post by wolph42 »

Full Bleed wrote:
wolph42 wrote:you can at least extract the assets and still use those. You could also check all the assets to see if one is indeed broken and if so, remove all reference to it in the campaign file
What zip tool are you using to remake the cmpgn zip files after opening them? I've tried using WinRar (saving as a zip) and the zip tool built into Windows and both do not seem to zip the file together in a format that MT recognizes correctly.
Shoruke wrote:
wolph42 wrote: you can at least extract the assets and still use those. You could also check all the assets to see if one is indeed broken and if so, remove all reference to it in the campaign file
Could it have been an asset dropped into the campaign by one of the players?
I don't know how to remove assets from a campaign file without being able to load it, how do I do this?
yes it could be and removing them is (TBH) something I've never tried before, but might work. There's a the 'assets' map in the zip that you can check the images. These have a hash tag/file name, I would guess that the contect.xml contains a reference to that hash or file name, if you can find that link, you can remove it from both the assets and the xml. But first you need to check all the assets to see if actually one is corrupted! (might be something else entirely).

As for saving the zip... I've never had issues with that, I've used winrar and gzip.

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: My campaign file DIED, including backups.

Post by Jagged »

Shoruke wrote: I don't know how to remove assets from a campaign file without being able to load it, how do I do this?
I would extract the campaign into a directory structure. Then you can browse through the images with relative ease.

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: My campaign file DIED, including backups.

Post by Full Bleed »

Error logging indicates that it is a corrupted drawable. I would not bother messing around with the files in the asset directory... on a cursory look they look fine.

Code: Select all

2015-11-30 23:25:43,648 [client.MapTool:266] ERROR - PersistenceUtil.error.campaignRead
java.lang.NullPointerException
	at sun.dc.DuctusRenderingEngine.createStrokedShape(Unknown Source)
	at java.awt.BasicStroke.createStrokedShape(Unknown Source)
	at net.rptools.maptool.model.drawing.LineSegment.createLineArea(LineSegment.java:66)
	at net.rptools.maptool.model.drawing.LineSegment.getArea(LineSegment.java:50)
	at net.rptools.maptool.model.Zone.collapseDrawableLayer(Zone.java:1413)
	at net.rptools.maptool.model.Zone.collapseDrawables(Zone.java:1396)
	at net.rptools.maptool.model.Zone.optimize(Zone.java:1387)
	at net.rptools.maptool.util.PersistenceUtil.loadCampaign(PersistenceUtil.java:431)
	at net.rptools.maptool.client.AppActions$55.run(AppActions.java:2095)
2015-11-30 23:25:46,015 [util.PersistenceUtil:448] WARN - Could not load campaign in the current format...  trying the legacy format.
2015-11-30 23:25:46,015 [client.MapTool:298] WARN - PersistenceUtil.warn.campaignNotLoaded
I'd remove the drawables and see what I could salvage in the campaign, but when I convert the cmpgn file to a zip, unzip it, and then rezip it I get a completely different error (which tells me that the rezip I've done isn't valid for MT). So even if I find the problem I'd never know it because I can't recreate the cmpgn file properly.

Error from my bad rezip:

Code: Select all

2015-12-01 13:22:40,148 [client.MapTool:266] ERROR - msg.error.failedLoadCampaign
java.io.IOException: Stream closed
	at java.io.BufferedInputStream.getInIfOpen(Unknown Source)
	at java.io.BufferedInputStream.read1(Unknown Source)
	at java.io.BufferedInputStream.read(Unknown Source)
	at sun.nio.cs.StreamDecoder.readBytes(Unknown Source)
	at sun.nio.cs.StreamDecoder.implRead(Unknown Source)
	at sun.nio.cs.StreamDecoder.read(Unknown Source)
	at java.io.InputStreamReader.read(Unknown Source)
	at java.io.BufferedReader.fill(Unknown Source)
	at java.io.BufferedReader.read1(Unknown Source)
	at java.io.BufferedReader.read(Unknown Source)
	at java.io.LineNumberReader.read(Unknown Source)
	at java.io.Reader.read(Unknown Source)
	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1364)
	at org.apache.commons.io.IOUtils.copy(IOUtils.java:1340)
	at org.apache.commons.io.IOUtils.toString(IOUtils.java:542)
	at net.rptools.lib.io.PackedFile.getContent(PackedFile.java:226)
	at net.rptools.lib.io.PackedFile.getContent(PackedFile.java:207)
	at net.rptools.maptool.util.PersistenceUtil.loadCampaign(PersistenceUtil.java:420)
	at net.rptools.maptool.client.AppActions$55.run(AppActions.java:2095)
So, if someone can *verify* a rezip program/method I'll take a look.

Also, Shoruke, what map were you using when the campaign crashed? If I was going to poke around, that would be the map I'd want to look at.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

Shoruke
Kobold
Posts: 4
Joined: Mon Nov 30, 2015 12:26 am

Re: My campaign file DIED, including backups.

Post by Shoruke »

Full Bleed wrote:Error logging indicates that it is a corrupted drawable. I would not bother messing around with the files in the asset directory... on a cursory look they look fine.


...

Also, Shoruke, what map were you using when the campaign crashed? If I was going to poke around, that would be the map I'd want to look at.
We were on the Mountain Forest Ruin map.

I still don't know how to do any of this "poking around the campaign file" stuff you people are talking about, except by opening the campaign file in maptools, which I can't do. Is there a tutorial on messing around with campaign files or something?

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: My campaign file DIED, including backups.

Post by Full Bleed »

Shoruke wrote:I still don't know how to do any of this "poking around the campaign file" stuff you people are talking about, except by opening the campaign file in maptools, which I can't do. Is there a tutorial on messing around with campaign files or something?
If you rename a .cmpgn file to a .zip file you can unzip it. Inside the zip is an asset directory (that contains all the images in the campaign) and two XML files (content and properties.)

I believe that your problem/corruption is inside the content.xml file with a drawable.

You can open the content.xml file with a text editor like Notepad++. Inside you might be able to remove reference to some something that is corrupted. So, for example, if there is a corrupted drawable and you removed it you might be able to open the campagn file.

The problem *I'm* having is that even if I don't change anything (i.e. only rename the cmpgn file to a zip, extract it, re-zip it, and renamed the zip back to a cmpgn file) I'm unable to get MT to open the file. I've now tried WinRar, 7-Zip, and the extraction tool in Win10. So if someone else can test and verify a method to re-create the cmpgn by zipping up the core campaign files and renaming to a .cmpgn file then maybe the corrupted part of your campaign can be excised so that you don't lose the whole thing.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

Post Reply

Return to “MapTool”