-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Windows loading icon stays visible after launching app #4685
Comments
I can reproduce this in a win7 system, but not in a win10 system. The reason should be: a) NW inherits the Chromiuim's multi-process architecture, so it launches multiple processes; and windows changes the cursor to IDC_APPSTARTING (feedback cursor) for 2 seconds when CreateProcess is called. "If during those two seconds the process makes the first GUI call, the system gives five more seconds to the process. If during those five seconds the process shows a window, the system gives five more seconds to the process to finish drawing the window. b) In that win7 system, if you watch the number of nw processes when it starts, at first it's 4 processes, then after a while it goes down to 3. That's the GPU process quits for some reason. So the feedback cursor should be waiting for the GPU process's first call to GetMessage, and timeouts when it quits. Why the GPU process quits in that system is not known yet, but Chrome browser in the same system shares the same behavior. |
@rogerwang: In addition to Windows 7, I can reproduce this in a Windows 10 x64 environment without fail with the latest NW.js release. This same behavior is present in Chromium on both Windows 7 and 10. |
I can reproduce this on Win 10 x64 with nwjs version v0.14.0 |
@rdtsc @FiatPax could you please keep watching the number of nw.exe processes during startup? Does it change from 4 to 3 as I described? |
@rogerwang: On Windows 10, my results are identical to @FiatPax's. Four processes are spawned and keep running: On Windows 7, however, four processes are spawned and one of them quits ~2.2 seconds later: As you can see from the GIFs, both cases result in the system cursor being changed to For reference, here's the test DLL I had Windows inject to log this: #include <fstream>
#include <iomanip>
#include <string>
#undef UNICODE
#include <windows.h>
BOOL APIENTRY DllMain(HMODULE, const DWORD reason, LPVOID)
{
const auto imageName = []
{
char buffer[MAX_PATH] = {};
::GetModuleFileName(nullptr, buffer, sizeof buffer);
std::string result(buffer);
const auto marker = result.find_last_of('\\');
if(marker != std::string::npos) result = result.substr(marker + 1);
return result;
}();
if(imageName != "nw.exe") return TRUE;
std::ofstream outputStream("c:/nwjs-process.log", std::ios::app);
const auto log = [&]() -> std::ostream&
{
outputStream << '@' << ::GetTickCount();
outputStream << " [" << std::setw(4) << ::GetCurrentProcessId() << "] ";
return outputStream << imageName << " - ";
};
switch(reason)
{
case DLL_PROCESS_ATTACH: log() << "started.\n"; break;
case DLL_PROCESS_DETACH: log() << "ended.\n"; break;
}
return TRUE;
} |
This is fixed in git and will be available in the next nightly build. |
@rogerwang: Confirming desired cursor behavior on Windows 7/10 x64 with the build from the 20th. Thanks a lot for the prompt fix. |
Can confirm cursor issue is fixed as well on the 0.14.2 4/20 build. In fact, the app actually boots up quite a bit faster too.. Which is great! Thank you @rogerwang for your hard work |
@rogerwang App boots up faster as @Dillybob92 said. That's great thanks. |
Hey, I'm not sure if this is a bug, but I think it's a little abnormal.
But basically, when you click on nw.exe, the loading icon next to your mouse cursor appears for 3-5 seconds. Example:
https://i.gyazo.com/b8c93f501b77d6a811a7750dc8f805d0.gif
I thought this had to do with what was inside my
index.html
, but you can have a blankindex.html
and it still does it.My operating system is:
Windows 7, 64-bit Professional
Samsung EVO 250GB SSD
Build Tested Under
nwjs-sdk-v0.13.3-win-x64
So, I don't think performance here is an issue. But, as you can see from the gif the app is already loaded, but the loading icon next to the cursor stays there for an excessive period of time.
If you need any other OS spec's please let me know. I am not sure if this classifies as a 'bug', and maybe it's just how
nw.js
runs, so I apologize. I just think it's a bit strange the loading icon stays there even after the app is loaded. 🎱Edit: Maybe it's just happening on Windows 7? Can anyone else confirm for 7, or if it's not happening on 8 or 10?
The text was updated successfully, but these errors were encountered: