Pre-Loading Images intermittent missing images

Here's a weird one... I'm trying to pre-load images by

Show Picture 1 (Img A)
Wait 1 frame
Show Picture 1 (Img 😎
Wait 1 frame
Show Picture 1 (Img C)
Wait 1 frame
etc...
Delete Picture 1

Then when I try to show those pictures in game, some of them fail to load while others load properly, and it's totally random each time.

Any ideas?
GC might be kicking in in between loads and deleting what's not in use.
try loading all in their individual show picture commands to keep them in memory, and work from there.
(heads up: it will fail... it's not meant to be a solution, it's just a workaround.)

preloading should be done by code, not show picture.
look around for preloading plugins... it's been done before.
I appreciate the advice, @gstv87. I'll definitely check that out.

I did change the Wait: 1 frame, to Wait: 5 frames and now everything is loading perfectly. Do you think 1 frame is just too fast for the processing?
it's not the loading... it's the keeping in memory.
if you load everything in it's own variable and keep it "shown" (quotes, because they can be on screen but out of view by various means), the system will consider them "in use".
if you load one and then immediately overwrite it, the system may discard the old bitmap.

the right way to do it would be to load them by code outside of the show picture command and the GC cycle.
I'm sure there are plugins for that... I just don't know the JS code for this.
this was just to test if the system is loading things correctly, and can support the load (it could be dropping data to save memory space)
the managing for *your* convenience, you do with a plugin.
If its pre-loaded images I reccomend a pre-loader plugin.

I use SRD preloader.
Is that for MV? Unfortunately, I'm using MZ. Thanks for the reply though. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/pre-loading-images-intermittent-missing-images.174340/