Pinpointing crash related to T38913 and incomplete fix: crash avoided but array caps still not accounted for in collisions. #39056

Closed
opened 2014-03-08 22:17:25 +01:00 by Patrice Bertrand · 10 comments

#38913.patch
#38913: BGE crashes when array with caps.
Crash is in CcdPhysicsController.cpp:UpdateMesh
In 4 places in this module array caps cause RAS_Polygon *poly to be incorrect.
This patch fixes the crash by skipping in such cases,
but the result is that caps are not accounted for in collisions.
So some more work is probably needed.

It seems there is a correspondance of faces after modifier applied to original faces of object. But in the case of caps, the original face does not belong to the object, it belongs to another object. I think it may be the only case where a modifier takes bits of another object. In the correspondance, the faces that have been generated from the caps have a corresponding original face of -1. In the code, this translates to:
RAS_Polygon* poly= meshobj->GetPolygon(origi);
with origi being -1. GetPolygon() simply does return m_Polygons[num]`

So it may be that fixing this correctly would imply deeper changes to derived mesh handling, beyond my capacity.

[#38913.patch](https://archive.blender.org/developer/F80364/T38913.patch) #38913: BGE crashes when array with caps. Crash is in CcdPhysicsController.cpp:UpdateMesh In 4 places in this module array caps cause RAS_Polygon *poly to be incorrect. This patch fixes the crash by skipping in such cases, but the result is that caps are not accounted for in collisions. So some more work is probably needed. It seems there is a correspondance of faces after modifier applied to original faces of object. But in the case of caps, the original face does not belong to the object, it belongs to another object. I think it may be the only case where a modifier takes bits of another object. In the correspondance, the faces that have been generated from the caps have a corresponding original face of -1. In the code, this translates to: `RAS_Polygon* poly= meshobj->GetPolygon(origi);` with origi being -1. GetPolygon() simply does ` `return m_Polygons[num]` So it may be that fixing this correctly would imply deeper changes to derived mesh handling, beyond my capacity.

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @PatriceBertrand

Added subscriber: @PatriceBertrand

Added subscriber: @mont29

Added subscriber: @mont29
Member

Added subscriber: @JorgeBernalMartinez

Added subscriber: @JorgeBernalMartinez
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Member

@PatriceBertrand can you add this to the differential tool?

@PatriceBertrand can you add this to the differential tool?

Added subscriber: @panzergame

Added subscriber: @panzergame

@PatriceBertrand, currently the patch is useless because the negative index seems fixed in 2.76.1. See my comment in #38913.

@PatriceBertrand, currently the patch is useless because the negative index seems fixed in 2.76.1. See my comment in #38913.
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Aaron Carlisle self-assigned this 2015-10-20 18:56:26 +02:00
Member

Then it is safe to archive this and close the other task as resolved.

Then it is safe to archive this and close the other task as resolved.
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
5 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#39056
No description provided.