Cities: Skylines II

Cities: Skylines II

View Stats:
Marierrrr Nov 26, 2023 @ 7:54am
[ERROR] Cannot access a disposed object.
Does anyone know why this error appears? Appeared just this evening (for me). The error ruins the save and you can no longer play. The saves of both the previous city and the new one have become corrupted. I don’t understand how to continue playing.

[ERROR] Cannot access a disposed object.
Object name: 'ZipFile'.
ObjectDisposedException: Cannot access a disposed object.
Object name: 'ZipFile'.
at ICSharpCode.SharpZipLib.Zip.ZipFile.CommitUpdate () [0x00008] in <58269f4d790846439394acbb7af42feb>:0
at Colossal.IO.AssetDatabase.ZipPackageWriter.Commit () [0x00008] in <86b0e6f5efec4273aeca2c6bbf886cc1>:0
at Colossal.IO.AssetDatabase.ZipPackageWriter.Dispose () [0x00000] in <86b0e6f5efec4273aeca2c6bbf886cc1>:0
at Colossal.IO.AssetDatabase.PackageAsset.Save (System.Boolean force) [0x0009c] in <86b0e6f5efec4273aeca2c6bbf886cc1>:0
at Game.SceneFlow.GameManager+<>c__DisplayClass86_0.<Save>b__0 () [0x0006e] in <1f030b0a20a34c92a53f8d33297505a2>:0
at System.Threading.Tasks.Task`1[TResult].InnerInvoke () [0x0000f] in <b89873cb176e44a995a4781c7487d410>:0
at System.Threading.Tasks.Task.Execute () [0x00000] in <b89873cb176e44a995a4781c7487d410>:0
--- End of stack trace from previous location where exception was thrown ---

at Game.SceneFlow.GameManager.Save (System.String saveName, Game.Assets.SaveInfo meta, Colossal.IO.AssetDatabase.ILocalAssetDatabase database, Game.UI.ScreenCaptureHelper+AsyncRequest previewRequest) [0x0032d] in <1f030b0a20a34c92a53f8d33297505a2>:0
at Game.AutoSaveSystem.AutoSave () [0x000f7] in <1f030b0a20a34c92a53f8d33297505a2>:0
Colossal.Logging.CustomLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:LogFormat(LogType, String, Object[])
Colossal.Logging.UnityLogger:Log(Level, String, Exception)
Colossal.Logging.UnityLogger:Error(Exception)
Game.<AutoSave>d__13:MoveNext()
System.Runtime.CompilerServices.MoveNextRunner:InvokeMoveNext(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean)
System.Runtime.CompilerServices.MoveNextRunner:Run()
System.Threading.Tasks.AwaitTaskContinuation:InvokeAction(Object)
System.Threading.Tasks.AwaitTaskContinuation:RunCallback(ContextCallback, Object, Task&)
System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation:Run(Task, Boolean)
System.Threading.Tasks.Task:FinishContinuations()
System.Threading.Tasks.Task:FinishStageThree()
System.Threading.Tasks.Task:FinishStageTwo()
System.Threading.Tasks.Task:Finish(Boolean)
System.Threading.Tasks.Task:TrySetException(Object)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetException(Exception)
Game.SceneFlow.<Save>d__86:MoveNext()
System.Runtime.CompilerServices.MoveNextRunner:InvokeMoveNext(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean)
System.Runtime.CompilerServices.MoveNextRunner:Run()
System.Threading.Tasks.<>c:<.cctor>b__7_0(Object)
UnityEngine.WorkRequest:Invoke()
UnityEngine.UnitySynchronizationContext:Exec()
UnityEngine.UnitySynchronizationContext:ExecuteTasks()
< >
Showing 1-6 of 6 comments
Major Kudos™ Nov 26, 2023 @ 8:05am 
Are you using any non approved mods or DevMode by chance?
Marierrrr Nov 29, 2023 @ 12:15pm 
no, just vanilla gameplay
Necroth Nov 29, 2023 @ 1:39pm 
you tried to access an object that was already disposed by the garbage collector or maybe tried to access it outside of a using-block it was scoped to, easy
i keep getting this too. I have a city with 110,000 people so it sucks im going to lose everything. Guess Ill try an earlier autosave.

It seems like when you click on certain things it may cause the error. Not sure. I'll try to narrow down what causes it and avoid it. Any ideas?
Marierrrr Dec 2, 2023 @ 1:41pm 
This all may look easy based on your words, but the error ruins the save. and as I understand it, the problem comes from the game itself, and not from the fact that I clicked in the wrong place.

Originally posted by Necroth:
you tried to access an object that was already disposed by the garbage collector or maybe tried to access it outside of a using-block it was scoped to, easy
Mntoes Dec 2, 2023 @ 2:31pm 
Originally posted by Marierrrr:
This all may look easy based on your words, but the error ruins the save. and as I understand it, the problem comes from the game itself, and not from the fact that I clicked in the wrong place.

Originally posted by Necroth:
you tried to access an object that was already disposed by the garbage collector or maybe tried to access it outside of a using-block it was scoped to, easy
Post a bug report Here:- https://forum.paradoxplaza.com/forum/forums/cities-skylines-2-bug-reports.1162/
Looks like it's not been reported before.
Last edited by Mntoes; Dec 2, 2023 @ 2:34pm
< >
Showing 1-6 of 6 comments
Per page: 1530 50

Date Posted: Nov 26, 2023 @ 7:54am
Posts: 6