BGE 2.62 - R6205 pure virtual function call crash


I’m working on making a game with the BGE and Python, and I’ve stumbled across a problem. When testing the game, I found situation where Blender crashes and prints:

-pure virtual function call

… in the console. There are no Python errors. What my game does is allows for the adding and removal of the Player. The Player object is on another layer, and is added (scene.addObject) to the current scene, and then removed when needed. The conditions for the crash are met when I quickly delete the player and then re-add it.

I’m not sure if this is a common problem that could happen under any circumstances, or if it’s specific to the game I’m developing. If the latter, let me know if a .blend file is needed to figure out what’s going on. I googled the error and the top results said it was a runtime error related to Windows. I’m running Windows 7.

I haven’t figured out the reason for the crash. However, I managed to work around the problem by just putting the player object in the main layer in a remote location and disabling its functions and physics, and then just placing it where I needed it and re-activating it for gameplay (no adding/deleting required).

I haven’t seen such a crash, but if you can create a Testfile and add a Bug in the Bugtracker I’m pretty sure it will be fixed pretty soon.

Narrowed the bug down :wink:
BGE Collision Runtime Error.blend (72 KB)

Just posting if anyone here is interested. I will see about submitting it with a bug report.

Conditions for the crash:
-Start in the main scene
-Overlay another scene
-In overlayed scene, have a dynamic object with a collision sensor
-In the main scene, run a script that deletes an object that the collision sensor is detecting in the Overlayed scene.

It also happens with the Near sensor, and I imagine any sensor that detects KX_GameObjects.

Edit: Now it reads “R6025 -pure virtual function call”. Also added the report to the Bug Tracker.