Pendant script contents cache bug

I’m seeing this bug on the ursim e-series docker image (URSoftware 5.12.2.1101534), but I’m pretty sure we see this on the real UR10e as well.

Summary: tapping the code shown in the “Script Code” box on the pendant causes the .script file to be overwritten when you tap “Edit” or “Run”, even if the contents were out of date.

The bug is described in the attached cache_bug.script, which I’ll also paste here.

# Load cache_bug_wrapper.urp on the pendant, then modify this file
# (cache_bug.script) on disk, say by SCPing over a new copy that
# pops up 'y' instead of 'x'.
#
# Run the program and you'll see 'y' as expected.
#
# Bug 1: Tap "Edit" and you'll see the new contents, but when
# you tap "Exit", "Script Code" will still show the old contents.
# (Workaround: if you make a change in the editor and then save the
# file, the contents will be updated when you tap "Exit").
#
# Bug 2: Now tap on this text where it's displayed under "Script Code".
# Run the program again, and you'll get the OLD behavior
# ('x').  You'll also find that the pendant has overwritten
# cache_bug.script with the old contents.  Overwriting also happens
# if you tap "Edit" instead of running the program -- you'll see
# the old contents in the edit window.
#
popup("x")

cache_bug.script (846 Bytes)

cache_bug_wrapper.urp (1.9 KB)

Bonus bug: the forum hangs forever when I try to upload cache_bug_wrapper.urp. Tried this in both firefox and chromium for linux. But it works if I un-gzip the URP first.