Names reset on first save after server restartFixed

It appears that the first save after a server restart resets the "Id" and "Old" values of every data file entry to "null".  Here is what the data file looks like. During the server uptime, though, when we rename people, the data file updates on save. When they reconnect, if the server hasn't restarted, their name remains the same. I do have persistence set to true.

{
  "Renames": [
    {
      "Id": null,
      "Old": null,
      "New": "Omega"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Tanna"
    },
    {
      "Id": null,
      "Old": null,
      "New": "TIMMY"
    },
    {
      "Id": null,
      "Old": null,
      "New": "John"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Joster"
    },
    {
      "Id": null,
      "Old": null,
      "New": "JoePa"
    },
    {
      "Id": null,
      "Old": null,
      "New": "(OOC) GoldenQT"
    },
    {
      "Id": null,
      "Old": null,
      "New": "((drizoid))"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Prae"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Jade"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Bob"
    },
    {
      "Id": null,
      "Old": null,
      "New": "(OOC) Jaycc"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Reaghan"
    },
    {
      "Id": null,
      "Old": null,
      "New": "GM Greg"
    },
    {
      "Id": null,
      "Old": null,
      "New": "AndroidPanda"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Hazel"
    },
    {
      "Id": null,
      "Old": null,
      "New": "???"
    },
    {
      "Id": null,
      "Old": null,
      "New": "YuNgDeE"
    },
    {
      "Id": null,
      "Old": null,
      "New": "[OOC] Lukey"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Charlie"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Mr. EZ"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Dan E Clementine"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Walk E Clementine"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Daryl"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Jake"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Frank E Clementine"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Bunny Comb"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Zayn"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Jake"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Rah Fee Clementine"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Swifty E Clementine"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Drake"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Giovanni"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Cricket Clementine"
    },
    {
      "Id": null,
      "Old": null,
      "New": "bob ducca"
    },
    {
      "Id": null,
      "Old": null,
      "New": "James"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Cow Boy"
    },
    {
      "Id": null,
      "Old": null,
      "New": "OOC La Luna"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Wulfghar"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Tony"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Orion"
    },
    {
      "Id": null,
      "Old": null,
      "New": "(OOC)PentaZoned"
    },
    {
      "Id": null,
      "Old": null,
      "New": "(OOC)ookami"
    },
    {
      "Id": null,
      "Old": null,
      "New": "KanyeCult"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Chibz"
    },
    {
      "Id": null,
      "Old": null,
      "New": "(OOC)Saruna"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Meg L Clementine"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Frost E Clementine"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Ziggy"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Donovan"
    },
    {
      "Id": null,
      "Old": null,
      "New": "(OOC)  Kat"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Frankie"
    },
    {
      "Id": null,
      "Old": null,
      "New": "David"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Sirene"
    },
    {
      "Id": null,
      "Old": null,
      "New": "SharkBait"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Chunks McJagger"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Tarrnak"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Rush Campbell"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Tyler Curden"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Billy"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Jala Penos"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Victoria"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Guy"
    },
    {
      "Id": null,
      "Old": null,
      "New": "((Chunk but OOC))"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Jack Hemp"
    },
    {
      "Id": null,
      "Old": null,
      "New": "((Xavier))"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Lilith"
    },
    {
      "Id": null,
      "Old": null,
      "New": "((P2Peeps))"
    },
    {
      "Id": null,
      "Old": null,
      "New": "((AriSama))"
    },
    {
      "Id": null,
      "Old": null,
      "New": "((melon))"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Levi"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Chai"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Tom"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Vuk"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Kel Varnsen P.I."
    },
    {
      "Id": null,
      "Old": null,
      "New": "Rollechon"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Jimmy"
    },
    {
      "Id": null,
      "Old": null,
      "New": "DrakeRamain"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Dyson"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Blue"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Jack"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Harrowhark"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Ryan"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Taphos"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Xitos"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Vuk"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Jade"
    },
    {
      "Id": null,
      "Old": null,
      "New": "??"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Tanna"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Victoria"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Jimmy"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Sirene"
    },
    {
      "Id": null,
      "Old": null,
      "New": "James"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Levi"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Tanna"
    },
    {
      "Id": null,
      "Old": null,
      "New": "??"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Sirene"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Dyson"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Jade"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Vuk"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Tanna"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Victoria"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Jade"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Reaghan"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Dyson"
    },
    {
      "Id": null,
      "Old": null,
      "New": "??"
    },
    {
      "Id": null,
      "Old": null,
      "New": "James"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Sirene"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Vuk"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Levi"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Sirene"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Victoria"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Tanna"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Vuk"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Sirene"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Dyson"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Reaghan"
    },
    {
      "Id": null,
      "Old": null,
      "New": "James"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Tanna"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Vuk"
    },
    {
      "Id": null,
      "Old": null,
      "New": "James"
    },
    {
      "Id": null,
      "Old": null,
      "New": "??"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Sirene"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Chai"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Vuk"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Dyson"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Tanna"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Victoria"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Jimmy"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Sirene"
    },
    {
      "Id": null,
      "Old": null,
      "New": "??"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Orion"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Jade"
    },
    {
      "Id": null,
      "Old": null,
      "New": "James"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Reaghan"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Victoria"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Tanna"
    },
    {
      "Id": null,
      "Old": null,
      "New": "??"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Sirene"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Vuk"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Reaghan"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Jade"
    },
    {
      "Id": null,
      "Old": null,
      "New": "James"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Dyson"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Tom"
    },
    {
      "Id": null,
      "Old": null,
      "New": "??"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Tanna"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Reaghan"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Vuk"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Daryl"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Sirene"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Victoria"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Lilith"
    },
    {
      "Id": null,
      "Old": null,
      "New": "James"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Orion"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Jade"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Tom"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Scooter"
    },
    {
      "Id": null,
      "Old": null,
      "New": "Jade"
    },
    {
      "Id": "76561############",
      "Old": "milkbuns/abbycafe",
      "New": "Jade"
    }
  ]
}​

Thanks for the details! I did run into that when fixing issues, but it appeared to have been resolved. I'll take a look again to see what's up.

its the same here. no names are saved and the ids are also null in the data.

The data file seems to be alright as long as the server is online. 
After the restart all steam IDs has been changed to null; the point in time seems to be the initial saving:

Saved 94,937 ents, cache(0.17), write(0.05), disk(0.06). (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) Saving complete (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Until then the file is still ok, filled with steam IDs.
An adjustment/fix would be desirable!

I am facing the same issue and can confirm the behaviour described by AlIn. A solution would be very appriciated cause we restart our server once a day and the renames are very helpful for us. Thanks for your work.

QAGCpD0k9HDegve.png Wulf

Thanks for the details! I did run into that when fixing issues, but it appeared to have been resolved. I'll take a look again to see what's up.

Hi Wulf, 

i've now gotten it to work myself. On lines 84 and 85 I removed the "readonly" from "Id" and "Old". I think that on the first server save, the two can't be written to and that's where the null values come from.

Old: 
public readonly string Id;
public readonly string Old;​

New:
public string Id;
public string Old;​

Maybe you have a better idea how to solve the problem. For me it was important to get the plugin run.

LceHSudkB0v1Fy5.jpg Tranquilizer
Hi Wulf, 

i've now gotten it to work myself. On lines 84 and 85 I removed the "readonly" from "Id" and "Old". I think that on the first server save, the two can't be written to and that's where the null values come from.

Old: 
public readonly string Id;
public readonly string Old;​

New:
public string Id;
public string Old;​

Maybe you have a better idea how to solve the problem. For me it was important to get the plugin run.

Good catch. You're no longer having the issue then?

qPVZ8jVFjUuTI0x.png Wulf

Good catch. You're no longer having the issue then?

I've tested it on our Testserver and it seems to work fine so far. Our production server restarts in about seven hours and then i can give you feedback if it's also working there. Means when i wake up tomorrow. ;-)

7exKjkGK3zv9eMn.png Wulf

Good catch. You're no longer having the issue then?

This fix is also working on our production server. After reloading the plugin it is neccessary to rename once again and maybe it is a nice idea to tidy up the datafile / removing the null values.

LceHSudkB0v1Fy5.jpg Tranquilizer

This fix is also working on our production server. After reloading the plugin it is neccessary to rename once again and maybe it is a nice idea to tidy up the datafile / removing the null values.

Yup, I've had it ready, just wanted to make sure you were good. :)
fC7jgLbFyS7Nnju.png Wulf
Yup, I've had it ready, just wanted to make sure you were good. :)

Hey Wulf,

 

any fix on that?

Tryd the String thing. Config is fine.

I also get the new names in the logs after restart. But InGame the names are the old one... ANd /rename dont work anymore. I get the message "Your name is already XXX"

 

Would be nive to get help here :/

EyppQr8TD9zHfN7.png Kaho

Hey Wulf,

 

any fix on that?

Tryd the String thing. Config is fine.

I also get the new names in the logs after restart. But InGame the names are the old one... ANd /rename dont work anymore. I get the message "Your name is already XXX"

 

Would be nive to get help here :/

Yup, meant to post the fix from above, will do that today.
iRcqMFDuPtUp9NT.png Wulf
Yup, meant to post the fix from above, will do that today.

So... Found the Error. Not Working with "Clans" Plugin... After Reloading Clans Plugin the rename works. :-(

ph2AkugpLeJswLQ.png Kaho

So... Found the Error. Not Working with "Clans" Plugin... After Reloading Clans Plugin the rename works. :-(

This plugin saving its own data wouldn't be affected by another plugin. You were referring to their names showing in chat I assume though.

Yes. Chatnames and Teamnames where saved by the Clans:io plugin.

With killyous Clans plugin all working as needed :)

Locked automatically