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

Changing window size with sandworm shimmer on screen crashes. #32

Closed
henricj opened this issue Jun 8, 2022 · 0 comments
Closed

Changing window size with sandworm shimmer on screen crashes. #32

henricj opened this issue Jun 8, 2022 · 0 comments

Comments

@henricj
Copy link
Owner

henricj commented Jun 8, 2022

Changing the window size when using the direct3d11 renderer causes a crash in the DX11 rendering code.

INFO    :   Switching to windowed mode.
'dunelegacy.exe' (Win32): Loaded 'C:\Windows\System32\TextShaping.dll'. Symbols loaded.
DXGI ERROR: IDXGISwapChain::ResizeBuffers: Swapchain cannot be resized unless all outstanding buffer references have been released. [ MISCELLANEOUS ERROR #19: ]
DXGI ERROR: IDXGISwapChain::ResizeBuffers: Swapchain cannot be resized unless all outstanding buffer references have been released. [ MISCELLANEOUS ERROR #19: ]
D3D11 CORRUPTION: ID3D11DeviceContext::ClearRenderTargetView: First parameter is corrupt or NULL. [ MISCELLANEOUS CORRUPTION #13: CORRUPTED_PARAMETER1]
Exception thrown at 0x00007FF9C7CE474C (KernelBase.dll) in dunelegacy.exe: 0x0000087D (parameters: 0x0000000000000000, 0x00000043C697FC40, 0x00000043C697FC60).

Stack trace:

KernelBase.dll!RaiseException()
d3d11_3SDKLayers.dll!ReportCorruption(unsigned int,enum D3D11_MESSAGE_ID,char const *,...)
d3d11_3SDKLayers.dll!NDebug::CInterfaceSentinel::CFunctionSentinel::ReportMessageAndRaiseException(enum D3D11_MESSAGE_ID,char const *,...)
d3d11_3SDKLayers.dll!NDebug::CContext::ClearRenderTargetView(struct ID3D11RenderTargetView *,float const * const)
SDL2d.dll!D3D11_RunCommandQueue(SDL_Renderer * renderer=0x000011cddbaa5480, SDL_RenderCommand * cmd=0x000011a7dbaf5cd0, void * vertices=0x0000121fe6361800, unsigned __int64 vertsize=0x0000000000000000) Line 2113
	at C:\src\game\dunelegacy\external\vcpkg\vcpkg\buildtrees\sdl2\src\e268dc78a1-c01e78abe3.clean\src\render\direct3d11\SDL_render_d3d11.c(2113)
SDL2d.dll!FlushRenderCommands(SDL_Renderer * renderer=0x000011cddbaa5480) Line 244
	at C:\src\game\dunelegacy\external\vcpkg\vcpkg\buildtrees\sdl2\src\e268dc78a1-c01e78abe3.clean\src\render\SDL_render.c(244)
SDL2d.dll!SDL_RenderPresent(SDL_Renderer * renderer=0x000011cddbaa5480) Line 4236
	at C:\src\game\dunelegacy\external\vcpkg\vcpkg\buildtrees\sdl2\src\e268dc78a1-c01e78abe3.clean\src\render\SDL_render.c(4236)
dunelegacy.exe!updateFullscreen() Line 316
	at C:\src\game\dunelegacy\src\main.cpp(316)
dunelegacy.exe!Game::runMainLoop(const GameContext & context={...}, std::function<void __cdecl(SDL_Event const &)> handler={...}) Line 1396
	at C:\src\game\dunelegacy\src\Game.cpp(1396)
dunelegacy.exe!startSinglePlayerGame(const GameInitSettings & init={...}, std::function<void __cdecl(SDL_Event const &)> handler={...}) Line 671
	at C:\src\game\dunelegacy\src\sand.cpp(671)
dunelegacy.exe!SinglePlayerMenu::onChildWindowClose(Window * pChildWindow=0x000011e3dbaeb100) Line 168
	at C:\src\game\dunelegacy\src\Menu\SinglePlayerMenu.cpp(168)
dunelegacy.exe!Window::processChildWindowOpenCloses() Line 83
	at C:\src\game\dunelegacy\src\GUI\Window.cpp(83)
dunelegacy.exe!Window::handleInput(const SDL_Event & event={...}) Line 121
	at C:\src\game\dunelegacy\src\GUI\Window.cpp(121)
dunelegacy.exe!MenuBase::doInput(const SDL_Event & event={...}) Line 211
	at C:\src\game\dunelegacy\src\Menu\MenuBase.cpp(211)
dunelegacy.exe!MenuBase::doEventsUntil(std::chrono::time_point<std::chrono::steady_clock,std::chrono::duration<__int64,std::ratio<1,1000000000>>> until={...}) Line 62
	at C:\src\game\dunelegacy\src\Menu\MenuBase.cpp(62)
dunelegacy.exe!MenuBase::showMenuImpl() Line 119
	at C:\src\game\dunelegacy\src\Menu\MenuBase.cpp(119)
dunelegacy.exe!MenuBase::showMenu(std::function<void __cdecl(SDL_Event const &)> handler={...}) Line 75
	at C:\src\game\dunelegacy\src\Menu\MenuBase.cpp(75)
dunelegacy.exe!MainMenu::onSinglePlayer() Line 131
	at C:\src\game\dunelegacy\src\Menu\MainMenu.cpp(131)
dunelegacy.exe!`MainMenu::MainMenu'::`2'::<lambda_1>::operator()() Line 65
	at C:\src\game\dunelegacy\src\Menu\MainMenu.cpp(65)
dunelegacy.exe!std::invoke<`MainMenu::MainMenu'::`2'::<lambda_1> &>(MainMenu::{ctor}::__l2::<lambda_1> & _Obj={...}) Line 1479
	at C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.32.31326\include\type_traits(1479)
dunelegacy.exe!std::_Invoker_ret<void,1>::_Call<`MainMenu::MainMenu'::`2'::<lambda_1> &>(MainMenu::{ctor}::__l2::<lambda_1> & _Func={...}) Line 665
	at C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.32.31326\include\functional(665)
dunelegacy.exe!std::_Func_impl_no_alloc<`MainMenu::MainMenu'::`2'::<lambda_1>,void>::_Do_call() Line 834
	at C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.32.31326\include\functional(834)
dunelegacy.exe!std::_Func_class<void>::operator()() Line 881
	at C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.32.31326\include\functional(881)
dunelegacy.exe!Button::handleMouseLeft(int x=0x0000005a, int y=0x00000008, bool pressed=false) Line 86
	at C:\src\game\dunelegacy\src\GUI\Button.cpp(86)
dunelegacy.exe!Container<VBox_WidgetData>::handleMouseLeft(int x=0x0000005a, int y=0x00000008, bool pressed=false) Line 107
	at C:\src\game\dunelegacy\include\GUI\Container.h(107)
dunelegacy.exe!Container<StaticContainer_WidgetData>::handleMouseLeft(int x=0x00000172, int y=0x00000138, bool pressed=false) Line 107
	at C:\src\game\dunelegacy\include\GUI\Container.h(107)
dunelegacy.exe!Window::handleMouseLeft(int x=0x00000172, int y=0x00000138, bool pressed=false) Line 229
	at C:\src\game\dunelegacy\src\GUI\Window.cpp(229)
dunelegacy.exe!Window::handleInput(const SDL_Event & event={...}) Line 166
	at C:\src\game\dunelegacy\src\GUI\Window.cpp(166)
dunelegacy.exe!MenuBase::doInput(const SDL_Event & event={...}) Line 211
	at C:\src\game\dunelegacy\src\Menu\MenuBase.cpp(211)
dunelegacy.exe!MenuBase::doEventsUntil(std::chrono::time_point<std::chrono::steady_clock,std::chrono::duration<__int64,std::ratio<1,1000000000>>> until={...}) Line 62
	at C:\src\game\dunelegacy\src\Menu\MenuBase.cpp(62)
dunelegacy.exe!MenuBase::showMenuImpl() Line 119
	at C:\src\game\dunelegacy\src\Menu\MenuBase.cpp(119)
dunelegacy.exe!MainMenu::showMenuImpl() Line 127
	at C:\src\game\dunelegacy\src\Menu\MainMenu.cpp(127)
dunelegacy.exe!MenuBase::showMenu(std::function<void __cdecl(SDL_Event const &)> handler={...}) Line 75
	at C:\src\game\dunelegacy\src\Menu\MenuBase.cpp(75)
dunelegacy.exe!run_game(int argc=0x00000001, char * * argv=0x000011a3dbaa09b0) Line 885
	at C:\src\game\dunelegacy\src\main.cpp(885)
dunelegacy.exe!SDL_main(int argc=0x00000001, char * * argv=0x000011a3dbaa09b0) Line 1032
	at C:\src\game\dunelegacy\src\main.cpp(1032)
dunelegacy.exe!main_getcmdline() Line 82
	at C:\src\game\dunelegacy\external\vcpkg\vcpkg\buildtrees\sdl2\src\e268dc78a1-c01e78abe3.clean\src\main\windows\SDL_windows_main.c(82)
dunelegacy.exe!WinMain(HINSTANCE__ * hInst=0x00007ff624410000, HINSTANCE__ * hPrev=0x0000000000000000, char * szCmdLine=0x0000019fda0392ed, int sw=0x0000000a) Line 115
	at C:\src\game\dunelegacy\external\vcpkg\vcpkg\buildtrees\sdl2\src\e268dc78a1-c01e78abe3.clean\src\main\windows\SDL_windows_main.c(115)
dunelegacy.exe!invoke_main() Line 107
	at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl(107)
dunelegacy.exe!__scrt_common_main_seh() Line 288
	at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl(288)
dunelegacy.exe!__scrt_common_main() Line 331
	at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl(331)
dunelegacy.exe!WinMainCRTStartup(void * __formal=0x00000043c6b33000) Line 17
	at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_winmain.cpp(17)
kernel32.dll!BaseThreadInitThunk()
ntdll.dll!RtlUserThreadStart()
henricj added a commit that referenced this issue Jun 8, 2022
This is much faster since it doesn't force the renderer queue to be flushed
and it has the additional advantage of not crashing.

It would probably look better if our ObjPic_SandwormSegment did not
have a ring around it.

Issue #32
@henricj henricj closed this as completed Jun 8, 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

No branches or pull requests

1 participant