CitiesSkylinesMods / TMPE

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

System Exception - External Drive #1111

Closed bmhcjs closed 2 years ago

bmhcjs commented 3 years ago

I've moved my game to an external via the appropriate function in Steam, and since then, I've had the following errors each time I try to enable TMPE:

A Mod caused an error [System.Exception]

Details: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.IOException: Sharing violation on path /Volumes/Samsung_T5/SteamLibrary/steamapps/common/Cities_Skylines/Cities.app/Contents/TMPE.log 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.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize) [0x00000] in :0 at System.IO.StreamWriter..ctor (System.String path, Boolean append) [0x00000] in :0 at (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool) at System.IO.File.AppendText (System.String path) [0x00000] in :0 at CSUtil.Commons.Log.LogToFile (System.String log, LogLevel level) [0x00000] in :0 at CSUtil.Commons.Log.InfoFormat (System.String format, System.Object[] args) [0x00000] in :0 at TrafficManager.TrafficManagerMod.OnEnabled () [0x00000] in :0 at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception

And

A Mod caused an error [System.Exception]

Details: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: An exception was thrown by the type initializer for TrafficManager.LoadingExtension ---> System.IO.IOException: Sharing violation on path /Volumes/Samsung_T5/SteamLibrary/steamapps/common/Cities_Skylines/Cities.app/Contents/TMPE.log 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.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize) [0x00000] in :0 at System.IO.StreamWriter..ctor (System.String path, Boolean append) [0x00000] in :0 at (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool) at System.IO.File.AppendText (System.String path) [0x00000] in :0 at CSUtil.Commons.Log.LogToFile (System.String log, LogLevel level) [0x00000] in :0 at CSUtil.Commons.Log.Info (System.String s) [0x00000] in :0 at TrafficManager.UI.Localization.LookupTable.Load () [0x00000] in :0 at TrafficManager.UI.Localization.LookupTable..ctor (System.String lookupTableName) [0x00000] in :0 at TrafficManager.UI.Translation.LoadAllTranslations () [0x00000] in :0 at TrafficManager.LoadingExtension..cctor () [0x00000] in :0 --- End of inner exception stack trace --- at TrafficManager.State.OptionsGeneralTab.T (System.String key) [0x00000] in :0 at TrafficManager.State.OptionsGeneralTab.MakeSettings_General (TrafficManager.UI.Helpers.ExtUITabstrip tabStrip) [0x00000] in :0 at TrafficManager.State.Options.MakeSettings (UIHelperBase helper) [0x00000] in :0 at TrafficManager.TrafficManagerMod.OnSettingsUI (UIHelperBase helper) [0x00000] in :0 at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception

krzychu124 commented 3 years ago

Sorry for late response.

I've searched the web for that error, since it's really rare (mod works for like 99% of MacOS user) and I think I found something.

You have transferred the game to an external drive, so the question is: "Which file system format was selected for that drive?" If it is ExFAT then that might be the main reason of the issue and cannot be fixed by mod because file access is determined by the file system format.

Also make sure that drive was not mounted as Read-Only which may sound obvious but worth checking. I don't have MacOS but I've read on google that permission management on ExFAT drives is slightly different and sometimes OS mounts drives as Read-Only by default.

bmhcjs commented 3 years ago

Hi There. The external drive is formatted as EXFAT, so I will copy the folders off and reformat as something more compatible with MacOS and see what happens.

Thank you for looking into this.

C.

On 31 Jul 2021, at 10:40 am, Krzysztof @.***> wrote:

Sorry for late response.

I've searched the web for that error, since it's really rare (mod works for like 99% of MacOS user) and I think I found something.

You have transferred the game to an external drive, so the question is: "Which file system format was selected for that drive?" If it is ExFAT then that might be the main reason of the issue and cannot be fixed by mod because file access is determined by the file system format.

Also make sure that drive was not mounted as Read-Only which may sound obvious but worth checking. I don't have MacOS but I've read on google that permission management on ExFAT drives is slightly different and sometimes OS mounts drives as Read-Only by default.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/CitiesSkylinesMods/TMPE/issues/1111#issuecomment-890265972, or unsubscribe https://github.com/notifications/unsubscribe-auth/AT5RCGNOCEMPYKKP2OCE7MDT2NBAJANCNFSM45LFWJ7Q.

krzychu124 commented 2 years ago

Closing. Reopen if problem still exist.