Windows 7 Kills XY on creating large # of thumbnails

Things you’d like to miss in the future...
Forum rules
You might want to read this if you're looking for priority service

:info: Please Include The Following Information
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: Use Your Profile Or Signature
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
Zardoz2293
Posts: 638
Joined: 09 Nov 2011 20:20
Location: USA

Windows 7 Kills XY on creating large # of thumbnails

Post by Zardoz2293 »

Windows 7 kills the XY process as it sees it as unresponsive when creating a large number of thumbnails. In this specific case it occured at 17,000 of 100,000 thumbnails. There is no way to allow XY to continue. Would be nice if XY would perform an OOP thumbnail creation, or sleep for 1ms, or the ugly DoEvents once every 30 seconds on thumbnail creation. -
26.png
To see the attached files, you need to log into the forum.
XYplorer v28.50.0101

MacOS Tahoe v27.2.1 ; Parallels for Mac
VM (Client): Windows 11 Pro (AArch64), 26H2.26300.10075(10.0)
Display: Main=MacBook 4112 x 2570 @200%; External 3840 x 2160 @125%

admin
Site Admin
Posts: 67278
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Windows 7 Kills XY on creating large # of thumbnails

Post by admin »

Weird. It actually does a DoEvents every 250 msecs!

Zardoz2293
Posts: 638
Joined: 09 Nov 2011 20:20
Location: USA

Re: Windows 7 Kills XY on creating large # of thumbnails

Post by Zardoz2293 »

admin wrote:Weird. It actually does a DoEvents every 250 msecs!
That is very interesting. Based on the behavior (occurs 100% of the time). Perhaps the DoEvents call isn't actually getting executed (something like a NOP/NOOP) -- perhaps the optimizer/linker/packaging tool you are using. Perhaps VB Runtime isn't able to process the Windows Message Loop. Why? If the Windows is terminating XY thinking or knowing from it's perspective XY is unresponsive. I suspect if you add the following registry entries you will have the same problem. However, it wouldn't explain why the DoEvents isn't processing the message loop.

Code: Select all

[HKEY_CURRENT_USER\Control Panel\Desktop]
"LowLevelHooksTimeout"="15000"
"AutoEndTasks"="0"
"HungAppTimeout"="30000"
"WaitToKillAppTimeout"="30000"
 
; SID: Local Service
[HKEY_USERS\S-1-5-19\Control Panel\Desktop]
"AutoEndTasks"="0"
"HungAppTimeout"="30000"
"WaitToKillAppTimeout"="30000"
 
; SID: Network Service
[HKEY_USERS\S-1-5-20\Control Panel\Desktop]
"AutoEndTasks"="0"
"HungAppTimeout"="30000"
"WaitToKillAppTimeout"="30000"
XYplorer v28.50.0101

MacOS Tahoe v27.2.1 ; Parallels for Mac
VM (Client): Windows 11 Pro (AArch64), 26H2.26300.10075(10.0)
Display: Main=MacBook 4112 x 2570 @200%; External 3840 x 2160 @125%

admin
Site Admin
Posts: 67278
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Windows 7 Kills XY on creating large # of thumbnails

Post by admin »

What are your thumbnails settings? "Create all at once"?

Zardoz2293
Posts: 638
Joined: 09 Nov 2011 20:20
Location: USA

Re: Windows 7 Kills XY on creating large # of thumbnails

Post by Zardoz2293 »

admin wrote:What are your thumbnails settings? "Create all at once"?
To see the attached files, you need to log into the forum.
XYplorer v28.50.0101

MacOS Tahoe v27.2.1 ; Parallels for Mac
VM (Client): Windows 11 Pro (AArch64), 26H2.26300.10075(10.0)
Display: Main=MacBook 4112 x 2570 @200%; External 3840 x 2160 @125%

admin
Site Admin
Posts: 67278
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Windows 7 Kills XY on creating large # of thumbnails

Post by admin »

