electron-userland / electron-json-storage

:package: Easily write and read user settings in Electron apps
1.43k stars 79 forks source link

File has around a thousand <0x00> appended to the end of nearly intact data #129

Open Nantris opened 5 years ago

Nantris commented 5 years ago

<0x00> is an invalid character code as I understand it. This is the first time I've witnessed this occur.

It looks like possibly the write was interrupted, as towards the end of my file suddenly JSON ends and the <0x00>s begin. Probably outside the scope of this module, however on the off chance this was caused by this module and not the system, here's an issue for anyone else who sees this to update.

electron-json-storage@4.1.5 Windows 7 JSON File size: ~2.5mb

jviotti commented 5 years ago

Hey @Slapbox ,

That is indeed super strange. I did some research and found some interesting things that seem related:

Assuming you can reproduce the problem, it might be worth testing different Electron versions shipping with different Node.js versions.