DICE PACKS BUNDLE

Thread: Runtime error

  1. #1

    Runtime error

    I'm currently running a game, and FG has suddenly started throwing the following error into the console window:

    Runtime Error: Unable to save file (C:/Users/Han/AppData/Roaming/Fantasy Grounds/campaigns/Rise of the Runelords/db.xml) - Error (22): Invalid argument
    Runtime Error: Unable to save file (C:/Users/Han/AppData/Roaming/Fantasy Grounds/campaigns/Rise of the Runelords/moduledb/Burnt Offerings.xml) - Error (22): Invalid argument
    Runtime Error: Unable to save file (C:/Users/Han/AppData/Roaming/Fantasy Grounds/campaigns/Rise of the Runelords/moduledb/Rise of the Runelords Chapter 3 The Hook Mountain Massacre.xml) - Error (22): Invalid argument
    Runtime Error: Unable to save file (C:/Users/Han/AppData/Roaming/Fantasy Grounds/campaigns/Rise of the Runelords/moduledb/The Skinsaw Murders.xml) - Error (22): Invalid argument
    Database Notice: Campaign saved.

    I've never seen this error before, and I've no idea what could be causing it. Can anyone offer any suggestions? If I shut down FG after my game, will I lose data?

  2. #2
    Zacchaeus's Avatar
    Join Date
    Dec 2014
    Location
    Scotland
    Posts
    20,805
    Does this happen in a new campaign? Do you have full read/write permissions to the folder you are saving to? Are you using any extensions? Usually unable to save suggests a file permissions issue, but you are saving to the default folder so that really shouldn't be an issue.
    If there is something that you would like to see in Fantasy Grounds that isn't currently part of the software or if there is something you think would improve a ruleset then add your idea here https://www.fantasygrounds.com/featu...rerequests.php

  3. #3
    It's a long-term game, and I've never had any problems with it before on this same PC. In fact, I don't think it was even happening at the start of this session! I'm in the middle of a game, so I can't run tests right now. I'm only using the DoE sound extension.

    What does "Invalid argument" mean?

    Okay, my session has finished now, so I can look into it more. The FG application data folder shows that the db.xml file hasn't been updated since 20:37 this evening, but the chatlog.html file has been updated much more recently (22.22). 20.37 is over an hour into the session, so the problem started during the session - it would have auto-saved without fuss beforehand. The fact that it can write to the chatlog suggests that it's not a permissions issue (along with the fact that it was working fine before). So, what's the "invalid argument" that FG is passing when trying to write to the xml files that isn't present when writing to the chatlog?

    So now I've shut down FG, re-started it, and opened that campaign again - and it has lost all the changes since 20.37. It still won't save, and throws the same error - but it only happens in that one campaign. It gives the "backup database" message when starting the campaign, but refers to a backup made the previous time we played the game.
    Last edited by Callum; April 16th, 2018 at 22:56.

  4. #4
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    When this error has happened to people before, it is because FG can't save the files.

    How much free space do you have on your C drive?
    Run an error check scan on the drive to see if there are any issues.
    If you haven't closed down FG yes, type /save in the chat window and see if the errors are still there.
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  5. #5
    There's over 70 GB free on the C drive. Would it really give an "Invalid argument" error if it was a space or permissions issue? I guess it wouldn't be the first time in history that a piece of software has given an unhelpful error message...

    There are no errors on the C drive.

    I tried typing /save while FG was still running, and it gave the same errors. It did the same thing once I'd restarted FG.
    Last edited by Callum; April 17th, 2018 at 21:07.

  6. #6
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Quote Originally Posted by Callum View Post
    Would it really give an "Invalid argument" error if it was a space or permissions issue?
    It all depends on what error messages the file handling library passes back for this issue.

    Quote Originally Posted by Callum View Post
    I tried typing /save while FG was still running, and it gave the same errors. It did the same thing once I'd restarted FG.
    In other cases when there were permission issues FG raised "Error (13): Permission denied". So it probably isn't "normal" permission issues, but might be a less common permission issue.

    The couple of times this has been mentioned in the past, is where basically the filename wasn't valid (maybe the filename is the invalid argument?).

    - I'd go through and check all of those paths are valid, there is full access to all of those files for the Windows user you're logged in as.
    - Copy the campaign with a different directory name, load the copied campaign up in FG and see if that raises the error.
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  7. #7
    From my research of past issues, I found what Trenloe wrote. It’s usually been tied to an “invalid” file name.

    Make sure there are no trailing spaces or special characters in your campaign name.

    Also, you can try in a brand new campaign. Create a new campaign with different name, exit, copy over contents of original campaign folder into new campaign folder, restart new campaign.

    Regards,
    JPG

  8. #8
    The filename (or some part of the path) being faulty does seem like it would cause this error - but the path is fine, and there aren't any special characters anywhere in it. It also would have had to have changed while I was running my game, since it was working fine at the beginning oif the session.

    I tried your suggestion of copying everything into a new campaign folder, and it worked fine in there. I also tried renaming the db.xml file in the original campaign folder, and replacing it with the most recent backup file, and that worked fine. Then - and here's the killer - I renamed the original db.xml file back to db.xml, and now it works fine!

    I think I'll just have to write this off as one of those weird glitches that I'll never get to the bottom of, and set about trying to get the campaign back to where it should be with the help of the chatlog. Thanks for all your help, guys!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
STAR TREK 2d20

Log in

Log in