[Issue#185] Losing Saved Settings

未分类 bolang 6个月前 (10-14) 44次浏览

Issue #185 | 状态: 已关闭 | 作者: GeerGuy | 创建时间: 2017-08-13

标签: 🐛 bug


Sometimes I lose the widgets that I previously selected and the other settings, like the Probe values and Jog settings. They are reset to defaults when the program is started again.

Using Windows 7 and CNCJS 1.97, but I have seen it happen with previous versions as well, maybe since 1.90.


评论 (8)

#1 – cheton 于 2017-08-15

If you’re running the app built with Electron, try removing the %AppData%\cncjs directory (e.g. c:\Users\Username\AppData\Roaming\cncjs) and try again. I guessed there might be a permission issue with your folder settings.

If you’re using a web browser, make sure your browser is not in “Incognito Mode” (i.e. private browsing), or the localStorage settings won’t persist after closing the browser.


#2 – GeerGuy 于 2017-08-15

I will try that, thanks.


#3 – cheton 于 2017-08-16

I had ever encountered issue that cncjs cannot persist system settings to c:\Users\\.cncrc on a Windows desktop due to incorrect permissions. Everything works fine after removing this file.


#4 – cheton 于 2017-08-27

Sometimes the localStorage won’t persist after refreshing or closing the window. ~~I will try to use electron-config to persist browser settings to disk when the app is refreshed or closed.~~

Related issues:
https://github.com/electron/electron/issues/1731
https://github.com/electron/electron/issues/526#issuecomment-245824406


#5 – cheton 于 2017-08-27

Found something strange in CNCjs 1.9.8, sometimes it will throw an error on app start when parsing the c:\Users\\AppData\Roaming\cncjs\cnc.json file, this file was used to persist local storage settings to disk (issue #41).

!image


#6 – cheton 于 2017-08-28

Fixed the bug using a debounced function and synchronous file writing (e.g. fs.writeFileSync), that will definitely fix the issue that caused a broken JSON output (https://github.com/cncjs/cncjs/commit/3ddb776fb7784a1eb266fe4afcf0968624251bdd)

!image


#7 – cheton 于 2017-08-28

Added a commit that will prompt the user for the corrupted workspace settings on program startup

!image


#8 – cheton 于 2017-08-31

Fixed in 1.9.9

See CNCjs 1.9.9 release notes at https://github.com/cncjs/cncjs/releases/tag/v1.9.9


原始Issue: https://github.com/cncjs/cncjs/issues/185

喜欢 (0)