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

Bugs which have been reproduced by a second user or the developer

Moderator: Dreamer

Post Reply
Posts: 2
Joined: Fri Jul 19, 2013 6:04 am

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

Post by xcq1 » Sat Mar 16, 2019 9:37 am

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.

User avatar
Author of XnView
Posts: 31352
Joined: Mon Oct 13, 2003 7:31 am
Location: France

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

Post by xnview » Mon Apr 15, 2019 1:39 pm


Post Reply