PDA

View Full Version : FG II crash on close



Callum
December 19th, 2007, 11:55
Every time I close FG II, it crashes - with the usual Windows error message. This behaviour has only developed fairly recently, and it doesn't seem to cause any other problems (such as data loss) when I start FG II the next time, so I'm not sure if I should even post this! But I thought I'd better flag it, in case the problem develops, or anyone else is experiencing something similar.

Valarian
December 19th, 2007, 12:00
I have this as well. It seems to be something getting corrupted in the campaign registry. I cured it last time by backing up the db.xml and recreating the campaign folder. Then I put the db.xml back in to the new folder. I think some players lost their notes, but everything else was there.

The cause (I think) seems to be something to do with drawings / tokens saved on maps which are within modules.

DNH
December 19th, 2007, 14:35
this occurs if you have multiple pins on maps which refer to the same location, such as empty rooms or guardrooms, where you only have the one story entry, but multiple rooms and hence multiple pins.

Foen
December 23rd, 2007, 07:14
It also arises if you create (deliberately or by accident) new entries in module lists (such as maps, story entries etc). The problem is that FG sometimes defaults to using the module tab (at the bottom of the entry lists) for new entries instead of the db tab.

Stuart

Callum
January 21st, 2008, 15:29
It also arises if you create (deliberately or by accident) new entries in module lists (such as maps, story entries etc). The problem is that FG sometimes defaults to using the module tab (at the bottom of the entry lists) for new entries instead of the db tab.
I'm not quite sure I understand this, but I think it must be the reason, as I don't have multiple pins referring to single locations on my module maps. Can you explain what you mean in a little more detail, please Stuart? More importantly, can you explain how to fix it? :-) Thanks!

Sigurd
January 21st, 2008, 17:44
I added a new module tab to the scenario of the Savage Worlds ruleset (nothing else was changed) and now it always crashes on exit.

I think this is reproducable.

Sigurd

Griogre
January 21st, 2008, 20:03
Yes, you are correct the tab is reproduceable. If you add *anything* to a module you have opened, FG will crash on exit. It apparently has no clue what to do with the extra data. You can edit open module data and be fine (with the usuall caveat you didn't really change the data in the module) but once you add something you will crash on exit.

Sigurd
January 21st, 2008, 20:34
Griogre do you know if updates are secure? Is there a potential data loss here?

Any work arounds? Plans to address the bug?

It puts a serious crimp in modules if you cant update them in game and export them as a new version when you're done.


Sigurd

Griogre
January 22nd, 2008, 20:48
I'm not quite sure I understand this, but I think it must be the reason, as I don't have multiple pins referring to single locations on my module maps. Can you explain what you mean in a little more detail, please Stuart? More importantly, can you explain how to fix it? :-) Thanks!
Bascially I believe what Stuart is saying is: If you have opened a module into a campaign and if you go to one of the module tabs and press New and add an entry. When you close FG it will crash.

Basically you are adding something to a module tab. To fix the crash just delete the new entry. If the entry is important to you, to get the entry on the tab - open the module campaign add the entry and re-export. NOTE: If you had made changes entries to module entries in the campaign you pulled the module into - this will revert these changes back to module baseline. If you do not want to revert the module at this time, you can add the entry in the campaign just not under a module tab.

Griogre
January 22nd, 2008, 21:08
I added a new module tab to the scenario of the Savage Worlds ruleset (nothing else was changed) and now it always crashes on exit.

I think this is reproducable.

Sigurd
Sigurd I misread this in my first reply. I just took a look at this and the Orc scenario is a library book type module not a standard adventure module - an interesting idea, actually. When I just add a tab in the test campaign with the module imported and then move an entry over to the new tab FG does not crash on entry - probably because a library module doesn't remember changes like an adventure module. In fact when I restart the campaign the tab is gone.

I don't have time to mess with this today, but how did you add the tab? Did you convert the adventure to a "standard" campaign or just add it to the "book's" XML and remodulize it? The library book module idea is very interesting as it would not allow the adventure to be loaded as a campaign normally and would be very resistant to change.

