Trivial bugs in Corelibs (leaking globals)

After noticing crankindicator was leaking globals, I decided to go spelunking in Corelibs and found a few more errors via static analysis. These aren't technically Beta feedback so let me know if you'd prefer me to post these in the main forums.

  1. CoreLibs/string.lua: leaks a global called str in playdate.string.UUID:

  2. CoreLibs/frameTimer.lua leaks a global called o in playdate.frameTimer.new:

  3. CoreLibs/animator.lua leaks a global called time playdate.graphics.animator:valueAtTime

  4. CoreLibs/qrencode_panic_mod.lua leaks three globals: tmp_tab, tmp_str and size


  5. CoreLibs/qrcode.lua leaks value as global

Hilariously I found strict.lua while looking for these, so easy to catch these in the future in dev by using:

if playdate.isSimulator then
    import "Corelibs/strict"
end
1 Like

Just a follow up. I ran into this one again today.

I had a global variable named o I was using for debugging and playdate.frameTimer.new clobbered it.

Can one of the @moderators move this from the Beta Testers forum to Bug Reports?

Thanks, I'll file this. If you find any more leaked globals please let us know.

1 Like

Thanks again for filing this! We've got this fixed in the 2.3 update, for the record

2 Likes

Excellent! Looks like 2.3.0 is a release full of small fixes. Thanks!

1 Like