[DiscordArchive] so when it calls SetMap on teleport, the old map (old m_currMap) is already deleted?
[DiscordArchive] so when it calls SetMap on teleport, the old map (old m_currMap) is already deleted?
Archived author: Foe • Posted: 2024-07-14T13:21:50.635000+00:00
Original source
testing now
![[Image: image.png?ex=690bf84c&is=690aa6cc&hm=aaa...6b7e0ad27&]](https://cdn.discordapp.com/attachments/870722120458600528/1262036464854761603/image.png?ex=690bf84c&is=690aa6cc&hm=aaabc76fa6785be0b22a887cd74ca7e73a4d3763c020532b4f612026b7e0ad27&)
Archived author: Foe • Posted: 2024-07-14T13:22:20.767000+00:00
Original source
![[Image: image.png?ex=690bf84c&is=690aa6cc&hm=aaa...6b7e0ad27&]](https://cdn.discordapp.com/attachments/870722120458600528/1262036464854761603/image.png?ex=690bf84c&is=690aa6cc&hm=aaabc76fa6785be0b22a887cd74ca7e73a4d3763c020532b4f612026b7e0ad27&)
Archived author: Foe • Posted: 2024-07-14T13:22:26.078000+00:00
Original source
Yeah we 100% hit closing the Lua state first
Archived author: Foe • Posted: 2024-07-14T13:28:26.429000+00:00
Original source
so I think we need to check that E even exists before clearing the event processor
Archived author: Tea • Posted: 2024-07-14T13:29:55.461000+00:00
Original source
but E is deleted when Map is deleted
Archived author: Tea • Posted: 2024-07-14T13:30:18.896000+00:00
Original source
you cannot safely access either of (old)eventProcessor->E or m_currMap
Archived author: Foe • Posted: 2024-07-14T13:30:49.048000+00:00
Original source
yeah, that's why I don't really understand why it happens when there's multiple people in the bg
Archived author: Foe • Posted: 2024-07-14T13:31:32.456000+00:00
Original source
but it seems like a bit of an edge case for BG's that the map gets deleted before the player is set to a new map
Archived author: Foe • Posted: 2024-07-14T13:33:58.044000+00:00
Original source
alright yeah, checking that eventMgr exists fixes the crash, but it feels super hacky
Archived author: Foe • Posted: 2024-07-14T13:35:32.697000+00:00
Original source
```C++
ElunaEventProcessor::~ElunaEventProcessor()
{
{
RemoveEvents_internal();
}
if (obj && E->eventMgr)
E->eventMgr->processors.erase(this);
}```