-
Notifications
You must be signed in to change notification settings - Fork 555
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
Stack Overflow on Win64 #79
Comments
Could be related to how |
I suppose this only happens with Win64? I don’t see this with Win32, Linux, or macOS. |
You may have to add something like this to the Win32 portion of the CMake exe line:
Not sure what a good value would be. |
The game does appear to use a surprising amount of stack. It's something that should be looked at. Currently, the VVVVVV/desktop_version/src/main.cpp Lines 94 to 103 in 8826f57
I assume this was done because these classes depend on some libraries already being initialized. Some other game objects are in the data section (outside of any function): VVVVVV/desktop_version/src/main.cpp Lines 32 to 35 in 8826f57
|
It's probably the array allocations you speak of later as there are no big stack allocations in the Perhaps the incredible amount of member fields used in these classes eventually add up too... It could probably help getting rid of these array allocations and simply create an |
I'd be up for one of two paths:
|
I'd say the latter is definitely the better option then, given that |
Right, it's basically just critical bugfixes and very minor accessibility features from here on out. (Maybe making controller support a little better too?) |
@flibitijibibo Yeah. Submitted an issue for that. #82 Including the built in SDL2 gamepad databaase and updating the button defs in Input.cpp may be all that's needed for updated support. I've been trying my hand locally but no luck as of yet. |
Just pushed a patch that moves the memory around quite a bit, does this still happen? |
You can use |
All that's being done now is waiting for the original author (or anyone who has had this problem happen to them before) to report back and say "Yes, this is fixed now" or "No, it's still a problem". |
The target for this repo is pre C++11 so you can't, no |
Honestly, at this point the issue should be more-or-less fixed. I'd check for myself, but getting a compiling environment set up on Windows is more annoying than it is on Linux, so I don't have the patience for it right now. (Also, I'd need to compile an initial commit build, check that it stack overflows, and if it doesn't figure out why, and then compile a latest commit build with the same settings. I predict I'll have trouble with the "get the initial commit to stack overflow" part in the first place.) I'd be very surprised if this was still a problem. |
Pretty much all the large variables are off the stack now - if someone on Win64 finds an overflow they can reopen this, otherwise I think this is covered. |
This code
SDL_SetWindowIcon(m_window, icon);
in Screen::Screen() line 65 causes stack overflow in SDL libraryException thrown at 0x00007FFCEFA0AF88 (SDL2.dll) in VVVVVV.exe: 0xC00000FD: Stack overflow (parameters: 0x0000000000000001, 0x000000D4F4613000).
Unhandled exception at 0x00007FFCEFA0AF88 (SDL2.dll) in VVVVVV.exe: 0xC00000FD: Stack overflow (parameters: 0x0000000000000001, 0x000000D4F4613000).
Commenting out the icon code makes the error go away and game launches perfectly fine. albeit, without icon on the window
Specs : Win 10 64-bit, running x64 Debug version of the game in Visual Studio with 64-bit SDL libraries provided by vcpkg
The text was updated successfully, but these errors were encountered: