FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

RuntimeError: access violation - no RTTI data · Issue #2 · Source-Python-Dev-Team/Source.Python · GitHub

Repository navigation

RuntimeError: access violation - no RTTI data #2

Closed

Description

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

Activity

  1. added a commit that references this issue on Sep 30, 2013
    05db157
  2. ghost assigned on Oct 5, 2013
  3. Ayuto commented on Oct 5, 2013

    Member

    Thanks for reporting and providing a fix! But I think the real problem is caused by the exposing part.

            CLASS_METHOD(CPlayerInfo,
                get_edict,
                "Returns the player's CEdict instance.",
                manage_new_object_policy()
            )

    It should actually be:

            CLASS_METHOD(CPlayerInfo,
                get_edict,
                "Returns the player's CEdict instance.",
                reference_existing_object_policy()
            )
  4. OmegaK2 commented on Oct 10, 2013

    ContributorAuthor

    yeah, better solution. Didn't see that. You should merge that change into the main branch

  5. Ayuto commented on Dec 26, 2013

    Member

    Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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


    Back | FazBrowse Home | New Git URL