• Fixed! https://github.com/espruino/Espruino/com­mit/4fba95ec89c36b5e337ccbe1c0973b405f81­b24a

    If it helps, when debugging I did:

    • Ran under linux with gdb (makes life loads easier!)
    • p jsvGetRef(var) to get the reference of the variable that had a problem
    • break jsLock if ref==that_reference
    • break jsLockAgain if var==the_vars_pointer
    • break jsUnLock if var==the_vars_pointer
    • break where it's happening and after, and step through finding where the locks and unlocks happen
    • When I found out there wasn't an unlock in the function that locked it, the only way it could have happened is if thisVar got overwritten, so I did watch thisVar and continued until I found where it was getting overwritten

    But none of that would have happened without a reproducible test that ran on Linux and the hints about which variable had too many locks - so thanks! The hard part was definitely already done :)

About

Avatar for Gordon @Gordon started