The previous commit was super useful. The links are not actually being lost when I exit pensieve. Instead, they're somehow not being set in some code path that I haven't tracked down yet.
The important thing is, I've been missing things because I wasn't running it from a terminal. prints (that the links are empty) were disappearing that would have helped diagnose it. Lesson learned: always send error prints to the log as well. At least there we have a hope of spotting them.
Once we start emitting prints to the log, also include the function name. On errors so far we've not bothered because the default LOVE error handler shows the stack trace. However the logs don't record the stack, and we might go looking at them long after the app crashes. The print doesn't need function names, but the log does so we'll just lowest-common-denominator both.
53LXFA2O4DZ2GJ7GC6M3FUUNFJ5MOKSUJ74XU2YNLO3HSOEASSXAC
CMNZV77AAGXMKTKVXP47XLEXMWOF7VVAOWOUQZVFFZJO3PI4CFHQC
WCNY75ISJWPSVODM6ROKZQTMO3ALV5ZV3ETUROMV2SOAAYWTHBZQC
G25JZG3RT7SYRBIZ3H6TB62H5D3UCVLA4J52LUZ2T6K7ZMGLAESQC
C5CEWIDA4DXOQVL4AUYAMZWX7724IPNVSCMTT3UIEBDZHUW7LQTQC
UCFOE6KJM4USAO3SATXQQQBF3H6ERZCEWIKTYYYSLJK5TASKZOVAC
JMUE7GSN6QDQZ6NDRB55MRJMKJN6LBD6MVQPKROYPDOIXM7I3XNQC
KKMFQDR43ZWVCDRHQLWWX3FCWCFA3ZSXYOBRJNPHUQZR2XPKWULAC
2XLZCWZCOFZGNAPSD7XNCYITKVY5WZW3OD7IXMC7WJQ5SBI7YHNQC
VHQCNMARPMNBSIUFLJG7HVK4QGDNPCGNVFLHS3I4IGNVSV5MRLYQC
D3FRDRWOY6VGMAOGR35GPX7QYBEHDT6J4JKUZCGDEFDPWXGHD3YQC
KAGFSWJCTX7VM7G6FHDYK2B2TRPWYVF337SLQVLOVHHOR7U5PMKQC
QYIFOHW3WDDQMK4ATY6IOSQRFHJOQ5QCPDKRC4GVGWLQEH4HGWVQC
JC64ZBDKHZ54FRG2HZ76PFVQYK4EIFLNU36KDQ762KMT2DG7M4HQC
IKAEZAWH4DBJ7TEHJ2ISUJLIQUIR2CSSHTMHJNI2YDK25FDBOWJQC
IR7TBR2467FVR4UX64IYDA6C6SPWN7AZLOWLVNCYUDGCABOG2NWQC
GQBUV2XOMEPMTXMPCBQWGGIUXGQDX77VTGPFIG6YT7G64ASOYHXQC
5O356ZWY6DCM3Y6VFZPYQY5AIHIN6JGZDGLXU5DL6LWTFNDDFPFQC
CVK6T5OZZPWGWZ4E2QQZKCOWZPC25EDWXZWLLTPBDDRGEQGADKNAC
7JAODGVLU6GEMEJTJL34QMYOCKWPFX22A4UH5SLSDGSIVIRETO7QC
QWWOAZ3P73XN74JBLI23YKM7KKRUCH55EMD7I6VPKG7B6DWZXB2QC
RP3AUX7TTWIG32D4UBGD6VVY5BN4367TGMPQMYB7WVBQA64SDKUAC
5MRLKZV574TCMNL5APG4XCHPK6CB36BI6KV3HMXOGD47WB5VKPTAC
print('reading notes from '..love.filesystem.getSaveDirectory()..'/'..Directory)
print('put any notes there (and make frequent backups)')
print_and_log('reading notes from '..love.filesystem.getSaveDirectory()..'/'..Directory)
print_and_log('put any notes there (and make frequent backups)')
log(2, 'save_links: no links; getting rid of .json if it exists')
print('no links; getting rid of .json if it exists')
print_and_log('save_links: no links; getting rid of .json if it exists')