gnivler / PanicSystem

Simulates mechwarrior panic and automatic ejections
The Unlicense
4 stars 14 forks source link

3.20 Message: Could not find file PanicSystemStorage.json #41

Closed steve-pritchard closed 5 years ago

steve-pritchard commented 5 years ago

Mod errors out with the following log.txt:

================================================================================ Message: Could not find file "C:\Program Files (x86)\Steam\steamapps\common\BATTLETECH\Mods\PanicSystem\PanicSystemStorage.json". StackTrace: at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in :0 at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in :0 at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare) at System.IO.File.OpenRead (System.String path) [0x00000] in :0 at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) [0x00000] in :0 at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding) [0x00000] in :0 at (wrapper remoting-invoke-with-check) System.IO.StreamReader:.ctor (string,System.Text.Encoding) at System.IO.File.ReadAllText (System.String path, System.Text.Encoding encoding) [0x00000] in :0 at System.IO.File.ReadAllText (System.String path) [0x00000] in :0 at PanicSystem.Controller.DeserializeStorageJson () [0x00000] in :0

File mentioned is present, zip for mod folder attached. PanicSystem.zip

gnivler commented 5 years ago

Hmm weird. Did the error appear after upgrading to 3.20 from a previous version? That error is non-fatal so should continue to try running despite it; does the mod work otherwise? My first thoughts: rename/delete the file to ensure it's not locked by the OS (if so, reboot), or try Sysinternals procmon with a filter for that path (fairly advanced method).

steve-pritchard commented 5 years ago

Tried a clean install a couple of times with the same result. mod sometimes works for a while before throwing the error, doesn't cause any hangs/locks when it happens, just ceases to work (no status changes/ejects etc.)

Will try what you suggested.

PS - thanks for your work on this, it's my favorite BattleTech mod, really gives the feeling of playing against enemy pilots rather than suicidal robots.

gnivler commented 5 years ago

Thanks, we're glad you like it (small team, not just me), it was our goal to make it realistic!

Your description of the symptoms makes sense.. works then falls over. I can't see why yet but it follows the code. I inherited the tracking bits that use those two storage JSONs but they've proven pretty reliable to date so I left it alone. I'd be interested to hear if others are experiencing this too..

steve-pritchard commented 5 years ago

Tried a fresh install of the whole game, running just this mod, checked BTML and ModTek up to date, and set up process monitor to just see what was going on with this mod. Also set the mod to verbose.

It throws the log file and error before a battle is started, but then file is created and the error doesn't re-occur.

Ran a few quick battles and the verbose feedback all looked good, no errors. and process monitor all looked good too. Will go ahead and close this, thanks again.

gnivler commented 5 years ago

Ok right on glad it's working. I'll check out the code around those loading/initializing events, I'd prefer it not throw errors during normal init.. never noticed that, will try to reproduce.

Thanks too.

On Mon, Nov 26, 2018 at 12:48 PM steve-pritchard notifications@github.com wrote:

Tried a fresh install of the whole game, running just this mod, checked BTML and ModTek up to date, and set up process monitor to just see what was going on with this mod. Also set the mod to verbose.

It throws the log file and error before a battle is started, but then file is created and the error doesn't re-occur.

Ran a few quick battles and the verbose feedback all looked good, no errors. and process monitor all looked good too. Will go ahead and close this, thanks again.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gnivler/PanicSystem/issues/41#issuecomment-441752389, or mute the thread https://github.com/notifications/unsubscribe-auth/ARmQpeA6XtfGSmZDstDUhRFGfWWBXm5qks5uzDdygaJpZM4YyNPU .