Page MenuHome

Fix for Collision Sensor - R6025 pure virtual function call crash when deleting objects in overlay scene
Closed, ResolvedPublicPATCH

Description

Patch for: T30477

This bug occurs when deleting an object in a different scene that is being checked by collision/touch sensor.

This happens because the Python API allows you to access and delete a game object that lives in a different scene to the active one, such as an overlay scene. However, when you delete an object from another scene the game engine tries to delete it from the active scene and not the scene that the object actually lives in. This causes errors as the object is not properly removed.

This patch fixes this by getting the scene the object lives in and deleting it through that scene, rather than the active scene.

Event Timeline

Hi, can you please attach a file showing the bug, or the link to a bug report?
Although I don't see anything wrong with your patch, I tried to reproduce the crash but couldn't make it.
Thanks

Hey, cheers for looking at it! There's an attachment on the tracker page where the bug was reported: http://projects.blender.org/tracker/?func=detail&aid=30477&group_id=9&atid=306 That should hopefully demonstrate the bug.

thanks, committed on rev. 50027

Dalai Felinto (dfelinto) changed the task status from Unknown Status to Resolved.Aug 19 2012, 10:45 PM