Guild Roster Manager (GRM)

Guild Roster Manager (GRM)

3M Downloads

Probleme migrating database when updating from 1.985 to 1.986

Gastonite opened this issue · 6 comments

commented

I just updated addon to version R1.986 and i can't make it work again =(

Capture d’écran du 2023-09-27 23-34-04

and I have a Lua error:

Message: Interface/AddOns/Guild_Roster_Manager/GRM_Core.lua:5276: attempt to compare number with nil
Time: Wed Sep 27 23:36:55 2023
Count: 1
Stack: Interface/AddOns/Guild_Roster_Manager/GRM_Core.lua:5276: attempt to compare number with nil
[string "@Interface/AddOns/Guild_Roster_Manager/GRM_Core.lua"]:5276: in function `ConvertToStandardFormatDate'
[string "@Interface/AddOns/Guild_Roster_Manager/GRM_Patches.lua"]:8208: in function `databaseChangeFunction'
[string "@Interface/AddOns/Guild_Roster_Manager/GRM_Patches.lua"]:1596: in function `?'
[string "@Interface/AddOns/Guild_Roster_Manager/GRM_Patches.lua"]:1470: in function `SettingsCheck'
[string "@Interface/AddOns/Guild_Roster_Manager/GRM_Core.lua"]:1053: in function `LoadSettings'
[string "@Interface/AddOns/Guild_Roster_Manager/GRM_Core.lua"]:26930: in function `DataLoadDelayProtection'
[string "@Interface/AddOns/Guild_Roster_Manager/GRM_Core.lua"]:26904: in function <Interface/AddOns/Guild_Roster_Manager/GRM_Core.lua:26885>

Locals: day = ""
month = nil
year = nil
result = ""
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to compare number with nil"

commented

When looking in player.joinDateHist[i], at line 8208 of GRM_Patches.lu, I can see that it's a table that contains records that don't match with the expected date 3-tuple format:

 {
 1 = ""
 5 = 1694734455
 6 = true
 4 = "1694731478"
 7 = 2
}
commented

ok I was able to resolve the migration problem, the cause is that a officer that updated the addon to the latest version has banned a member (updating GRM_PlayersThatLeftHistory_Save with the new joinDateHist and rankHist format)

I could fix the problem by changing conditions in FixStandardFormatAndRankHistFormat

commented

Ah of course Github sends me emails at 2am saying this was reported, after my release lol. I'll check it out tomorrow. Thanks!

commented

One issue I see in your data is the joinDateHist[1][4] is a string epoch stamp when it should be the standardTimeFormat, ie "20230928" for Sep 28th, 2023, for example -- yet it has the epoch stamp as the string. You are upgrading to 1.986, and it's this function where it's failing? Also, the first index being a string is weird as that should never happen lol - So, I need to look into how this happened as well. I'll dig into this a little bit later today when I have the time.

commented

also, it's missing index 2 and 3 for month/day -- is this just a partial copy of the array or is it exactly what you saw in the player's joinDateHist table that you copied over?

commented

it's exactly the data I found in player.joinDateHist[i], Only one player was concerned, and that one was banned and its player data were synced to me from another guild officer who had installed a newer version of GRM (probably 1.986)