Thank you. I made some changes and hope the next version will fix this.

Zardoz2293
Posts: 638
Joined: 09 Nov 2011 20:20
Location: USA

Re: Windows 7 Kills XY on creating large # of thumbnails

Post by Zardoz2293 »

admin wrote:Thank you. I made some changes and hope the next version will fix this.
The update has significantly enhanced the thumbnail building process. :)

However, Windows 7 64-bit still terminates XY during thumbnail processing. It seems to occur consistently in the 12,000 - 17,000 range out of 100,000 but ONLY when you click or scroll or mouse scroll in the list view (during the thumbnail creation process).
XYplorer v28.50.0101

MacOS Tahoe v27.2.1 ; Parallels for Mac
VM (Client): Windows 11 Pro (AArch64), 26H2.26300.10075(10.0)
Display: Main=MacBook 4112 x 2570 @200%; External 3840 x 2160 @125%

admin
Site Admin
Posts: 67278
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Windows 7 Kills XY on creating large # of thumbnails

Post by admin »

Zardoz2293 wrote:
admin wrote:Thank you. I made some changes and hope the next version will fix this.
The update has significantly enhanced the thumbnail building process. :)
Fine, but in what way?
Zardoz2293 wrote:However, Windows 7 64-bit still terminates XY during thumbnail processing. It seems to occur consistently in the 12,000 - 17,000 range out of 100,000 but ONLY when you click or scroll or mouse scroll in the list view (during the thumbnail creation process).
Hmm, I'll see what I can do about that.

Zardoz2293
Posts: 638
Joined: 09 Nov 2011 20:20
Location: USA

Re: Windows 7 Kills XY on creating large # of thumbnails

Post by Zardoz2293 »

admin wrote:Fine, but in what way?
Before it was impossible to change in the Tree View another folder until the thumbnail creation process was finished. Now you can.

