Im having problems getting an object created in python (through a Decorator class) to work C++ side. The class is essentially a container for my dispatcher that has a pointer to a python function.
Im faily sure its not the class itself that is causing the crash, as it crashes when it tried to call a function from the class (NULL pointer).
The class inheirts a base DispachCallback class, but Im sure I added everything to make upcasting work correct:
However, I persist to get access violation like im reading a NULL pointer. The dispatcher itself works 100%, as im using it to process the base of my networking protocol. I just need to script the processing of the higher-level messages in my protocol through scripts.
Any ideas of what could be going wrong?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Its almost like its deleting the object python side before I can call it C++ when I need to dispatch a network event.
It works perfectly fine when I call it in the decorator function that binds it to a key. I never had a problem with this in your v1.0, did you add some type of new Garbage Collection?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Im having problems getting an object created in python (through a Decorator class) to work C++ side. The class is essentially a container for my dispatcher that has a pointer to a python function.
Im faily sure its not the class itself that is causing the crash, as it crashes when it tried to call a function from the class (NULL pointer).
The class inheirts a base DispachCallback class, but Im sure I added everything to make upcasting work correct:
------------------------------------------------------------
PythonQt::self()->registerCPPClass("pyNetworkDispatchCallback", NULL, NULL, PythonQtCreateObject<pyNetworkDispatchCallbackWrapper>);
PythonQt::self()->addParentClass("pyNetworkDispatchCallback", "IDispatchCallback", PythonQtUpcastingOffset<pyNetworkDispatchCallback, IDispatchCallback>());
----------------------------------------------------------
However, I persist to get access violation like im reading a NULL pointer. The dispatcher itself works 100%, as im using it to process the base of my networking protocol. I just need to script the processing of the higher-level messages in my protocol through scripts.
Any ideas of what could be going wrong?
Its almost like its deleting the object python side before I can call it C++ when I need to dispatch a network event.
It works perfectly fine when I call it in the decorator function that binds it to a key. I never had a problem with this in your v1.0, did you add some type of new Garbage Collection?