sihorton / appjs-deskshell

SDK to build desktop apps using HTML5/CSS/JS for frontend and server script for backend
MIT License
472 stars 56 forks source link

Windows Desktop Refreshes on executing example app #27

Open negue opened 10 years ago

negue commented 10 years ago

Hey,

it is kinda hard to explain, but I try anyway...

  1. Compile an exe-File out of the portable-hello-world example
  2. Start this exe
  3. The Application Window is shown
  4. The Desktop refreshes all icons (maybe it resets the cache)

I don't know why it happens, and it will concern users.

Is this a bug or "by-design" ?

I'm using Win 7 x64, do you need any other information?

IngwiePhoenix commented 10 years ago

I think your guess with the cache is correct; I currently am placing the cache at random locations, so I bet that might be the issue o.o Am 19.11.2013 um 09:25 schrieb negue notifications@github.com:

Hey,

it is kinda hard to explain, but I try anyway...

Compile an exe-File out of the portable-hello-world example Start this exe The Application Window is shown The Desktop refreshes all icons (maybe it resets the cache) I don't know why it happens, and it will concern users.

Is this a bug or "by-design" ?

I'm using Win 7 x64, do you need any other information?

— Reply to this email directly or view it on GitHub.

sihorton commented 10 years ago

Hi Negue, I have not seen this issue myself before. There is nothing in the exe that is compiled that tells windows to refresh the icon cache. Can you try rebooting the entire machine then don't run any other program but start the exe and see if the icon cache refreshes.

Why I am asking you to do that is I am guessing your machine has low memory, or you have been viewing a large number of icons / images in explorer and this is causing windows to constantly refresh the icon cache. If the problem persists even after a fresh restart we will have to investigate further.

/Simon

negue commented 10 years ago

I have 8GB Ram, which are currently 5GB used, so about 3GB are free.

If it is a memory problem then it should refresh on other applications as well, but currently only all deskshell apps do that.

I also had fences running by stardock, deactivated this, but the bug was still there. Even started a lot of other applications and none of them refreshed the explorer.

sihorton commented 10 years ago

I think that windows reserves a limited amount of ram for the icon cache, so even if you have a lot of free ram the icon cache can still be switched out. I just remember experiencing that issue before myself after using the libraries feature to look through a large list of icons.

Could you post the exe + app that you compiled somewhere and I can download it and see if it causes an icon refresh on my machine. I can also search NSIS forums for any bugs to do with the icon cache.

negue commented 10 years ago

I just started the "app.exe" from the "Windows Portable" Download.

But here is the exe and the src: https://dl.dropboxusercontent.com/u/605545/portable-hello-world.zip

I installed deskshell manually, do I need to restart the computer after the installation?

sihorton commented 10 years ago

Ah ok I thought you had compiled the exe yourself, maybe I did not read what you had written fully.

Ok using that zip I can see that I get the same issue, not all of the icons but some of them flash after the main window has opened. Seeing that maybe the issue is caused by the application icon not having all of the correct sizes. I can update the icon and see if that fixes the issue.

negue commented 10 years ago

Yes I started the already-compiled Application and also compiled the same app from the source, so you did read right :smile: sorry for the confusion.

sihorton commented 10 years ago

I have changed the application icon but I see exactly the same issue. If I run the application by clicking on the .desk file then I see the same result. This means that it is tied to chrome rather than deskshell so hopefully there is a fix. I also tried removing the favicon but I see the same behaviour.

Basically we will need to try out a different version of chrome and see if any of the settings or parameters are causing this behaviour so we can eliminate it. Thanks for reporting the issue we will put it on our todo list and update this issue once we find a fix.

sihorton commented 10 years ago

I have been experimenting and managed to get a little bat file that launched chrome as a packaged app and it did the refresh. There is a flag I have not been using (--appid), if I add that then the application starts far faster and the refresh does not happen. I will now update deskshell to use this flag and see if it fixes the problem.

sihorton commented 10 years ago

Unfortunately this did not solve the problem. Something is wrong with the apps that are launched, if I launch from a bat file then I don't get an icon rebuild on the taskbar, I have tried removing the icon, using a totally different one, changing the parameters passed to chrome but I still get the rebuild. We will have to continue investigating.

sihorton commented 10 years ago

I have compiled a version of cef3 client. This is about half the size of google chrome and also opens 6 times faster. It does not cause an icon refresh. Not sure exactly when this will be released but it does seem to solve the issue.

Anachron commented 10 years ago

Seems like there are still people out that are using desktop icons :) I'm using Launchy to launch any app that I want.

OnTopic: I never experienced any issues with DeskShell and my icon(s/cache) when I was still using them. But I had several windows bugs already with files/folders/icons not refreshing at all or refreshing too often.

For me it's weird if chrome should cause any problems like this. Does this happen in all versions?

sihorton commented 10 years ago

@Anachron sorry been away over the holidays. It could be caused by icons that don't have the right size to display properly in windows, however I have experimented somewhat and could not pin down the problem exactly. It could also be caused by the exact version of chrome we were using. Again more testing needed and I am sure the problem will be fixed at some point.

swaitz commented 10 years ago

I have the same issue as @Anachron and @negue describe in the beginning. Are there some new inormations about this issue and how it could be fixed?

In my application I do push via socket.io and the pushed data tells my client to use other pictures. Bbut even if the pictures are not changed the strange refresh behavior is active.