Post Reply
fjoanis 2014-08-13 13:58
I'm programming a software which is taking a while to boot (1 min +).
During that time, Ultramon freezes.
The freeze happens right after we do
CreateWindowEx(...) AnimateWindow( s_splashHwnd, 200, AW_BLEND ); // Ultramon freeze until the loading is finished
If I remove the call to this line, Ultramon won't freeze, but I won't see my window.
|
Christian Studer 2014-08-14 01:22
Did UltraMon already add the window buttons to your application's window, but the buttons remain black until your application has finished initialization?
Christian Studer - www.realtimesoft.com
|
fjoanis 2014-08-14 05:21
The buttons does not seem to be added in my software. I see them in Perforce or Outlook, but not in my software, even when the load is finished and Ultramon becomes responsive again.
|
Christian Studer 2014-08-14 13:28
How does UltraMon freeze? Do the UltraMon window buttons for other applications no longer respond?
Christian Studer - www.realtimesoft.com
|
fjoanis 2014-08-15 05:36
When I try to click on any application in the Ultramon taskbar, windows says that the program is not responding. Any application which are in the windows taskbar continues to be clickable without issue. The applications on my secondary screens where Ultramon taskbar is used are still responsive, I can interact with them without issue, but when I click anywhere on the Ultramon taskbar, I get this not responding untill my software finish loading.
I also noticed yesterday that when my Visual Studio became unresponsive, Ultramon also gets unresponsive.
|
Christian Studer 2014-08-15 15:28
Looks like the Smart Taskbar, UltraMonTaskbar.exe, hangs for some reason, could you send me your application or a sample application which causes the issue for testing?
I tried to reproduce the problem on 64-bit Windows 7 with an application which has a lengthy loop in WM_CREATE, but so far haven't seen the issue. Testing was done with UltraMon 3.2.2.
Here's the sample code I used for testing:
LRESULT CALLBACK WndProcHangTbarTest(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg)
{
case WM_CLOSE:
PostQuitMessage(0);
return 0;
case WM_CREATE:
size_t a = 0;
for (size_t i = 0; i < 10000000000; ++i)
a = a + 1;
return 0;
}
return DefWindowProc(hWnd, uMsg, wParam, lParam);
}
void HangTbarTest()
{
WNDCLASSEX wndclass = { 0 };
wndclass.cbSize = sizeof(wndclass);
wndclass.lpszClassName = _T("HangTbarTest");
wndclass.lpfnWndProc = WndProcHangTbarTest;
wndclass.hbrBackground = static_cast(GetStockObject(WHITE_BRUSH));
wndclass.hCursor = LoadCursor(0, IDC_ARROW);
RegisterClassEx(&wndclass);
HWND wnd = CreateWindowEx(0, wndclass.lpszClassName, wndclass.lpszClassName, WS_OVERLAPPEDWINDOW | WS_VISIBLE, -500, 300,
400, 300, 0, 0, g_hInst, 0);
AnimateWindow(wnd, 200, AW_BLEND);
MSG msg = { 0 };
while (GetMessage(&msg, 0, 0, 0))
DispatchMessage(&msg);
}
int WINAPI _tWinMain(HINSTANCE hInst, HINSTANCE, LPTSTR, int)
{
g_hInst = hInst;
HangTbarTest();
return 0;
}
Christian Studer - www.realtimesoft.com
|
fjoanis 2014-08-18 07:42
This code repro it 100% :)
// Win32Project1.cpp : Defines the entry point for the application. //
#include "stdafx.h"
// Global Variables: HWND g_hInst;
LRESULT CALLBACK WndProcHangTbarTest(HWND msgHwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_CLOSE: PostQuitMessage(0); return 0;
case WM_CREATE: return 0; }
return DefWindowProc(msgHwnd, uMsg, wParam, lParam); }
void HangTbarTest() { WNDCLASS windowClass;
// register window class windowClass.style = 0; windowClass.lpfnWndProc = WndProcHangTbarTest; windowClass.cbClsExtra = 0; windowClass.cbWndExtra = 0; windowClass.hInstance = NULL; windowClass.hIcon = NULL; windowClass.hCursor = NULL; windowClass.hbrBackground = NULL; windowClass.lpszMenuName = NULL; windowClass.lpszClassName = "SPLASH"; RegisterClass( &windowClass );
g_hInst = CreateWindowEx( 0, "SPLASH", "Foo", WS_POPUPWINDOW, 100, 300, 100, 100, NULL, NULL, NULL, NULL );
AnimateWindow( g_hInst, 200, AW_BLEND );
size_t a = 0; for (size_t i = 0; i < 10000000000; ++i) a = a + 1;
MSG msg = { 0 }; while (GetMessage(&msg, 0, 0, 0)) DispatchMessage(&msg); }
int WINAPI _tWinMain(HINSTANCE hInst, HINSTANCE, LPTSTR, int) { HangTbarTest(); return 0; }
|
Christian Studer 2014-08-18 13:32
Thanks for the sample, I've been able to reproduce the issue, but the UltraMon taskbar only hangs for 2-3 seconds, after that it works fine again. Do you have the same behavior, or does it hang until the loop is finished?
Christian Studer - www.realtimesoft.com
|
fjoanis 2014-08-19 11:08
Same here, it freezes for a few second, then start responding again. In my software I think there's other access to that handle which makes the unresponsiveness to continue. So if you can fix that use case, my guess is that it will fix all other occurences also.
Thanks!
|
Christian Studer 2014-08-19 12:42
I'll look into this for the next release, not sure though if there's a fix.
Christian Studer - www.realtimesoft.com
|
Post Reply
|