Deathlog

Deathlog

2M Downloads

[Bug] Localization Error

Starlynk1 opened this issue ยท 9 comments

commented

Getting this error that appears to be from a spelling error in the file.

Changed line 23 to _index instead of __index

`2x Deathlog/Localization/localization.lua:23: C stack overflow
[string "@Deathlog/Localization/localization.lua"]:23: in function <Deathlog/Localization/localization.lua:22>
[string "@Deathlog/Localization/localization.lua"]:23: in function <Deathlog/Localization/localization.lua:22>
[string "@Deathlog/Localization/localization.lua"]:23: in function <Deathlog/Localization/localization.lua:22>
[string "@Deathlog/Localization/localization.lua"]:23: in function <Deathlog/Localization/localization.lua:22>
[string "@Deathlog/Localization/localization.lua"]:23: in function <Deathlog/Localization/localization.lua:22>
[string "@Deathlog/Localization/localization.lua"]:23: in function <Deathlog/Localization/localization.lua:22>
[string "@Deathlog/Localization/localization.lua"]:23: in function <Deathlog/Localization/localization.lua:22>
[string "@Deathlog/Localization/localization.lua"]:23: in function <Deathlog/Localization/localization.lua:22>
[string "@Deathlog/Localization/localization.lua"]:23: in function <Deathlog/Localization/localization.lua:22>
[string "@Deathlog/Localization/localization.lua"]:23: in function <Deathlog/Localization/localization.lua:22>
[string "@Deathlog/Localization/localization.lua"]:23: in function <Deathlog/Localization/localization.lua:22>
[string "@Deathlog/Localization/localization.lua"]:23: in function <Deathlog/Localization/localization.lua:22>
...
[string "@Deathlog/Localization/localization.lua"]:23: in function <Deathlog/Localization/localization.lua:22>
[string "@Deathlog/Localization/localization.lua"]:23: in function <Deathlog/Localization/localization.lua:22>
[string "@Deathlog/Localization/localization.lua"]:23: in function <Deathlog/Localization/localization.lua:22>
[string "@Deathlog/Localization/localization.lua"]:23: in function <Deathlog/Localization/localization.lua:22>
[string "@Deathlog/Localization/localization.lua"]:23: in function <Deathlog/Localization/localization.lua:22>
[string "@Deathlog/Localization/localization.lua"]:23: in function <Deathlog/Localization/localization.lua:22>
[string "@Deathlog/Localization/localization.lua"]:23: in function <Deathlog/Localization/localization.lua:22>
[string "@Deathlog/Localization/localization.lua"]:23: in function <Deathlog/Localization/localization.lua:22>
[string "@Deathlog/Localization/localization.lua"]:23: in function <Deathlog/Localization/localization.lua:22>
[string "@MoveAny/libs/db.lua"]:684: in function <MoveAny/libs/db.lua:679>

Locals:
table =

{
death_alert_default_fall_message = " the fell to
death at lvl in ."
death_alert_default_fire_message = " the has died from fire.
at lvl in ."
death_alert_font = "Fonts\blei00d.TTF"
death_alert_default_slime_message = " the has died from slime.
at lvl in ."
of_word = "of"
death_alert_default_message = " the has been slain
by at lvl in ."
main_font = "Fonts\FRIZQT__.TTF"
instance_tbl =
{
}
mini_log_font = "Fonts\blei00d.TTF"
corpse_word = "Corpse"
class_font = "Fonts\blei00d.TTF"
menu_font = "Fonts\blei00d.TTF"
tab_table =
{
}
deadliest_creature_container_font = "Fonts\blei00d.TTF"
deathlog_zone_tbl =
{
}
death_alert_default_fatigue_message = " the has died from fatigue.
at lvl in ."
death_alert_default_lava_message = " the drowned in lava.
at lvl in ."
death_alert_default_drown_message = " the drowned
at lvl in ."
}
key = "GetPoint"
(*temporary) =
{
death_alert_default_fall_message = " the fell to
death at lvl in ."
death_alert_default_fire_message = " the has died from fire.
at lvl in ."
death_alert_font = "Fonts\blei00d.TTF"
death_alert_default_slime_message = " the has died from slime.
at lvl in ."
of_word = "of"
death_alert_default_message = " the has been slain
by at lvl in ."
main_font = "Fonts\FRIZQT__.TTF"
instance_tbl =
{
}
mini_log_font = "Fonts\blei00d.TTF"
corpse_word = "Corpse"
class_font = "Fonts\blei00d.TTF"
menu_font = "Fonts\blei00d.TTF"
tab_table =
{
}
deadliest_creature_container_font = "Fonts\blei00d.TTF"
deathlog_zone_tbl =
{
}
death_alert_default_fatigue_message = " the has died from fatigue.
at lvl in ."
death_alert_default_lava_message = " the drowned in lava.
at lvl in ."
death_alert_default_drown_message = " the drowned
at lvl in ."
}
(*temporary) = defined @Deathlog/Localization/localization.lua:22
(*temporary) =
{
death_alert_default_fall_message = " the fell to
death at lvl in ."
death_alert_default_fire_message = " the has died from fire.
at lvl in ."
death_alert_font = "Fonts\blei00d.TTF"
death_alert_default_slime_message = " the has died from slime.
at lvl in ."
of_word = "of"
death_alert_default_message = " the has been slain
by at lvl in ."
main_font = "Fonts\FRIZQT__.TTF"
instance_tbl =
{
}
mini_log_font = "Fonts\blei00d.TTF"
corpse_word = "Corpse"
class_font = "Fonts\blei00d.TTF"
menu_font = "Fonts\blei00d.TTF"
tab_table =
{
}
deadliest_creature_container_font = "Fonts\blei00d.TTF"
deathlog_zone_tbl =
{
}
death_alert_default_fatigue_message = " the has died from fatigue.
at lvl in ."
death_alert_default_lava_message = " the drowned in lava.
at lvl in ."
death_alert_default_drown_message = " the drowned
at lvl in ."
}
(*temporary) = "GetPoint"
(*temporary) = "C stack overflow"
localeMap =
{
itIT =
{
}
ptBR =
{
}
ruRU =
{
}
enGB =
{
}
koKR =
{
}
zhCN =
{
}
enUS =
{
}
default =
{
}
esMX =
{
}
esES =
{
}
frFR =
{
}
zhTW =
{
}
deDE =
{
}
}
`

