Advertisement

Sharing data from main app to Python module

Started by July 02, 2004 02:28 PM
-1 comments, last by joeG 20 years, 4 months ago
Let me try this thread again in a better forum... My game engine is typical of today's games; logic is going to be written in Python, the rendering code in C++. All is pretty much done (except a lot of real testing of the Python binding), except one tiny problem :-) The main application deserializes an object from a file and then sends it back to the caller which happens to be some code in the Python extension module. Any attempt to read from that data results in a segmentation fault. I tried an experiment with one of the C++ classes that was declared and defined in the header file and all went well ( I could read from the data sent from the application). Therefore I suspect that the problem is with the symbol table of the module not being properly loaded when the module is dlopen'd. A look at the symbols in the Python extension reveals that the vtable was defined for the class that worked, but not so for the other classes that I tried. So I guess the question is: "How does one ensure that the module gets a copy of the symbol table from the application?" Thanks for your time,
joeG

This topic is closed to new replies.

Advertisement