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

Prevent crash in _nvapi_disable_threaded_optimization when attached to renderdoc #85121

Merged
merged 1 commit into from Nov 21, 2023

Conversation

jsjtxietian
Copy link
Contributor

A workaround, should fix #84880 when nvidia_disable_threaded_optimization is disabled in project setting ( although the root cause is still not solved ) . And this change should probably be there at the first place, it will sightly increase start up time if the user did not want to disable nv's optimization, it's a double win anyway.

cc @EIREXE You might want to take a look.

@akien-mga
Copy link
Member

I'd suggest doing the change from #85012 in this commit, so we reduce the PR backlog a bit.

Copy link
Member

@bruvzg bruvzg left a comment

Choose a reason for hiding this comment

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

With this change, in case the project was started at least once with nvidia_disable_threaded_optimization enabled, unchecking it later probably would not work since profile is already exist and set to disable optimization.

@bruvzg
Copy link
Member

bruvzg commented Nov 20, 2023

Is it crashing in the NvAPI_DRS_CreateSession, or NvAPI_DRS_CreateSession is overridden by RenderDoc and is null? Maybe it's enough to add check if NVAPI function pointers are valid.

@jsjtxietian
Copy link
Contributor Author

jsjtxietian commented Nov 20, 2023

Is it crashing in the NvAPI_DRS_CreateSession, or NvAPI_DRS_CreateSession is overridden by RenderDoc and is null?

You are right, the NvAPI_DRS_CreateSession is overridden by RenderDoc and is null. Thanks!

@jsjtxietian jsjtxietian changed the title Return early in _nvapi_disable_threaded_optimization to avoid crash after renderdoc attach Prevent crash in _nvapi_disable_threaded_optimization when attached to renderdoc Nov 20, 2023
@EIREXE
Copy link
Contributor

EIREXE commented Nov 21, 2023

lgtmi

@akien-mga akien-mga modified the milestones: 4.3, 4.2 Nov 21, 2023
@akien-mga akien-mga added the cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release label Nov 21, 2023
@akien-mga akien-mga merged commit b5779cc into godotengine:master Nov 21, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@jsjtxietian jsjtxietian deleted the return-early-nv branch November 21, 2023 11:11
@akien-mga akien-mga changed the title Prevent crash in _nvapi_disable_threaded_optimization when attached to renderdoc Prevent crash in _nvapi_disable_threaded_optimization when attached to renderdoc Nov 24, 2023
@YuriSizov
Copy link
Contributor

Cherry-picked for 4.1.4.

@YuriSizov YuriSizov removed the cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release label Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't use renderdoc to launch compatibility godot project
6 participants