Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Encounters at a global level will cause random crashing when registering events. #3751

Open
fryguy503 opened this issue Dec 9, 2023 · 0 comments

Comments

@fryguy503
Copy link
Contributor

Global Handling of encounters works sometimes when hot reloaded but will crash zones sometimes. Reported by Elchar [Aussie Crew] on discord while assisting him with Pet work.

Crash Dump:

[12-09-2023 03:49:09] [Zone] [Crash] #0  0x00007f63ea6fbac6 in __GI___wait4 (pid=75093, stat_loc=stat_loc@entry=0x0, options=options@entry=0, usage=usage@entry=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:27
[12-09-2023 03:49:09] [Zone] [Crash] #1  0x00007f63ea6fba87 in __GI___waitpid (pid=<optimized out>, stat_loc=stat_loc@entry=0x0, options=options@entry=0) at waitpid.c:38
[12-09-2023 03:49:09] [Zone] [Crash] #2  0x000055d96abc619d in print_trace () at /home/eqemu/source/common/crash.cpp:284
[12-09-2023 03:49:09] [Zone] [Crash] #3  <signal handler called>
[12-09-2023 03:49:09] [Zone] [Crash] #4  0x000055d96aa870cd in Zone::GetShortName (this=<optimized out>) at /home/eqemu/source/zone/zone.h:166
[12-09-2023 03:49:09] [Zone] [Crash] #5  QuestParserCollection::GetQIByEncounterQuest (this=0x55d96bf3e660, encounter_name="pets", filename="") at /home/eqemu/source/zone/quest_parser_collection.cpp:946
[12-09-2023 03:49:09] [Zone] [Crash] #6  0x000055d96aa8d0ef in QuestParserCollection::EventEncounter (this=this@entry=0x55d96bf3e660, evt=evt@entry=EVENT_ENCOUNTER_LOAD, encounter_name="pets", data="", extra_data=extra_data@entry=0, extra_pointers=extra_pointers@entry=0x0) at /home/eqemu/source/zone/quest_parser_collection.cpp:517
[12-09-2023 03:49:09] [Zone] [Crash] #7  0x000055d96a730e96 in load_encounter (name="") at /home/eqemu/source/zone/lua_general.cpp:69

Code in question causing the issue:

// first look for /quests/zone/encounters/encounter_name.ext (precedence)
    filename = fmt::format("{}/{}/encounters/{}", path.GetQuestsPath(), zone->GetShortName(), encounter_name);
    ```

It is trying to use Global for the GetShortName I assume.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants