Skip to content

Components Framework Error #3

Description

@pcelaya

Hello @pepcots,

I was fixing the Component framework of your Engine and I trembled with a strange error. All the commented code is in the COMPONENTS branch of our engine as I don't want to merge it yet until it works perfectly fine.
The thing is that Components are created in the ModelLoader::loadfromFile() method that returns a GameObject with its necessary components but once I try to add this GameObject as a child of scene->root (using emplaceChild) I find that the Components of the added GameObject have lost their owner pointer (that points to the GameObject created with them). The pointer is not NULL but is instead an strange name that I suspect is binary or something similar.
The Error happens when I call the method owner()->GetComponent() and does not find the Component because the owner() returns something strange. The catch here is that the owner()->GetComponent() that ends the code is one in the Mesh::drawModel() function but (strangely) is not the first I call.
I think that the problem lies in that in some point the code is not correctly moving the pointers but I am unable to find where or why.

Thank you,
Pol Celaya

Metadata

Metadata

Assignees

No one assigned

    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