charon-unity3d icon indicating copy to clipboard operation
charon-unity3d copied to clipboard

Data fails to update

Open JamesMac64 opened this issue 4 years ago • 16 comments

I am having an odd issue (Unity 2020.3.20f1) which started with the xml returning 0 values for everything (strings are just blank). It was working fine until yesterday, and some xml tables still load fine, such as the localization data. Now, I have gone so far as to delete the data from the problem table that I am working on (there are others that now do the same thing), and replace it with a single test entry. I have copied the gdml file to streaming assets and even opened it in the browser and confirmed they have just the test entry. But when I run the source, I get the original 343 entries with blank data. Any ideas?

JamesMac64 avatar Oct 27 '21 16:10 JamesMac64

Hi @JamesMac64! Did you try to inspect gdml file for data? Is it there? You could use https://codebeautify.org/xmlviewer for better formatting.

deniszykov avatar Oct 27 '21 16:10 deniszykov

Yes, and the data is present. What is very odd is that it had 343 entries in that table, and as part of my testing to find the cause of the issue, I deleted the table contents and then restarted everything, loaded it back up and the table showed empty. I added in a test entry, and yet debug output is still showing 343 entries with 0 data for the fields. But the Id field is accurate. image

JamesMac64 avatar Oct 27 '21 18:10 JamesMac64

Ignore the closed, I miss-clicked, sorry.

JamesMac64 avatar Oct 27 '21 18:10 JamesMac64

This is kinda strange. Could you run validation Home -> Validate and attach logs from <project-path>\Library\Charon\Logs\. Thanks.

deniszykov avatar Oct 27 '21 18:10 deniszykov

Thank you for the help so far. Here are the two log files that Validate generated. [14268].charon.unity.log [22060].charon.unity.log

JamesMac64 avatar Oct 27 '21 18:10 JamesMac64

Oh, if this helps, here is my debug log that is generated when it tries to load the data from that table.
ItemList.log

JamesMac64 avatar Oct 27 '21 18:10 JamesMac64

No errors and warnings in logs.

You could:

  1. export data from this table previous version of .gdml file in json format, inspect it for correctness
  2. close editor
  3. open new/broken .gdml
  4. delete(cut) this table in .gdml file under element
  5. restart editor
  6. re-import data from step 1 via import wizard

this should help.

bonus: also export to Excel is good tool for finding issues with gamedata

deniszykov avatar Oct 27 '21 19:10 deniszykov

Also if you work on same file in parallel there is merge conflict or merge fail is possible.

deniszykov avatar Oct 27 '21 19:10 deniszykov

Interestingly, the gdml file only has the test item in it. I did beautify it, before resaving it without the table. Does Unity 2020 cache this somewhere?

JamesMac64 avatar Oct 27 '21 19:10 JamesMac64

I went through the process, and just tested it. I am back to 343 items, but the fields are all blank.

JamesMac64 avatar Oct 27 '21 19:10 JamesMac64

Does Unity 2020 cache this somewhere? Nop, file is edited in-place by editor. You could observe it in logs.

2021-10-27 14:23:36,990 [1] INFO  Charon.Program - Validating data in 'file:///F:/SELive/Assets/StreamingAssets/SEData.gdml' with 'None' options.

I went through the process Data were fine in export file? Does it imported correctly?

Also I could recommend to Home->Backup file as JSON and try to load it in code with Format.Json. Maybe it is a bug with XML.

deniszykov avatar Oct 27 '21 20:10 deniszykov

Still did not work. The data is in there, but when it reads it into the dictionary, the fields are all empty of values. I'll check back tomorrow on it. I am getting frustrated and it doesn't make any sense. It was working perfectly, the data had not been changed in the last 2 days, so there must be something else going on somewhere. Thank you for all of the help. I will figure it out eventually. More so since the newer tables are all working still, just that table broke. That table was the very first one I created in Charon.

JamesMac64 avatar Oct 27 '21 20:10 JamesMac64

If you fail to find a reason for this error tomorrow, I could assist you in debug. You could email me [email protected].

deniszykov avatar Oct 27 '21 20:10 deniszykov

@JamesMac64 any updates on this issue?

deniszykov avatar Oct 29 '21 17:10 deniszykov

I got a bit angry and took a break. Some other things are going on at the same time, we lost our only tester (previous got covid and passed away) and too much at once with conflicting changes in the code. I did find out it was something with characters in the data from another dev using Open Office instead of MS Excel. By removing all of the data from all of the tables, then adding it back in using excel from a backup copy that I had in xmls format, that table worked again.

JamesMac64 avatar Oct 29 '21 18:10 JamesMac64

we lost our only tester (previous got covid and passed away)

This is terrible news. I hope you can sort it out with all that happened.

I did find out it was something with characters in the data from another dev using Open Office instead of MS Excel

And if you have time, please send that corrupted piece of data.

Good luck with your project.

deniszykov avatar Oct 29 '21 18:10 deniszykov