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...