While working on a project, SDL_CreateRenderer suddenly stopped working. This is mostly odd because I wasn't working on any parts that interact with it and furthermore the failing line of code is well before any of my edits. Specifically I'm getting an unhanded exception:
Unhanded exception at 0x779EDF96 (ntdll.dll) in AloeFoil00.exe: 0xC00000FD: Stack overflow (parameters: 0x00000001, 0x00292F60). occurred
Occurring at:
m_Renderer = SDL_CreateRenderer(window->getWindow(), -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
SDL_Window is not NULL and is being passed fine. I apologize if this comes off a vague but it's a mystery to me as to why it has stopped working when I have made no alterations to any code that should affect this piece of code.
EDIT: Here is the Call Stack. I don't know if there is a better method for copying and posting it.
shell32.dll!__alloca_probe() Unknown Non-user code. Symbols loaded. shell32.dll!kfapi::CFolderPathResolver::GetPath(struct _GUID const &,unsigned long,class kfapi::CFolderDefinitionCache *,void *,class kfapi::string *) Unknown Non-user code. Symbols loaded. shell32.dll!kfapi::CFolderCache::GetPath(struct _GUID const &,void *,unsigned long,class kfapi::string *) Unknown Non-user code. Symbols loaded. shell32.dll!kfapi::CKFFacade::GetFolderPath(struct _GUID const &,unsigned long,void *,unsigned short * *) Unknown Non-user code. Symbols loaded. shell32.dll!_SHGetKnownFolderPath_Internal@16() Unknown Non-user code. Symbols loaded. shell32.dll!_SHGetFolderPathEx@20() Unknown Non-user code. Symbols loaded. shell32.dll!_SHGetFolderPathW@20() Unknown Non-user code. Symbols loaded. nvd3dum.dll!551d25ce() Unknown Non-user code. Cannot find or open the PDB file. [Frames below may be incorrect and/or missing, no symbols loaded for nvd3dum.dll] Annotated Frame [External Code] Annotated Frame SDL2.dll!6c7fb4ad() Unknown No symbols loaded. SDL2.dll!6c778f49() Unknown No symbols loaded. SDL2.dll!6c79ee79() Unknown No symbols loaded. SDL2.dll!6c76fb4d() Unknown No symbols loaded.
AloeFoil00.exe!Renderer::Renderer(Window * window) Line 7 C++ Symbols loaded. AloeFoil00.exe!SDL_main(int argc, char * * args) Line 36 C++ Symbols loaded. AloeFoil00.exe!main_getcmdline() Line 161 C Symbols loaded. [External Code] Annotated Frame
Edit: I've made some progress but I don't understand what is exactly happening. Trying to be brief, this is a experimental sandbox program and I have a few unused classes (total of 5). I've figured out that commenting out some classes (all of which occur after the window and renderer classes) causes the program to work. That is to say, no singular class is the culprit but some pattern of them. They do all #pragma once.
I'd like to improve the title but I'm not exactly sure what the problem is. My guess is that its related to some programming principle that I'm not intimate with related to the size of the classes I've initialized.
Here's a link to a github (https://github.com/TorsvikVonClemson/AloeFoil00) source for reference if anyone has a better understanding to my problem. The trouble classes are initialized in main.cpp lines 61-65:
SheetTest sheetTest(SCREEN_WIDTH,SCREEN_HEIGHT);
MapTest mapTest(SCREEN_WIDTH, SCREEN_HEIGHT);
Hosono hosono(SCREEN_WIDTH, SCREEN_HEIGHT);
Hexagon hexTest(SCREEN_WIDTH, SCREEN_HEIGHT,&window,&renderer);
Debug debug(SCREEN_WIDTH, SCREEN_HEIGHT, &window, &renderer,&native,&text);
I would also like help understanding how classes that were yet to be initialized could be effecting the initialization of classes above them.
User contributions licensed under CC BY-SA 3.0