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

Hot reload crashes with error too many threads #717

Closed
kianzarrin opened this issue Feb 19, 2020 · 12 comments
Closed

Hot reload crashes with error too many threads #717

kianzarrin opened this issue Feb 19, 2020 · 12 comments
Labels
BUG Defect detected low priority Issue with low priority of work
Milestone

Comments

@kianzarrin
Copy link
Collaborator

kianzarrin commented Feb 19, 2020

When I hot reload a lot I get error "too many threads" and then the game crashes.

my memory is vague. I don't remember if I was swapping the DLL while the previous one was being loaded.

This doesn't happen too often though.

might be related to https://github.com/CitiesSkylinesMods/TMPE/pull/640/files/5a3ef25473a3696012317422aafbbd4e3bad59c2#r375479944 and #640 (comment)

we need to check stack trace and look for thread leak.

unloading DLL only calls OnDisable. It does not call the OnRelease() of loading extension. What does it do to threading extension? In any case the OnRelease() override of our threading extension is empty so I am not sure if that makes a difference. I thinl the game no longer calls overrides from old threading extension DLL ... I hope.

EDIT:
Fixing this is not so important in itself but it might help us improve our code and hunt down some other hidden bugs.

@kianzarrin kianzarrin added BUG Defect detected low priority Issue with low priority of work triage Awaiting issue categorisation labels Feb 19, 2020
@kianzarrin
Copy link
Collaborator Author

setting this to low priority because it does not happen often and its only a dev thing.

Investigating this might help us reduce our resource leak (or is it called thread leak ?) when loading another game or when quieting to main menu.

@originalfoo
Copy link
Member

The game itself mem leaks when quitting to main menu because it doesn't acutally unload the previous scene.

@krzychu124
Copy link
Member

The game itself mem leaks when quitting to main menu because it doesn't acutally unload the previous scene.

What do you mean by that?

@originalfoo
Copy link
Member

Can't remember who said it, one of the Paradox people I think; that the game doesn't properly unload the previous scene when exiting to main menu.

@originalfoo originalfoo removed the triage Awaiting issue categorisation label Feb 20, 2020
@originalfoo
Copy link
Member

Was this issue caused by double-reload problem described in #718 (comment) ?

@kianzarrin
Copy link
Collaborator Author

I Do not know @aubergine10 . Its not all that easy to reproduce. I shall see. I totally forgot to add crash log. I will add logs if/when it happens next.

@originalfoo
Copy link
Member

were those the crash logs in the PR that just got merged? #725

@kianzarrin
Copy link
Collaborator Author

kianzarrin commented Feb 22, 2020

@aubergine10 not sure which crash logs are you talking about but the logs in #725 were not crash logs. they were success logs.

I haven't got a crash log yet.

EDIT: and if I did I will post it to here and not a PR

@kianzarrin
Copy link
Collaborator Author

related #730 (comment)

@kianzarrin
Copy link
Collaborator Author

I closed this because I have not observed this since I have fixed the Double hot reload issue.

@originalfoo
Copy link
Member

@kianzarrin do you remember the issue/pr number where that change was made (just so the tickets can be linked). There are several issues mentioned above, was it one of those?

@kianzarrin
Copy link
Collaborator Author

#725 was the PR that seems to have fixed this issue.

@originalfoo originalfoo added this to the 11.1.1 milestone Apr 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Defect detected low priority Issue with low priority of work
Projects
None yet
Development

No branches or pull requests

3 participants