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