| Summary: | Unresponsive Window on MinGW-W64 build | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Nathaniel Fries <nafiepoo> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P2 | CC: | bugzilla-sdl, gabomdq |
| Version: | HG 2.1 | ||
| Hardware: | x86 | ||
| OS: | Windows 7 | ||
| Attachments: |
test program
now calling SDL_PeepEvents in a loop |
||
The problem is related to your loop. You only pull one event (out of possibly hundreds) from the queue every iteration (which includes console output, rendering and a delay every single time). Once the event queue is full the window cannot accept new events anymore and starts to "hang" which is Windows' way of saying "hey, that program cannot cope with the events I'm trying to send". You should put the event processing into yet another loop and do the rendering after the queue was emptied or you've at least processed a decent number of events. This is not an issue with SDL. I agree. Marking as invalid, if you fix the test case according to Andreas comments and you still get unresponsiveness, feel free to re open. Created attachment 1563 [details]
now calling SDL_PeepEvents in a loop
Lost my comment there. I fixed the loop as suggested, removed the printing (it didnt identify the problem), still experiencing the hung app window. It takes a delay of 5 seconds to cause Windows to recognize an app window as hung. Your explanations could not have caused the hung app window status ["(Not Responding)" in title bar] to begin with. It doesn't seem to respond to input at all. Ok, thanks for the update. I'm reopening the ticket. You're also lacking a call to SDL_PumpEvents() before your loop. See last sentence in the remarks section of: http://wiki.libsdl.org/SDL_PumpEvents There's also a vague mention of this in http://wiki.libsdl.org/SDL_PeepEvents Without this call (which is not implied using SDL_PeepEvents) messages do not get removed from the window's message queue (not to be confused with the queue SDL has). An alternative if you do not need the advanced functionality would be using SDL_PollEvent() instead. Been using Windows API directly instead of SDL for too long. Sorry about the non-bug report. No worries :) |
Created attachment 1555 [details] test program I'm trying to use SDL built with MinGW-W64 using MSys, but the window is unresponsive. My very simple test program is included. The window is unresponsive, but the loop continues to run, as text continues to be added in the console window.