Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: "There has been a problem saving file" on launch bug  (Read 843 times)

minozake

  • Bay Watcher
    • View Profile
"There has been a problem saving file" on launch bug
« on: January 08, 2014, 03:42:38 am »

I'm running Windows 7 with MDF V.4g.

Whenever I try to execute DF quickly from the MDF GUI (such as click DF, close DF, click DF again), the following error message usually pops up:

Code: [Select]
---------------------------
Masterwork Dwarf Fortress
---------------------------
There has been a problem saving file F:\MasterworkDF V4g\Dwarf Fortress\runProgram.bat.

Error: System.UnauthorizedAccessException: Access to the path 'F:\MasterworkDF V4g\Dwarf Fortress\runProgram.bat' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize)
   at System.IO.StreamWriter..ctor(String path)
   at MasterworkDwarfFortress.fileWorking.saveFile(String fullFilePath, String newText)
---------------------------
OK   
---------------------------

I'm not sure about the specifics, but I think runProgram.bat isn't being deleted immediately.  I've moved MDF to a non-Library folder and this problem still exhibits itself.  It makes it really difficult to change settings quickly.

The problem resolves itself after some time.  Usually about a minute, but can take significantly longer.  Trying to use Unlocker on the file doesn't yield results, and running MDF as administrator doesn't fix the problem.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: "There has been a problem saving file" on launch bug
« Reply #1 on: January 08, 2014, 03:56:14 am »

Quote
It makes it really difficult to change settings quickly.
I dont know about the error, but changing setting does not require a newstart. Only a new worldgen.

The only things that need you to restart DF are the changes in the init and d_init, which are the options on the first tab of the GUI.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

minozake

  • Bay Watcher
    • View Profile
Re: "There has been a problem saving file" on launch bug
« Reply #2 on: January 08, 2014, 04:03:50 am »

Those were the settings I was changing.  The workaround was to just edit the text in init.txt and d_init.txt.
Logged

splinterz

  • Bay Watcher
    • View Profile
    • Dwarf Therapist Branch
Re: "There has been a problem saving file" on launch bug
« Reply #3 on: January 08, 2014, 04:34:20 am »

does launching the random creature generator cause the same error? Edit: i missed the part about open/closing df quickly. i'm going to see about removing that bat file altogether..
« Last Edit: January 08, 2014, 09:14:07 am by splinterz »
Logged