-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Lagging to show on taskbar (Windows 7) #69
Comments
ATI Radeon HD4870, Intel Core2Duo E8400, Windows 7 (32-bit) here. So this might be related to Win7 64-bit or something's up with the Debug build, or it's something entirely different. |
Thanks for testing. Yes, it starts instantly, but it shows up on the taskbar 3 seconds later slowing down the whole taskbar. I don't use debug release. I do use static dll's. |
I can reproduce that problem. I use the 2.0 snapshot from yesterday and SFML is compiled by mingw as static library. EDIT: |
In the taskbar it shows up instantly for me as well. OK, maybe half a second, at the very max, but that might as well be the IDE starting it up. I also linked statically, although I am not using the latest build. The one I'm using should be about a month old. |
I tried old sfml source code from the beginning of the year and the same problem occurs. I really can't tell where these freezes are coming from.
Maybe I will try to compile it with MSVC. |
I do get this error when compiling (in VS2008): LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library Or is it something completely different? //damn i keep clicking close, sorry! |
I have the same problem since I can remember Windows 7 x64, HD4850, MinGW. Windows XP seems to be affected too. |
On win7 I don't get an error, but on XP machines I do when I quit the sfml program. It says it did not work correct. Might this be connected to this problem? Running gDEBugger gives at exit an error: Second Chance Exception |
I think I got the reason of this all: src/SFML/Window/Win32/WindowImplWin32.cpp Of course sfml filters the messages with myHandle, so that you only get the messages from the target window. So if I replace myHandle with NULL this particular message is dispatched and there is no taskbar freeze anymore. This is obviously no fix since it breaks the logic of handling events for multiple different windows. I don't know where this message is coming from and why only some people got a problem with that but I'm sure it's the source of this freeze. EDIT: Here is a kind of a fix in the event loop, that works on my system, please have a look and try it: |
This bug is breaking other Windows applications. I know of at least one installer that calls SendMessage() with HWND_BROADCAST using a perfectly legit Windows system message that never finishes on some computers. Make this a priority fix. You can't call PeekMessage() in this fashion and expect it to actually work. The returned 'message' structure from PeekMessage() contains a valid HWND with one exception (thread messages vs. window messages). Calling the function with NULL and then processing the message using the returned handle is the correct approach. But then you might as well do it right and call GetMessage() on Windows. |
On windows 7 (64bit) with ati hd4870 and intel duo core e8400 a SFML2.0 program that uses OpenGL takes 3 seconds or longer before showing up on the taskbar. This lagging is annoying because it also slows down the switching to other programs. For clarity, the programs starts quick, but showing up on the taskbar takes very long. Also when I try to recompile my program after a small change, it takes over 3 seconds before the program is not being used any more and I can recompile.
This lag happens also with the examples shader and window, but not with win32.
The lagging, for as far I tested, does not happen on Vista.
I made a small video of it: http://www.sfmluploads.org/index.php?page=view_file&file_id=31
The text was updated successfully, but these errors were encountered: