Crash in Game Engine collision detection #30630

Closed
opened 2012-03-22 00:19:24 +01:00 by Yan · 10 comments

Category: Physics

%%%Attached .blend crashes after falling object (Cylinder) goes out of view.

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
0 btQuantizedBvh::reportAabbOverlappingNodex(btNodeOverlapCallback*, btVector3 const&, btVector3 const&) const + 4
1 btBvhTriangleMeshShape::processAllTriangles(btTriangleCallback*, btVector3 const&, btVector3 const&) const + 41
2 btScaledBvhTriangleMeshShape::processAllTriangles(btTriangleCallback*, btVector3 const&, btVector3 const&) const + 259
3 btGImpactCollisionAlgorithm::gimpact_vs_concave(btCollisionObject*, btCollisionObject*, btGImpactShapeInterface*, btConca
4 btGImpactCollisionAlgorithm::gimpact_vs_shape(btCollisionObject*, btCollisionObject*, btGImpactShapeInterface*, btCollisi
5 0 + 4798760640

blend and full crash report attached.

If "Compound" under Physics->CollisionBounds for the Cube is turned off, it does not crash.
Triangle Mesh is set.%%%

**Category**: Physics %%%Attached .blend crashes after falling object (Cylinder) goes out of view. Exception Type: EXC_BAD_ACCESS (SIGSEGV) 0 btQuantizedBvh::reportAabbOverlappingNodex(btNodeOverlapCallback*, btVector3 const&, btVector3 const&) const + 4 1 btBvhTriangleMeshShape::processAllTriangles(btTriangleCallback*, btVector3 const&, btVector3 const&) const + 41 2 btScaledBvhTriangleMeshShape::processAllTriangles(btTriangleCallback*, btVector3 const&, btVector3 const&) const + 259 3 btGImpactCollisionAlgorithm::gimpact_vs_concave(btCollisionObject*, btCollisionObject*, btGImpactShapeInterface*, btConca 4 btGImpactCollisionAlgorithm::gimpact_vs_shape(btCollisionObject*, btCollisionObject*, btGImpactShapeInterface*, btCollisi 5 0 + 4798760640 blend and full crash report attached. If "Compound" under Physics->CollisionBounds for the Cube is turned off, it does not crash. Triangle Mesh is set.%%%
Author

Changed status to: 'Open'

Changed status to: 'Open'

%%%A simpler way to reproduce the crash is to turn on physics visualization when a soft body is marked as compound.
I'm pretty sure compound shapes aren't supported for soft bodies, it doesn't really make sense.

I've attached a patch that checks for rigid body type when building compound shapes and also grays out the compound option for soft bodies.
The behavior is still a little strange mainly because if compound is checked for a soft body that is parented to a rigid body, the soft body behaves like a rigid body.
It seems to be consistent with the way object types are treated in the game engine though .

%%%

%%%A simpler way to reproduce the crash is to turn on physics visualization when a soft body is marked as compound. I'm pretty sure compound shapes aren't supported for soft bodies, it doesn't really make sense. I've attached a patch that checks for rigid body type when building compound shapes and also grays out the compound option for soft bodies. The behavior is still a little strange mainly because if compound is checked for a soft body that is parented to a rigid body, the soft body behaves like a rigid body. It seems to be consistent with the way object types are treated in the game engine though . %%%

%%%I took a look at the patch, and I would change:
sub.active = not game.physics_type == 'SOFT_BODY'

to:
sub.active = game.physics_type != 'SOFT_BODY'

I'm assigning this report to Benoit to double-check the physics part of the patch.%%%

%%%I took a look at the patch, and I would change: sub.active = not game.physics_type == 'SOFT_BODY' to: sub.active = game.physics_type != 'SOFT_BODY' I'm assigning this report to Benoit to double-check the physics part of the patch.%%%
Member

Added subscriber: @brita

Added subscriber: @brita
Member

@Moguri no Benoit to double check...
I have reapplied the patch and tested: D610
I don't see a difference in your proposed changes (not a==b vs a!=b), maybe because I don't know enough of python.

@Moguri no Benoit to double check... I have reapplied the patch and tested: [D610](https://archive.blender.org/developer/D610) I don't see a difference in your proposed changes (not a==b vs a!=b), maybe because I don't know enough of python.

@brita moguri's suggestion is just a style nitpick :)

@brita moguri's suggestion is just a style nitpick :)
Member

The patch is ok, including the physics part.

The patch is ok, including the physics part.

This issue was referenced by 5640131c20aaf040a41a65fc9d6991ce6e9b5c0c

This issue was referenced by 5640131c20aaf040a41a65fc9d6991ce6e9b5c0c
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Member

Closed by commit 5640131c20.

Closed by commit 5640131c20.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#30630
No description provided.