jgfoster / Jade

Jade is an Alternative Development Environment (IDE) for GemStone/S that runs on Microsoft Windows
MIT License
5 stars 2 forks source link

Login list can be lost if Jade crashes #47

Closed feldti closed 2 years ago

feldti commented 4 years ago

Another pretty annoying problem is, that the list of Gemstone-Server (Jade Login) is very often reseted, so that only the default entry is available.

feldti commented 4 years ago

This is for example done, if I finish a Jade Login window and a Jade is running

thelliez commented 4 years ago

Yes same problem here. In case of Jade crash (and it happens fairly often on Windows 10 running on top of VMWare Fusion on a Mac), all the Jade login info are lost. I have to rekey all the session info.

jgfoster commented 4 years ago

The user configuration data is stored by JadeLoginShell>>saveData at %USERPROFILE%\AppData\Roaming\JadeData.gss (based on the registry entry at Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\AppData). It is read when JadeLoginShell opens and if there is an error opening or reading the file then we use defaults.

I've tried killing Jade (using the Task Manager) and it doesn't harm the file. Any ideas of how it could become corrupt? Perhaps Jade dies when trying to write it?

As a proposed fix I'll write a new file, delete the old one, and then rename the new one to the expected name.

jgfoster commented 4 years ago

The code in 2.3.16 tries to handle crash during writing the data.

jgfoster commented 3 years ago

@feldti in jgfoster/Jade.bak#278:

Perhaps it would be nice, if the connection information are not saved automatically (somehow), but by using a simple button. I am still loosing (again and again) all my connection informations over the time and have to enter them again and again.

Today at least three times this morning - a simple button would be nice and no automatically saving

jgfoster commented 3 years ago

@feldti, To understand this better, could you try launching Jade and, if the connection list is good, look at the path shown in my "May 3, 2020" comment and make a copy of that file. Then, when the connection list is bad quit Jade, copy the file back into the provided location and relaunch Jade. It would also help to see what the last modified timestamp is on the file and see if we can correlate it with a launch or quit of Jade. Thanks!

feldti commented 2 years ago

Ok, I lost the list of database connection information several times today and here is the way, I was able to make it reproducable:

a) start Jade, define a database connection , login , logout and close the Jade Login window b) start jade again, you will see your database connection from (a), do a login into Gemstone with that connection c) get the task manager and kill jade ... goto (a) and you see the default one entry list of database connections, all previous entries are lost

jgfoster commented 2 years ago

I've tried the steps you describe and am not able to reproduce the problem. I've tried with Jade 2.4.14 on Windows 10 21H1. Did you see my comment from 19 Feb 2021 and 03 May 2020?

feldti commented 2 years ago

Ok, I looked at that file in the userprofile (jade.gss) ... normally the size of this file is around 1KByte. When I terminate Jade (when working in a database by using the task manager), the Jade.gss file has a size of 52 KByte (and contains much more data). After starting Jade again it has at once a size of 1 KByte with the initial one-entry-lis JadeData.zip t.