Any info on this SDL_CreateWindow error on windows?

0

Using SDL to create window for rendering engine that uses Vulkan. Following this code. Following is the snippet of interest:

SDL_Init(SDL_INIT_VIDEO);

SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_VULKAN);

_window = SDL_CreateWindow(
    "Vulkan Engine",
    SDL_WINDOWPOS_UNDEFINED,
    SDL_WINDOWPOS_UNDEFINED,
    _windowExtent.width,
    _windowExtent.height,
    window_flags
);

I'm using Visual Studio 2019. Saw this error, built SDL from source as this answer suggested Vulkan flag may not have been enables in the posted binaries. Still, getting error on window creation. Line by line debugging points to this as the line where things break:

return CallWindowProc(data->wndproc, hwnd, msg, wParam, lParam);

in SDL_windowsevents.c.

Exception:

Exception thrown at 0x00007FFF584A4F8E (ntdll.dll) in GraphicsModel.exe: 0xC00000FD: Stack 
overflow (parameters: 0x0000000000000001, 0x000000ED25003FB8).
Unhandled exception at 0x00007FFF584A4F8E (ntdll.dll) in GraphicsModel.exe: 0xC000041D: An unhandled exception was encountered during a user callback.

Let me know if I should paste the full stacktrace. Can't figure out what's the cause, any help would be great!

Edit: Callstack (confirms infinite recursion)

    ntdll.dll!00007ffb84e44f8e()    Unknown
    user32.dll!00007ffb83345aa4()   Unknown
    user32.dll!00007ffb833458ee()   Unknown
    mfc140ud.dll!00007ffaf0091b05() Unknown
    user32.dll!00007ffb83345c1d()   Unknown
    user32.dll!00007ffb833458ee()   Unknown
    SDL2.dll!0000000075e4e7d0() Unknown
    user32.dll!00007ffb83345c1d()   Unknown
    user32.dll!00007ffb833458ee()   Unknown
    mfc140ud.dll!00007ffaf0091b05() Unknown
    user32.dll!00007ffb83345c1d()   Unknown
    user32.dll!00007ffb833458ee()   Unknown



    THIS BLOCK REPEATS 'n' times
    ---------------------------------------

    SDL2.dll!0000000075e4e7d0() Unknown
    user32.dll!00007ffb83345c1d()   Unknown
    user32.dll!00007ffb833458ee()   Unknown
    mfc140ud.dll!00007ffaf0091b05() Unknown
    user32.dll!00007ffb83345c1d()   Unknown
    user32.dll!00007ffb833458ee()   Unknown

    ---------------------------------------


    SDL2.dll!0000000075e4e7d0() Unknown
    user32.dll!00007ffb83345c1d()   Unknown
    user32.dll!00007ffb833457ec()   Unknown
    user32.dll!00007ffb83354432()   Unknown
>   ntdll.dll!00007ffb84ec0b04()    Unknown
    win32u.dll!00007ffb82ea1524()   Unknown
    SDL2.dll!0000000075e58ebe() Unknown
    SDL2.dll!0000000075e2172d() Unknown
    GraphicsModel.exe!VulkanEngine::init() Line 59  C++
    GraphicsModel.exe!CMainFrame::OnCreate(tagCREATESTRUCTW * lpCreateStruct) Line 67   C++
    [External Code] 
    GraphicsModel.exe!CGraphicsModelApp::InitInstance() Line 106    C++
    [External Code] 
    GraphicsModel.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpCmdLine, int nCmdShow) Line 26 C++
    [External Code] 
c++
visual-studio
winapi
sdl
vulkan
asked on Stack Overflow Mar 18, 2021 by Abhineet Pandey • edited Mar 19, 2021 by Abhineet Pandey

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0