Page 1 of 1

0.93.1: Random slideshow shows at most ~32,000 images

Posted: Sat Mar 16, 2019 9:37 am
by xcq1
XnView: MP 0.93.1 - 64 bit
OS: Windows 10 - 64bit

When you activate the random quick slideshow feature in a folder with more than 32,000 files and watch the overlay "xyz/40000" over a long period of time, it is noticeable that all random picks occur below ~33,000. From coding experience, I would believe the actual value is 32767 from the minimal default RAND_MAX implementation.

Effect: You cannot create a random slideshow with more than ~32,000 pictures because the population space is limited and thus the images are not selected at random.

To reproduce:
1. Copy or generate more than 40,000 images in a folder
2. Settings > View > Quick slideshow: Delay: 50ms and Direction Random
3. Start slideshow
4. Closely watch the counter in the top left

Actual behaviour (bug): Counter never goes above 33,000

Expected behaviour: Counter picks each image equally likely, even if the user is insane enough to have such an amount of images.

Re: 0.93.1: Random slideshow shows at most ~32,000 images

Posted: Mon Apr 15, 2019 1:39 pm
by xnview
right...

Re: 0.93.1: Random slideshow shows at most ~32,000 images

Posted: Tue Aug 27, 2019 8:50 am
by xnview
See issue for current status and some details.

Re: 0.93.1: Random slideshow shows at most ~32,000 images

Posted: Tue Sep 17, 2019 10:16 am
by xnview
This problem is supposed to be fixed in XnView MP 0.94. Please check and confirm the bug fix here.

Re: 0.93.1: Random slideshow shows at most ~32,000 images

Posted: Sun Dec 29, 2019 11:10 am
by xcq1
Thanks, I appreciate you trying to fix this corner case.

Just tried out 0.94.2, unfortunately I still see the buggy behavior. In a folder with currently ~52000 images, the random slide show is still limited to the first ~32000 according to the given sort order. Deleting the settings files didn't help either.