libsdl-org / SDL

Simple Directmedia Layer
https://libsdl.org
zlib License
8.69k stars 1.63k forks source link

[uwp] testoffscreen segfault at start-up #7632

Open madebr opened 1 year ago

madebr commented 1 year ago

Output:

Exception thrown: read access violation.
**WINRT_GlobalSwapChainBackgroundPanelNative** was nullptr.

Call stack:

>   SDL3.dll!D3D11_CreateSwapChain(SDL_Renderer * renderer, int w, int h) Line 799  C
    SDL3.dll!D3D11_CreateWindowSizeDependentResources(SDL_Renderer * renderer) Line 934 C
    SDL3.dll!D3D11_CreateRenderer(SDL_Window * window, unsigned int flags) Line 2374    C
    SDL3.dll!SDL_CreateRenderer(SDL_Window * window, const char * name, unsigned int flags) Line 855    C
    testoffscreen.exe!SDL_main(int argc, char * * argv) Line 133    C
    SDL3.dll!SDL_WinRTApp::[Windows::ApplicationModel::Core::IFrameworkView]::Run() Line 352    C++
    [External Code] 

It's happening here: https://github.com/libsdl-org/SDL/blob/0467301baf57389d96fafbe169fb07f4c10169bc/src/render/direct3d11/SDL_render_d3d11.c#L799

testoffscreen.exe, built for "normal" Windows runs fine on this system.

slouken commented 7 months ago

Is this still happening?

madebr commented 7 months ago

Yes, with an identical stack:

>   SDL3.dll!D3D11_CreateSwapChain(SDL_Renderer * renderer, int w, int h) Line 816  C
    SDL3.dll!D3D11_CreateWindowSizeDependentResources(SDL_Renderer * renderer) Line 950 C
    SDL3.dll!D3D11_CreateRenderer(SDL_Window * window, unsigned int flags) Line 2481    C
    SDL3.dll!SDL_CreateRenderer(SDL_Window * window, const char * name, unsigned int flags) Line 865    C
    testoffscreen.exe!SDL_main(int argc, char * * argv) Line 133    C
    SDL3.dll!SDL_WinRTApp::[Windows::ApplicationModel::Core::IFrameworkView]::Run() Line 352    C++
    [External Code] 

Using a4c6b38fef2ff046e38072200b096c03389bfa28