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

Older bugs which are supposed to be fixed in 0.84. *** Please try to reproduce your bug and confirm the bug fix. ***

Moderators: XnTriq, helmut, xnview, Dreamer

xcq1
Posts: 3
Joined: Fri Jul 19, 2013 6:04 am

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

Post 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.
User avatar
xnview
Author of XnView
Posts: 44616
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 »

right...
Pierre.
User avatar
xnview
Author of XnView
Posts: 44616
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 »

See issue for current status and some details.
Pierre.
User avatar
xnview
Author of XnView
Posts: 44616
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 »

This problem is supposed to be fixed in XnView MP 0.94. Please check and confirm the bug fix here.
Pierre.
xcq1
Posts: 3
Joined: Fri Jul 19, 2013 6:04 am

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

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