Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TMPE.log "access denied" error when C:SL moved to different drive #292

Closed
originalfoo opened this issue Apr 20, 2019 · 3 comments
Closed
Assignees
Labels
EXTERNAL Mod conflict or other external factor invalid Not a valid issue

Comments

@originalfoo
Copy link
Member

If user moves their steamapps folder to another drive (or their entire C: drive for that matter) something in the game isn't getting updated properly and exceptions occur:

https://steamcommunity.com/app/255710/discussions/0/1678063648163403458/

A Mod caused an error [System.Exception]

Details:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.UnauthorizedAccessException: Access to the path "F:\Program Files1 (x86)\Steam\steamapps\common\Cities_Skylines\Cities_Data\TMPE.log" is denied.
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.Info (System.String s) [0x00000] in <filename unknown>:0 
at TrafficManager.TrafficManagerMod.OnEnabled () [0x00000] in <filename unknown>:0 
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception
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.State.GlobalConfig ---> System.UnauthorizedAccessException: Access to the path "F:\Program Files1 (x86)\Steam\steamapps\common\Cities_Skylines\Cities_Data\TMPE.log" is denied.
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.Warning (System.String s) [0x00000] in <filename unknown>:0 
at TrafficManager.State.GlobalConfig.Load (System.DateTime
@FireController1847
Copy link
Collaborator

FireController1847 commented Apr 20, 2019

@aubergine10 Have you manually moved over your steamapps folder without using Steam's Library function?

I only ask this because I previously moved my game to the D:\ drive once upon a time and I developed like that; never had an issue with TMPE.log not having permission to be written to.

EDIT: My apologies, I had missed the discussion link. Looking more into it, it appears he has moved windows by... literally moving and dragging the folders over. Nobody should ever do that, ever. If he wanted to install on a different drive, he should have changed the drive while he was installing Windows. En quote, "I got many problems with administrator rights with steam games." Clearly this is not the only time he's had an issue like this.

Your solution of reinstalling the game using the Steam Library function PROPERLY should have fixed it, HOWEVER that being said it is likely it wont due to folder permissions being screwed up due to him... moving... windows... manually. Don't do that. Don't ever do that. It's stupid.

@FireController1847 FireController1847 added EXTERNAL Mod conflict or other external factor invalid Not a valid issue labels Apr 20, 2019
@FireController1847 FireController1847 self-assigned this Apr 20, 2019
@originalfoo
Copy link
Member Author

I run everything on Drive C: (1TB SSD). The error report above was from a user on Steam (discussion link in OP).

@FireController1847
Copy link
Collaborator

FireController1847 commented Apr 20, 2019

@aubergine10 My apologies. The issue for this is not a TM:PE issue and is in fact a user-error issue. I'm closing this issue until I can find some reason this is caused by TM:PE and not him moving everything manually. I have repsponded to his discussion and hopefully he'll be able to get it resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EXTERNAL Mod conflict or other external factor invalid Not a valid issue
Projects
None yet
Development

No branches or pull requests

2 participants