DRMBackend: fix crash when GetBackendFb() returns nullptr#2045
Closed
matte-schwartz wants to merge 1 commit intoValveSoftware:masterfrom
Closed
DRMBackend: fix crash when GetBackendFb() returns nullptr#2045matte-schwartz wants to merge 1 commit intoValveSoftware:masterfrom
matte-schwartz wants to merge 1 commit intoValveSoftware:masterfrom
Conversation
GetBackendFb() can potentially return nullptr, which now will crash here after the deferred backend was added. ``` 0x000056303499e23d in drm_prepare_liftoff (drm=0x563034d99c20 <g_DRM>, frameInfo=0x7ff0ae8d9210, needs_modeset=false) at ../src/Backends/DRMBackend.cpp:2564 0x00005630349a077d in drm_prepare (drm=0x563034d99c20 <g_DRM>, async=false, frameInfo=0x7ff0ae8d9210) at ../src/Backends/DRMBackend.cpp:3026 0x00005630349a872b in gamescope::CDRMBackend::Present (this=0x56305b944480, pFrameInfo=0x7ff0ae8d9210, bAsync=false) at ../src/Backends/DRMBackend.cpp:3488 0x00005630349a18bc in HackyDRMPresent (pFrameInfo=0x7ff0ae8d9210, bAsync=false) at ../src/Backends/DRMBackend.cpp:4013 0x000056303499c0a3 in gamescope::CDRMConnector::Present (this=0x56305b9894d0, pFrameInfo=0x7ff0ae8d9210, bAsync=false) at ../src/Backends/DRMBackend.cpp:2167 0x00005630348459bd in paint_all (pFocus=0x7ff0a85806a0, async=false) at ../src/steamcompmgr.cpp:2816 0x000056303485bd14 in steamcompmgr_main (argc=16, argv=0x7fff56880e98) at ../src/steamcompmgr.cpp:8922 0x00005630348b5b72 in steamCompMgrThreadRun (argc=16, argv=0x7fff56880e98) at ../src/main.cpp:1061 0x00005630348b6ad4 in std::__invoke_impl<void, void (*)(int, char**), int, char**> (__f=@0x56305bb22898: 0x5630348b5b38 <steamCompMgrThreadRun(int, char**)>) at /usr/include/c++/15.2.1/bits/invoke.h:63 0x00005630348b6a3c in std::__invoke<void (*)(int, char**), int, char**> (__fn=@0x56305bb22898: 0x5630348b5b38 <steamCompMgrThreadRun(int, char**)>) at /usr/include/c++/15.2.1/bits/invoke.h:98 0x00005630348b6989 in std::thread::_Invoker<std::tuple<void (*)(int, char**), int, char**> >::_M_invoke<0ul, 1ul, 2ul> (this=0x56305bb22888) at /usr/include/c++/15.2.1/bits/std_thread.h:303 0x00005630348b6926 in std::thread::_Invoker<std::tuple<void (*)(int, char**), int, char**> >::operator() (this=0x56305bb22888) at /usr/include/c++/15.2.1/bits/std_thread.h:310 0x00005630348b690a in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)(int, char**), int, char**> > >::_M_run (this=0x56305bb22880) at /usr/include/c++/15.2.1/bits/std_thread.h:255 0x00007ff0bd3002f4 in std::execute_native_thread_routine (__p=0x56305bb22880) at /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:104 ``` Signed-off-by: Matthew Schwartz <matthew.schwartz@linux.dev>
Author
|
whoops, same as #2025 i see |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GetBackendFb() can potentially return nullptr, which now will crash here after the deferred backend was added.