Skip to content

Run-Time Check Failure and crash on event registering bad creature id #225

@Pursche

Description

@Pursche

Hi! I got the following error which led to a realm crash when I accidentally registered a bad creature id to an event:

C:\Users*myUser*\Desktop\elunawotlk\src\server\game\LuaEngine\LuaEngine.cpp:1062 in Eluna::Register ASSERTION FAILED:
guid != 0
c:\users*myUser*\desktop\elunawotlk\src\common\debugging\wheatyexceptionreport.cpp(1253) : Run-Time Check Failure #2 - S
and then it seems to repeat the wheatyexceptionreport.cpp line, appended on the last one, possibly recursively since it spammed my console with it without newlines

Reproduction steps:
Call RegisterCreatureEvent(BOSSID, 1, MyCreature.EnterCombat) when BOSSID is set to "00000" and MyCreature.EnterCombat is a valid function

This happened on a version of Eluna manually merged into TrinityCore, both of them were the latest versions from the beginning of March when I did the merge. I really don't think it's a merge problem though.

While I realize that this is 100% my fault and that I can easily avoid it by not using 00000 as a placeholder ID in my code, I figured this leading to a crash might be of interest to you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions