Page 2 of 2

Re: Program hangs sometimes when it's started by opening an image.

Posted: Mon Feb 14, 2022 2:42 pm
by xnview
ebmaster wrote: Mon Feb 14, 2022 12:56 pm This folder contains 34 jpg files, 2 png and 1 gif, but this this junk Download folder 64Gb size, ~341 files and 40 folders. In total it have ~ 1350 folders and subfolders and ~15K files in it. I tried to transfer all my 37 files in new dir and they open instantly. Maybe XnView trying to build some type of directory tree?
yes i think, and if you put the 341 files in a new folder?

Re: Program hangs sometimes when it's started by opening an image.

Posted: Mon Feb 14, 2022 4:29 pm
by ebmaster
xnview wrote: Mon Feb 14, 2022 2:42 pm
ebmaster wrote: Mon Feb 14, 2022 12:56 pm This folder contains 34 jpg files, 2 png and 1 gif, but this this junk Download folder 64Gb size, ~341 files and 40 folders. In total it have ~ 1350 folders and subfolders and ~15K files in it. I tried to transfer all my 37 files in new dir and they open instantly. Maybe XnView trying to build some type of directory tree?
yes i think, and if you put the 341 files in a new folder?
And there is same huge lag! Folder is just 3,42GB. I'l take some time to determine what file or file type causes this behavior.

Re: Program hangs sometimes when it's started by opening an image.

Posted: Mon Feb 14, 2022 4:54 pm
by ebmaster
xnview wrote: Mon Feb 14, 2022 2:42 pm
I got it! It's shortcut to unavailable network folder (\\192.168.1.122\).
I guess software is trying to parse content of network folder in main thread instead of background. Please, fix it somehow ) Thanks!

Re: Program hangs sometimes when it's started by opening an image.

Posted: Tue Feb 15, 2022 7:19 am
by xnview
ebmaster wrote: Mon Feb 14, 2022 4:54 pm
xnview wrote: Mon Feb 14, 2022 2:42 pm
I got it! It's shortcut to unavailable network folder (\\192.168.1.122\).
I guess software is trying to parse content of network folder in main thread instead of background. Please, fix it somehow ) Thanks!
I think that it try to access to this network folder and block the app

Re: Program hangs sometimes when it's started by opening an image.

Posted: Tue Feb 15, 2022 7:28 am
by ebmaster
xnview wrote: Tue Feb 15, 2022 7:19 am
ebmaster wrote: Mon Feb 14, 2022 4:54 pm
xnview wrote: Mon Feb 14, 2022 2:42 pm
I got it! It's shortcut to unavailable network folder (\\192.168.1.122\).
I guess software is trying to parse content of network folder in main thread instead of background. Please, fix it somehow ) Thanks!
I think that it try to access to this network folder and block the app
So, what your point? Can you make tree scanning not blocking image view? Or is it a recommendation to just not store such shortcuts in the folders with images? Thanks.

Re: Program hangs sometimes when it's started by opening an image.

Posted: Tue Feb 15, 2022 7:34 am
by xnview
network access can block, almost if you have a shortcut with a dead network share. XnView check all files in the folder.

Re: Program hangs sometimes when it's started by opening an image.

Posted: Tue Feb 14, 2023 4:42 pm
by mandula
Sorry to resurrect this thread, but this hang really bugs me and I just registered an account to have my input. I have the most recent version of XnView MP (1.4.2 x64) and it still happens to me. I do open the image from Windows, by double-clicking it, with XnView being set to open the classic Viewer upon startup (not fullscreen, and not the browser view).

I understand, that the hang is caused by a shortcut to an unavaliable Network Share, and I also reproduced it - can confirm again, it is caused by that. The problem is, I have some important local share shortcuts on my Desktop, which I regularly use. However, I also use my Desktop as a quick dump of any image I download, any image I quickly want to work on, and I still want to keep them on my Desktop. At the same time, XnView MP is my go-to app to use to quickly open images, and have been for years, years (starting with the Classic version). I really don't want to move to an other app.

Please, I know we found the culprit, and I only know a little bit of programming, but please, could we have a "fix" for this hang, even if it is a simple one? I'm thinking of like a very quick timeout which, upon detecting a Network Share shortcut, after no response from the share it would cause the folder to be skipped, so the Viewer does not hang. There is probably a better method to solve this (you know the optimal way much better than I do, I'm 100% sure 8) ). It is an annoying (and I guess, common) issue, that I think could be worked around. Both using my Desktop and the placed Network Share shortcuts (and also, using your great XnView app as well!) are important to me while using my computer, and I still want to keep using them, but this hang breaks the whole experience, as during the loooong hang the app can't be used at all.

Re: Program hangs sometimes when it's started by opening an image.

Posted: Tue Feb 14, 2023 5:21 pm
by ebmaster
Please, I know we found the culprit, and I only know a little bit of programming, but please, could we have a "fix" for this hang, even if it is a simple one?
I think there is now fault of XnView. It's default Windows API behavior. I found weird solution for this. Map your shares as network drives, then create shortcuts for it. No browser lag after that!