Skip to content

Crash fixes and general stability improvements#123

Merged
RobbeBryssinck merged 11 commits into
masterfrom
stability
Apr 19, 2022
Merged

Crash fixes and general stability improvements#123
RobbeBryssinck merged 11 commits into
masterfrom
stability

Conversation

@RobbeBryssinck

Copy link
Copy Markdown
Member

Contains a bunch of fixes, some more questionable than others. The d3d11 check was removed because it was causing issues on amd gpus. Weapon draw state has been finalized. Unpaused some more menus.

Lastly, fixed a bug where the game would freeze when trying to loot worn items from a dead body. As you can see in the code, this fix in particular is quite questionable. The in game RemoveItem() function will lock the given ExtraDataList, and will only unlock that list when the hook returns. The thing is, we need to access the contents of that list, and therefore acquire a lock, but this obviously deadlocks. We can't "queue" the operation until later, since the lifetime of said ExtraDataList is not that long. The dirty fix I put in was not trying to acquire a lock in this particular hook through ScopedExtraDataOverride. If anyone has a better solution, I'd love to hear it.

Comment thread Code/client/TiltedOnlineApp.cpp Outdated
create_directory(logPath, ec);

auto rotatingLogger = std::make_shared<spdlog::sinks::rotating_file_sink_mt>(logPath / "tp_client.log", 1048576 * 5, 3);
rotatingLogger->set_level(spdlog::level::debug);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this off for stable builds?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rotatinglogger logs to file, not the console. I didn't fully complete it in this PR, but the goal is to somehow send these logs to Sentry on crash, if that's somehow possible.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take a look at the sentry native documentation, it allows you to attach other files to crashes :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that'd be perfect, I'll do that in a follow up PR then 👍

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be info at most in stable yea, apart from that I see no problem

@RobbeBryssinck RobbeBryssinck merged commit 6c19df0 into master Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants