Why does Cities Skylines take so long to exit?

  • We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

ASGeek2012

Colonel
33 Badges
Dec 21, 2019
877
2.087
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Nemesis
  • Crusader Kings III
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Cities: Skylines - Campus
  • Stellaris: Megacorp
  • Cities: Skylines Industries
  • Europa Universalis IV: Dharma
  • Stellaris: Distant Stars
  • Cities: Skylines - Parklife
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Cities: Skylines - Green Cities
  • Europa Universalis IV
  • Cities: Skylines - Mass Transit
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Rights of Man
  • Stellaris
  • Europa Universalis IV: Mare Nostrum
  • Cities: Skylines - Snowfall
  • Cities: Skylines
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Wealth of Nations
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Synthetic Dawn
This is a minor nit, really, but I'm very curious. It's my understanding that CS uses the Unity engine. I have about a dozen other Unity-based games. Every single one of them, when I choose the option to exit the game, BAM I'm on the desktop in less than a second. What exactly is CS doing when it exits?
 
  • 1Like
Reactions:

Lucododosor

hopeful pessimist
Moderator
44 Badges
Mar 10, 2020
1.122
1.772
  • Victoria 3 Sign Up
  • Cities: Skylines Deluxe Edition
  • Crusader Kings III
  • Europa Universalis IV
  • Surviving Mars: Digital Deluxe Edition
  • Crusader Kings II
Since I installed the game on a SSD it quits quite faster now, so it's probably memory related.
 

BoraBora

Corporal
May 30, 2015
36
45
There's a mod to exit to desktop (it kills the game), but I'd stay away from it as you don't want to corrupt any data. Like maybe your saved game and losing it forever.
This is an option in Game anarchy which has 150K subscribers. Most YTers use this option, including some of the top modders and map creators. So do you have some evidence of corrupted data and even worse of lost saved games?
 
  • 1
  • 1Like
Reactions:

MarkJohnson

Field Marshal
16 Badges
Feb 19, 2015
3.452
716
  • Cities in Motion 2
  • Europa Universalis IV
  • Cities: Skylines
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Stellaris
  • Cities: Skylines - Natural Disasters
  • Cities: Skylines - Mass Transit
  • Surviving Mars
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Cities: Skylines Industries
  • Prison Architect
  • Cities: Skylines - Campus
This is an option in Game anarchy which has 150K subscribers. Most YTers use this option, including some of the top modders and map creators. So do you have some evidence of corrupted data and even worse of lost saved games?

It's called common sense. The app kills the cities.exe process in Windows which kills anything the game is doing, immediately! It is basically turning off your pc while in the middle of gaming. If you just happen to be saving a game session when this happens, then you will lose your saved game forever. Just hope you have a backup.

But scour the forums if you need proof. There are tons of people who suddenly lose their saved games all of the time, or get simulation errors and the saved game won't load.

Heavily modded cities can take a long time to save, which is the reason that people use the exit to desktop type mods. You better make sure your saved game has completely completed, before using the feature, or you could be in for a headache. and you better make sure you make regular backups.

If you're luck, game anarchy may have a feature to monitor saving the game, so it won't happen. But there are other mods that may not have any safety features or the mod may be broken at update time and not work properly. But it's your game, not mine. You take whatever risk you want. Just know it does happen, and often.
 
  • 1
Reactions:

ASGeek2012

Colonel
33 Badges
Dec 21, 2019
877
2.087
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Nemesis
  • Crusader Kings III
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Cities: Skylines - Campus
  • Stellaris: Megacorp
  • Cities: Skylines Industries
  • Europa Universalis IV: Dharma
  • Stellaris: Distant Stars
  • Cities: Skylines - Parklife
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Cities: Skylines - Green Cities
  • Europa Universalis IV
  • Cities: Skylines - Mass Transit
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Rights of Man
  • Stellaris
  • Europa Universalis IV: Mare Nostrum
  • Cities: Skylines - Snowfall
  • Cities: Skylines
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Wealth of Nations
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Synthetic Dawn
It's called common sense. The app kills the cities.exe process in Windows which kills anything the game is doing, immediately! It is basically turning off your pc while in the middle of gaming. If you just happen to be saving a game session when this happens, then you will lose your saved game forever. Just hope you have a backup.
Except we're not talking about shutting down the program while the game is being saved, we're talking about exiting the game by specifically selecting the "exit to desktop" option. The game has already finished doing whatever disk activities it needs to do to save your game. Stop confusing the issue.
But scour the forums if you need proof. There are tons of people who suddenly lose their saved games all of the time, or get simulation errors and the saved game won't load.
Right, but not from exiting the game AFTER you've saved it, which is what we're talking about here.
 
  • 2Like
Reactions:

BoraBora

Corporal
May 30, 2015
36
45
It's called common sense.
No, it's called false logic passing for a fact and imagining a unsubstantiated cause to effect relationship. You can't quit the game while saving, mod or not, that's a fact. Yes, there is a lot of corrupted savegames and there's a lot of reasons for this. Corrupted data while downloading (Steam acting) or broken and/or incompatible mods. Bad habits allowed by the game, too, like double-loading (which the 81 tiles 2 mod prevents you to do) or disabling mods instead of unsubbing them (the Compatibility Report mod warns you not to do that). These are proved and well-known sources of corruption found by coders reading code, not based on the "common sense".

So to answer the original question: no, the game doesn't take so long to quit because you're saving a game. It takes the same time when you didn't save your game or did before. Use https://steamcommunity.com/sharedfiles/filedetails/?id=2781804786&searchtext=game+anarchy and activate the "fast return" option.
 
  • 1Like
Reactions:

MarkJohnson

Field Marshal
16 Badges
Feb 19, 2015
3.452
716
  • Cities in Motion 2
  • Europa Universalis IV
  • Cities: Skylines
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Stellaris
  • Cities: Skylines - Natural Disasters
  • Cities: Skylines - Mass Transit
  • Surviving Mars
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Cities: Skylines Industries
  • Prison Architect
  • Cities: Skylines - Campus
Mods work outside of the game, they can force close while saving. The advanced game anarchy may be able to keep it from happening from added coding, but it was added later.

Plus even the devs added a "save & Exit" option to the save menu for a reason. This should prevent it without hot-keying or task manager for quits. But like I said, it can still happen on update days. I'm sure extremely rare, but still possible.

The reason I know was because it happened to me when helping other users on saved games when I noticed it happen. Then I investigated and found that game anarchy and a mod named Exit to Desktop were installed and did exactly this. It didn't effect me any as it wasn't my city and I never overwrite saves in this situation. when helping out others.
 

Fox_NS_CAN

Field Marshal
1 Badges
Oct 26, 2016
2.834
656
  • Major Wiki Contributor
I have a shortcut:

C:\Windows\System32\taskkill.exe /IM Cities.exe /F

Exits fast.

I've never noticed any corrupted saves. I don't do it while saving. Haven't played much recently though.

I've often wondered why it takes so long to shut down.
 

Meesmoth

Philippine Cities Builder
Sep 21, 2016
686
89
meesmoth.fandom.com
Try viewing the output_log and scroll down all the way to the bottom after you exit the game. The game actually does something while exiting which is why it takes some time to simply exit to desktop. Some of the lines iirc were "Waiting for simulation to quit..." etc.

I use Game Anarchy and the "instant exit" feature is enabled by default, and cannot be disabled. I could easily see the difference on the output_log. The "instant exit" feature is basically the same as pressing "end task" on Task Manager.
 

Ragga Muffin

Captain
Dec 24, 2019
481
140
Its scrubbing its page file because game is a memory hog.
 

klopkr

Chief suggester at the suggestion factory
106 Badges
Aug 12, 2013
8.760
15.242
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Call to arms event
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • Crusader Kings II
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Together for Victory
  • Humble Paradox Bundle
  • Europa Universalis IV: Dharma
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings Complete
  • BATTLETECH
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Crusader Kings II: Holy Fury
  • Cities: Skylines - Green Cities
  • Europa Universalis IV: Rule Britannia
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis III Complete
  • Hearts of Iron IV: No Step Back
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings II: The Republic
  • Prison Architect
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV
  • Cities: Skylines - Parklife
  • Stellaris: Apocalypse
  • Europa Universalis III Complete
  • Stellaris: Distant Stars
  • Crusader Kings II: Conclave
  • Surviving Mars: First Colony Edition
  • The Showdown Effect
  • War of the Roses
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Mount & Blade: Warband
  • Crusader Kings II: Way of Life
  • Stellaris: Humanoids Species Pack