admin wrote:Hmm, I'll see what I can do about that.
I'm now experiencing when Windows terminates XY, I'm getting two of the termination messages. The last time it was terminated only one message and now XY is displayed/loaded but totally unresponsive/greyed out with no activity (it's not processing the thumbnails -- reached 65,000).

On a side not, if XY doesn't finished the creation of the thumbnails, XY starts from the beginning again. So in something extreme like 100,000 files and you get to 99,999 and the hang event occurs, OR you click another folder, the next time you enter that prior folder thumbnail creation starts at file #1.
XYplorer v28.50.0101

MacOS Tahoe v27.2.1 ; Parallels for Mac
VM (Client): Windows 11 Pro (AArch64), 26H2.26300.10075(10.0)
Display: Main=MacBook 4112 x 2570 @200%; External 3840 x 2160 @125%

admin
Site Admin
Posts: 67278
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Windows 7 Kills XY on creating large # of thumbnails

Post by admin »

Interesting, so something changed from XP to Win7 in the effects of DoEvents and Sleep.

You got folders with more than 100,000 thumbnails? A little extreme, no?

Anyway, I just checked and did not find any reason anymore why Win7 would think XY is non-responsive. I'll keep an eye open nevertheless.

Marco
Posts: 2354
Joined: 27 Jun 2011 15:20

Re: Windows 7 Kills XY on creating large # of thumbnails

Post by Marco »

Little consideration: 65000+ is 2^16. Maybe a buffer overflow somewhere?
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

admin
Site Admin
Posts: 67278
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Windows 7 Kills XY on creating large # of thumbnails

Post by admin »

Marco wrote:Little consideration: 65000+ is 2^16. Maybe a buffer overflow somewhere?
Yes, I saw that too, but it should generate an error message or a crash, neither of which happened. Also I almost never work with 16-bit numbers (but 32-bit), certainly not in the thumbnails code, so these numbers should not be a problem per se.

Zardoz2293
Posts: 638
Joined: 09 Nov 2011 20:20
Location: USA

Re: Windows 7 Kills XY on creating large # of thumbnails

Post by Zardoz2293 »

admin wrote:Interesting, so something changed from XP to Win7 in the effects of DoEvents and Sleep.
Yeah, I think it's called the new world order. Typically the DoEvents is a total performance killer based on how it executes, it's surprising it's as fast as it is with this technique.

admin wrote:You got folders with more than 100,000 thumbnails? A little extreme, no?
Extreme is my middle name. It's unusual, as those files were in about 18,000 folders, but moved into one. I wouldn't be concerned about the apparent +/- 15,000 thumbnail at once creation limit. Efforts are better focused on future 64-bit product.

admin wrote:Anyway, I just checked and did not find any reason anymore why Win7 would think XY is non-responsive. I'll keep an eye open nevertheless.
The thumbnail creation is the only spot in XY or any other of hundreds I have on my system where the Windows 7 Kernel performs an application termination. Frankly, I see it as a Windows 7 failure, from the perspective, the end-user cannot override and prevent application termination, it's a done deal.
XYplorer v28.50.0101

MacOS Tahoe v27.2.1 ; Parallels for Mac
VM (Client): Windows 11 Pro (AArch64), 26H2.26300.10075(10.0)
Display: Main=MacBook 4112 x 2570 @200%; External 3840 x 2160 @125%

Zardoz2293
Posts: 638
Joined: 09 Nov 2011 20:20
Location: USA

Re: Windows 7 Kills XY on creating large # of thumbnails

Post by Zardoz2293 »

admin wrote:
Marco wrote:Little consideration: 65000+ is 2^16. Maybe a buffer overflow somewhere?
Yes, I saw that too, but it should generate an error message or a crash, neither of which happened. Also I almost never work with 16-bit numbers (but 32-bit), certainly not in the thumbnails code, so these numbers should not be a problem per se.
The 65,000, is, I believe a coincidence when I happen to have clicked on XY, which was at that number, prior it was hanging at 15,000 when I clicked on XY. I believe it would have processed all of the thumbnails if I hadn't click on XY at during the thumbnail creation process. It's as if part of the windows message loop is being consumed and it, Windows, doesn't get the expected reply, hence, killing the process as non-responsive.

2^16 seems very odd as a boundary for a VB app, not a native max value. C/C++/C# sure. There's no native DWORD in VB so I'd expect to see integer wrap or overflow (if turned on) around max int and that isn't occurring. I know there are a lot of Win32 APIs that use DWORD and there was at one time several DWORD structures/methods/procedures in the public domain that both had a glitch in the conversion/overflow.

Thanks Don! I'll let it run right now to the 100,000 and provide feedback (I know it's going to work unless I click into it while it's doing it's thing).

Update (without intervention/touching/clicking in XY):
Run #1) Terminated @ 52,136 (one termination notice)
Run #2) Terminated @ 63,736 (one termination notice)
Run #3) Terminated @ 20,244 (two termination notices)
Run #4) Terminated @ 30,528 (one termination notice)
Run #5) Terminated @ 30,130 (one termination notice)
Run #6) Terminated @ 30,079 (one termination notice)
Run #7) Terminated @ 64,510 (one termination notice) - wouldn't terminate.
Run #8) Terminated @ 29,799 (one termination notice)

BINGO!
Run #9) Terminated @ ~54,xxx (Application Error) - see image
35.png
To see the attached files, you need to log into the forum.
Last edited by Zardoz2293 on 07 May 2012 11:23, edited 2 times in total.
XYplorer v28.50.0101

MacOS Tahoe v27.2.1 ; Parallels for Mac
VM (Client): Windows 11 Pro (AArch64), 26H2.26300.10075(10.0)
Display: Main=MacBook 4112 x 2570 @200%; External 3840 x 2160 @125%

admin
Site Admin
Posts: 67278
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Windows 7 Kills XY on creating large # of thumbnails

Post by admin »

The next version (v11.00.0010) has a tiny change that might make another difference.

Post Reply