X Tutup
Skip to content

RuntimeError: access violation - no RTTI data #2

@OmegaK2

Description

@OmegaK2

It was though to find code that actually replicates this issue, because at first it seemed to happen quite randomly. There might be more cases then this one.

It seems to happen when passing/storing playerinfo objects to multiple functions; I'm guessing they go out of scope when the first function finishes execution:

import command_c

def h(playerinfo, command):
    test(playerinfo)
    test(playerinfo)

def test(playerinfo):
    e = playerinfo.get_edict()
    e.get_index()
    print(e)

def load():
    command_c.register_client_command_filter(h)

def unload():
    command_c.unregister_client_command_filter(h)

Running this code will result in:

<entity_c.CEdict object at 0x12345678>
(Traceback here)
RuntimeError: access violation - no RTTI data

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    X Tutup