CitiesSkylinesMods / TMPE

Cities: Skylines Traffic Manager: President Edition
https://steamcommunity.com/sharedfiles/filedetails/?id=1637663252
MIT License
575 stars 85 forks source link

Another sharing violation error on TMPE.log #566

Closed originalfoo closed 4 years ago

originalfoo commented 4 years ago

The first report of this error was in issue #563, by different user who was using v11-alpha9 from workshop.

This new error is via discord chat from user Bp101697, who is using v10.20 STABLE from workshop:

This message sometimes appears when I save the game. How can I fix this?
The Mod C:\Program Files (x86)\Steam\steamapps\workshop\content\255710\583429740 [CSUtil.CameraControl.dll, CSUtil.Commons.dll, TMPE.GenericGameBridge.dll, TMPE.CitiesGameBridge.dll, TrafficManager.dll] has caused an error [ModException]

Details:
System.IO.IOException: Sharing violation on path C:\Program Files (x86)\Steam\steamapps\common\Cities_Skylines\Cities_Data\TMPE.log
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0 
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
  at System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize) [0x00000] in <filename unknown>:0 
  at System.IO.StreamWriter..ctor (System.String path, Boolean append) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool)
  at System.IO.File.AppendText (System.String path) [0x00000] in <filename unknown>:0 
  at CSUtil.Commons.Log.LogToFile (System.String log, LogLevel level) [0x00000] in <filename unknown>:0 
  at CSUtil.Commons.Log.Error (System.String s) [0x00000] in <filename unknown>:0 
  at TrafficManager.State.SerializableDataExtension.OnSaveData () [0x00000] in <filename unknown>:0 
  at SerializableDataWrapper.OnSaveData () [0x00000] in <filename unknown>:0

I don't think the error is due to anything changing in TM:PE. There has recently been a game update (where main menu UI was updated) and also a Steam common distro update, so maybe some of that stuff has caused these recent issues with log file?

originalfoo commented 4 years ago

It's caused by moving game to different folder or problems with Steam installation - for more info, see Troubleshooting guide

Tagging #292, #629