Ok but what is it actually doing???!?1!?!?! It's not saving. I already saved.

What is it actually doing while it quits and why would I or anyone care?

AFAIK it could be crypto minning during that whole minute because I can't find what it actually does.
 

MarkJohnson

Field Marshal
16 Badges
Feb 19, 2015
3.452
716
  • Cities in Motion 2
  • Europa Universalis IV
  • Cities: Skylines
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Stellaris
  • Cities: Skylines - Natural Disasters
  • Cities: Skylines - Mass Transit
  • Surviving Mars
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Cities: Skylines Industries
  • Prison Architect
  • Cities: Skylines - Campus
I just tested on my new lowly Intel i3-12100 cpu with 16gb RAM and iGPU and it takes 11 seconds to exit the game on a moderately sized city. I think I have 7-10 mods..

I'm sure it is purely a workshop issues. Each mod has data files and logs to be maintained along with unity, steam files as well. But I would wager 99% is purely workshop related. As usual.

Helping out other users, I run into a lot of 100+ mods in their cities, Rarely below 50. lol

I get the feeling most people only play this game so they can use a gazillion workshop and try to see if they can kill windows or the game. lol

What are your normal exit to desktop times?
 

ASGeek2012

Colonel
33 Badges
Dec 21, 2019
877
2.087
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Nemesis
  • Crusader Kings III
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Cities: Skylines - Campus
  • Stellaris: Megacorp
  • Cities: Skylines Industries
  • Europa Universalis IV: Dharma
  • Stellaris: Distant Stars
  • Cities: Skylines - Parklife
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Cities: Skylines - Green Cities
  • Europa Universalis IV
  • Cities: Skylines - Mass Transit
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Rights of Man
  • Stellaris
  • Europa Universalis IV: Mare Nostrum
  • Cities: Skylines - Snowfall
  • Cities: Skylines
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Wealth of Nations
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Synthetic Dawn
I just tested on my new lowly Intel i3-12100 cpu with 16gb RAM and iGPU and it takes 11 seconds to exit the game on a moderately sized city. I think I have 7-10 mods..

I'm sure it is purely a workshop issues. Each mod has data files and logs to be maintained along with unity, steam files as well. But I would wager 99% is purely workshop related. As usual.

Helping out other users, I run into a lot of 100+ mods in their cities, Rarely below 50. lol

I get the feeling most people only play this game so they can use a gazillion workshop and try to see if they can kill windows or the game. lol

What are your normal exit to desktop times?
Mine takes about 15 to 20 seconds to exit.

Not sure I agree it's a workshop issue. Any data files that the mods are maintaining are likely manipulated when the game is saved or when you change a global option. The fact that people can use a mod to insta-close the game and not mess up anything else would seem to prove that whatever the game is doing is really unnecessary.
 

MarkJohnson

Field Marshal
16 Badges
Feb 19, 2015
3.452
716
  • Cities in Motion 2
  • Europa Universalis IV
  • Cities: Skylines
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Stellaris
  • Cities: Skylines - Natural Disasters
  • Cities: Skylines - Mass Transit
  • Surviving Mars
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Cities: Skylines Industries
  • Prison Architect
  • Cities: Skylines - Campus
Well, I help a lot of user to get their saved games working and I have worked on some highly modded saved games and it can take several minutes to over 10-minute to just exit the game. And don't forget the things windows needs to do as well.
 

Fox_NS_CAN

Field Marshal
1 Badges
Oct 26, 2016
2.834
656
  • Major Wiki Contributor
Took me 12 minutes to load my city (from the main menu).
Took 5 minutes to shut down (to desktop), but the laptop was not overly responsive for about another 3 minutes.
 
  • 1Like
  • 1
Reactions: