| Summary: | Initializing Video produces unnecessary errors | ||
|---|---|---|---|
| Product: | SDL | Reporter: | hiduei |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | kronikarz |
| Version: | 2.0.1 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: | The errors produced by SDL_Init(SDL_INIT_VIDEO) | ||
Marking a large number of bugs with the "triage-2.0.4" keyword at once. Sorry if you got a lot of email from this. This is to help me sort through some bugs in regards to a 2.0.4 release. We may or may not fix this bug for 2.0.4, though! (sorry if you get a lot of copies of this email, I'm marking several bugs at once) Marking bugs for the (mostly) final 2.0.4 TODO list. This means we're hoping to resolve this bug before 2.0.4 ships if possible. In a perfect world, the open bug count with the target-2.0.4 keyword is zero when we ship. (Note that closing a bug report as WONTFIX, INVALID or WORKSFORME might still happen.) --ryan. Fixed, thanks! https://hg.libsdl.org/SDL/rev/b0f63fe6e012 Can you please explain the reasoning behind the fix? Particularly, why would a function call SDL_SetError log a "Debug" message instead of an "Error" message? As far as I see, there are as many internal calls to SDL_LogError as there are to SDL_SetError, with no discernible difference in usage. Is there a guideline as to which function should be called in what situation? In my opinion, the proper way to fix this problem would be to not set an error when SDL_LoadFunction does not find the function, especially since it's called internally many times and the result is checked for being null. If SDL uses it as a method to check whether a function in a SO exists, then the function not existing should not be an ERROR, but one potentially expected behavior. Of course, there could be other potential faulty results, but since there is no way of determining whether a function exists in a SO, usage of this function in such a way should not be punished with an error, IMHO. A potential other resolution would be to split SDL_LoadFunction into SDL_LoadFunction and SDL_FunctionExists or something similarly named. |
Created attachment 1410 [details] The errors produced by SDL_Init(SDL_INIT_VIDEO) Overview: Initializing the Video Subsystem causes many errors though everything works as it should. Steps to Reproduce: 1) Set Loglevel to SDL_LOG_PRIORITY_ERROR 2) Initialize the Video Subsystem (SDL_Init(SDL_INIT_VIDEO)) Actual Results: Many errors (see attachment) are printed on stderr, then the application continues as expected. Expected Results: The errors should have been warnings at most. Build Date & Hardware: SDL 2.0.1 on ArchLinux (kernel 3.11.6 & 3.12.6), xorg-server 1.14.4