@Gordon I'm not sure if this is correct (I am not familiar with Espruino internals after all), most code execution on our app run during event handling, and the errors that occurred with Morphing Clock also only happened during events like button presses, so perhaps the event handlers are not updated regarding the callbacks' locations in storage?
Also, I managed to replicate the problem manually with the following steps:
Open Morphing Clock
Open a StorageFile and write some arbitrary data
Erase said StorageFile
Call require('Storage').compact()
Press BTN1
which throws the following exception:
Uncaught ReferenceError: "fffa" is not defined
at line 1 col 3
W+CHARP;var d=new Date();g.reset();g.setFont("6x8");g.setFÂontAlign...
^
in function called from system
at line 1 col 1
fffaff ?[204] ?[204] ?[204] ?[204] ffafffff ?[204] ?[204] ?[204] ?[204] ?[204] ?[204] ?[204] ?[204] ffffa?[204] ?[204] ?[204] ?[204]...
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
@Gordon I'm not sure if this is correct (I am not familiar with Espruino internals after all), most code execution on our app run during event handling, and the errors that occurred with Morphing Clock also only happened during events like button presses, so perhaps the event handlers are not updated regarding the callbacks' locations in storage?
Also, I managed to replicate the problem manually with the following steps:
require('Storage').compact()
which throws the following exception: