| Summary: | SDL 2.05 fails timer init | ||
|---|---|---|---|
| Product: | SDL | Reporter: | mattreecebentley |
| Component: | timer | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | icculus |
| Version: | 2.0.5 | ||
| Hardware: | x86_64 | ||
| OS: | Windows 7 | ||
|
Description
mattreecebentley
2017-03-26 23:27:29 UTC
ps. Also could not run on MSVC2015. Can you call SDL_GetError() right after this fails and tell us what it reports? Thanks, --ryan. Freezes when it fails, so no opportunity to log error. Minimal test case is as follows - works on v2.04, not v2.05, at least on my machine:
#include <fstream> // log redirection
#include <iostream>
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
int main( int argc, char* args[] )
{
freopen("plf.log","w",stderr); //redirect std::clog and std::cerr to file
// Initialise SDL graphics and subsystems:
if (SDL_Init(SDL_INIT_VIDEO|SDL_INIT_EVENTS|SDL_INIT_TIMER) < 0)
{
std::clog << "SDL_Error: " << SDL_GetError();
}
std::cin.get();
return 0;
}
IDE is codelite, if that makes any difference.
(In reply to mattreecebentley from comment #3) > Freezes when it fails, so no opportunity to log error. Minimal test case is It freezes somewhere under SDL_Init()?! Is it possible for you to break in a debugger and see where it got hung up? I'll try to reproduce here, too. --ryan. Unfortunately it won't give me any info! current call stack location just resolves to a random memory address. Could be somewhere in the dll code rather than the user code. Unsure. ps. obviously the #include <SDL2/SDL_image.h> line is not needed. Oversight on my part. If you're trying to reproduce, here are the two mingw vers I've been using: https://nuwen.net/mingw.html (6.3 x64) http://tdm-gcc.tdragon.net/download (5.1 x64) Can confirm that executables built with 2.05 will run fine from command prompt or windows explorer - they just won't run within the codelite or MSVC IDE's. So, something to do with debug hooking? No idea. This is turning out to be a pretty mysterious bug. --ryan. Can confirm the MSVC2015 executables also run from the command line fine (but not from within IDE). Glad to hear it's being investigated :-) Hi there- just tried building under Codelite 10.7, mingw x64 v7.1 (nuwen builds) and it all worked fine with sdl 2.05. I've also tested under VCC and found that the crash occurring there was purely to do with the working directory being set incorrectly. I've re-tested with codelite mingw x64 6.3 (nuwen) and mingw x64 5.1 (TDM) and both still fail. So, the problem only occurs with those two GCC builds. Whether it occurs with earlier build versions I don't know. Thanks, Matt Hello, and sorry if you're getting dozens of copies of this message by email. We are closing out bugs that appear to be abandoned in some form. This can happen for lots of reasons: we couldn't reproduce it, conversation faded out, the bug was noted as fixed in a comment but we forgot to mark it resolved, the report is good but the fix is impractical, we fixed it a long time ago without realizing there was an associated report, etc. Individually, any of these bugs might have a better resolution (such as WONTFIX or WORKSFORME or INVALID) but we've added a new resolution of ABANDONED to make this easily searchable and make it clear that it's not necessarily unreasonable to revive a given bug report. So if this bug is still a going concern and you feel it should still be open: please feel free to reopen it! But unless you respond, we'd like to consider these bugs closed, as many of them are several years old and overwhelming our ability to prioritize recent issues. (please note that hundred of bug reports were sorted through here, so we apologize for any human error. Just reopen the bug in that case!) Thanks, --ryan. Appears to work in 2.08 Yay! :) --ryan. |