commented

This looks related to MoveAny. Probably a global symbol conflict

commented

I'm just an amateur at this whole coding thing, so I removed the extra _ from the line and no more bugsack errors. Does the localization still work? Not really sure, I use english locale, but maybe I can switch to another language and see. Thanks for checking.

commented

The issue is that MoveAny is going through all the global variables and checking their GetPoint Key (which wouldn't exist) but the localization code in our repo has a default mechanism. Removing the _, effectively removes that mechanism. @jhj0517 is there risk if we remove the default?

commented

@Starlynk1 I tried to test on the English client but could not reproduce the same error.
Can you give me more details on how you fixed the bug by removing the _?

commented

To reproduce 1) use commit 56058c0 (current master as of posting) and run MoveAny https://www.curseforge.com/wow/addons/moveany

commented

On the same topic @jhj0517 , any issue with changing the localization variable L to Deathlog_L? I'm worried about other collisions as well

commented

honestly not sure, I just saw that the _index line on localization.lua line 23 had two underscores. I've not seen that before (again, not a good coder person) so removed what looked to me like 1 too many underscores. That resolved the bugsack error, but not sure if the localization still works since I use english locale.

commented

@aaronma37

To reproduce 1) use commit 56058c0 (current master as of posting) and run MoveAny https://www.curseforge.com/wow/addons/moveany

I'll look into it. Thanks.

On the same topic @jhj0517 , any issue with changing the localization variable L to Deathlog_L? I'm worried about other collisions as well

It would definitely be better to use something like Deathlog_L.

commented

honestly not sure, I just saw that the _index line on localization.lua line 23 had two underscores. I've not seen that before (again, not a good coder person) so removed what looked to me like 1 too many underscores. That resolved the bugsack error, but not sure if the localization still works since I use english locale.

yeah its just some interesting lua syntax for metatables
https://www.lua.org/pil/13.4.1.html