Image fails to load in rare cases. Preload issue?

@yisrael-wix ok I managed to set up a much simpler example.

see page www DOT harint DOT com / problematic

here is the code :

var SHOW_CROSS = true

$w.onReady(function () {
    $w("#button1").onClick(onClick)
});

async function onClick() {
  if (SHOW_CROSS) {
    await $w("#image1").hide()
    await $w("#image2").show("turn")
  }
  else {
    await $w("#image2").hide()
    await $w("#image1").show("turn")
  }
  SHOW_CROSS = !SHOW_CROSS
}

If you press many times on the button, at a random point, you will see no images at all. Given this simple code, I believe it should never happen. With multiple clicks, it is expected that sometimes both images will appear, but it should not be the case that none appear (because the last onClick call necessarily ends with a “show”).

I think that’s probably a good minimal case for QA to review.

Please keep me updated as I am keen to get this working on my website. Thanks!