Griogre
January 22nd, 2008, 21:19
Griogre do you know if updates are secure? Is there a potential data loss here?

Any work arounds? Plans to address the bug?

It puts a serious crimp in modules if you cant update them in game and export them as a new version when you're done.
I will look at the SW stuff more. However normally the crash on exit, at least for me, never caused data loss. I finally went looking for it because I was worried about data corruption, though that never happened for me either.

As that Orc module that came with SW is not a normal campaign adventure, unless you made it one, I have grave doubts the data remains changeable past the session you change it. ...In fact, I just changed an entry and closed FG and reloaded it and the change was gone to the module entry.

If you need to change things in that adventure I think you need to convert it to an normal adventure module (or edit the module's xml itself).

Sigurd
January 22nd, 2008, 23:30
Maybe I have something else going on. I'll have to do some more fiddling.

Very simply here's what I did.

Started a new scenario with the SW ruleset. Enabled the mods from the ruleset.
- everything closes fine.

Opened the story notes pressed "new". Created a record "D20 vs Savage Worlds". Wrote a small intro piece for players familiar with D20 but not SW.

Even without adding a tab to it. This causes the program to crash on exit.
Remove everything I added and it behaves normally.


-sigurd

joshuha
January 23rd, 2008, 00:16
Make sure when you create a campaign, before you open any modules that you create a new node in each Story/NPC/Items/etc.

This will force the first default tab to create. Then open the module and try your test again. This is a bug thats been reported before and is on the list.

Callum
January 23rd, 2008, 11:11
Bascially I believe what Stuart is saying is: If you have opened a module into a campaign and if you go to one of the module tabs and press New and add an entry. When you close FG it will crash.

Basically you are adding something to a module tab. To fix the crash just delete the new entry. If the entry is important to you, to get the entry on the tab - open the module campaign add the entry and re-export.
Thanks for the tip, Griogre. Is there any easy way to tell which entry is causing the problem? All my tabs are merged, and I don't remember what I added when...

Also, this error occurs even when I don't have any modules open (but only in my "base" campaign - the modules themselves don't have any issues).

Foen
January 23rd, 2008, 18:13
If it happens when there are no open modules, then I think we might be talking about a different bug.

I have also experienced similar symptoms when the db.xml contains unexpected characters (illegal within an xml element) or when you change the 'type' of a database node having already populated it. This latter point is only relevant if you are building custom rulesets, an change a numberfield to a stringfield, for example.

Cheers

Stuart

Sigurd
January 23rd, 2008, 19:26
Being able to add tabs without crashing is sort of important.

This makes me wonder how many players actually use none of the written elements of the game. How many people tell there stories with just the very bare chatwindow, dice & shared pictures?


Sigurd

Griogre
January 23rd, 2008, 20:41
On small side quests and such because I use voice, I rarely have anything input other than maps and personalities and maybe a single storybook entry with a quick overview and background for me and maybe the players.

However because of the general flakyness of tabs and because I use a lot of modules I seldom ever use more than one tab per module per book because if you do use a lot of tabs and open up several modules at once the tabs run right off the edge of the book.

By the way I was not able to reproduce you tab crash from the step by step intructions above.

Griogre
January 23rd, 2008, 22:17
Thanks for the tip, Griogre. Is there any easy way to tell which entry is causing the problem? All my tabs are merged, and I don't remember what I added when...

Also, this error occurs even when I don't have any modules open (but only in my "base" campaign - the modules themselves don't have any issues).
I agree with Stuart, if you had no modules open it is probably different from an entry into a module tab. Here is how I find things like this. I would first make an easy check for bad characters. To do this start your browser and open the db.xml file in it. Most browsers will parse xml files and let you know if they found an error, however if in doubt whether you browser can do this, use IE. If that didn’t find a problem you are going to have to get your hands dirty and do some work.

First make a copy of your db.xml file and put it somewhere in a different folder where it is safe. You are likely going to need it. Next open the db.xml file in you campaign folder. Your goal here is keep deleting about half of the file until you pin point the problem. However you need to cut out parts of the file so that the remaing sections all have their start and closing attributes. If you have an XML editor or code editor of some sort with undo, use it because that will make things much easier.

The db.xml file is divided into various parts: <charsheet>, <encounter>, <houserule>, <image>, <item>, <library>, <npc>. A couple of these are typically empty like the houserule one. If you are using an editor with the ability to collapse areas then collapse each area to one line. Next delete half the areas, like charsheet, encounter and houserule (you did make that copy right?).

Start FG with the campaign you are working on and then close it. Leave the editor open. If FG did not crash on exit you just found an area that has a problem *and* you know the areas left in the db.xml file are clean - this is the best case scenario. If FG does crash then there is a problem in the remaining half of the file. However you could *also* have a problem in the area you cut out as well – this is the worse case scenario. So if you did get a crash on exit after cutting out about half the db.xml file you need to flip flop and check the half you originally cut out to make sure you don’t have a problem there too. Narrow down which sections of the file are good and keep doing this until you find the section FG doesn’t like, omitting any section that is empty.

Once you find a bad section scan through it looking for garbage characters or odd looking structure. If you don’t see anything then delete half the section and see if that solved it, once again make sure you delete whole entrys so you don't have any attributes without a start and close. Basically keep halving the section until it is good then start adding back sections to locate the bad parts. Unless you are unlucky you probably don’t have many different problems. The most likely scenario where you have a lot of problems is you have bad characters used more than once.

Callum
January 24th, 2008, 12:19
Using Griogre's divide-and-conquer method, I've isolated the problem - and I think it is actually linked to the module tabs issue, after all. The crash is caused by having a non-null "mergeid" in a <category> that contains some items.

For example, this is okay:-


<category name="" mergeid="AoW" baseicon="0" decalicon="0">
</category>

This is also okay:-


<category name="" mergeid="" baseicon="0" decalicon="0">
<id-00005>
</id-00005>
</category>

But this causes a crash on trying to exit FGII:-


<category name="" mergeid="AoW" baseicon="0" decalicon="0">
<id-00005>
</id-00005>
</category>

In practical terms, what this means is that I can't get any objects (NPCs, magic items, etc.) that I create in my "base" campaign to merge their tabs with objects from my modules. Objects from different modules will merge their tabs without a problem.

So I guess the solution is to keep only the PCs in the "base" campaign, and create a new module for persistent objects. Fortunately, I only have a few of those at the moment! Alternatively, I suppose I could have a "base" tab with a distinctive appearance, and keep all persistent objects under that,

Griogre
January 25th, 2008, 02:42
Good to know, Callum.

FYI Sigurd, when I looked at the DA SW Orc Module I noticed it has two tabs with mergeid's called Kevin and one with none. You might try setting the Kevin's to empty.

Sigurd
January 25th, 2008, 02:47
Make sure when you create a campaign, before you open any modules that you create a new node in each Story/NPC/Items/etc.

This will force the first default tab to create. Then open the module and try your test again. This is a bug thats been reported before and is on the list.


If I do this first I can add things. I'll still look into the node thing.

Tenser
March 26th, 2008, 04:22
Using Griogre's divide-and-conquer method, I've isolated the problem - and I think it is actually linked to the module tabs issue, after all. The crash is caused by having a non-null "mergeid" in a <category> that contains some items....


Wow, thanks for going through the grunt work to figure this out Callum! I had the same problem and was able to just search through my db.xml for mergeid's looking for the non-null one with items in it. Sure enough I had one and I when I set the mergeid to null then I stopped getting the crash on exit.

Bidmaron
December 28th, 2008, 03:42
In case anyone is doing thread searches to troubleshoot problems, the issues described in this thread regarding multiple pins to the same location were fixed. However, I don't believe the tab clash problem or the creation of an empty tab has been fixed.

Also, as of FG 2.3.0, you can now make persistent changes to adventure (not reference) modules.

Hye Jedi
March 14th, 2010, 18:59
I'm running the latest version of FGII with a Full License and I am having this problem pretty consistently. I am running Windows XP w/ SP3. Any help would be greatly appreciated.