Game engine crash with Arraymod + cap-object #38913

Closed
opened 2014-03-02 00:30:46 +01:00 by Karja Krähwald · 22 comments

System Information
Windows 7 64, HD 5770

Blender Version
Broken: 2.69 release & hash: 4789793

Short description of error
Game engine cant handle Array modifier cap objects (start or end cap).

Exact steps for others to reproduce the error
GE_Arraycaps.blend Press P

Steps:

  • add any mesh object

  • give it an array-modifier

  • add another mesh object

  • select this new mesh as cap in the array modifier

  • press P to start the game engine

I get a crash with this setup.

**System Information** Windows 7 64, HD 5770 **Blender Version** Broken: 2.69 release & hash: 4789793 **Short description of error** Game engine cant handle Array modifier cap objects (start or end cap). **Exact steps for others to reproduce the error** [GE_Arraycaps.blend](https://archive.blender.org/developer/F79440/GE_Arraycaps.blend) Press P Steps: - add any mesh object - give it an array-modifier - add another mesh object - select this new mesh as cap in the array modifier - press P to start the game engine I get a crash with this setup.

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @karja

Added subscriber: @karja

Added subscriber: @joel.godin

Added subscriber: @joel.godin

Can confirm it on Mac OSX 10.9.2

Crash log attached.Crash.txt

Can confirm it on Mac OSX 10.9.2 Crash log attached.[Crash.txt](https://archive.blender.org/developer/F79449/Crash.txt)

Added subscriber: @ThomasDinges

Added subscriber: @ThomasDinges

Crash confirmed on Windows x64.

Crash confirmed on Windows x64.

Added subscriber: @PatriceBertrand

Added subscriber: @PatriceBertrand

Hello,
I gave it a try, and have pinpointed the bug, but only partially solved. Tried to upload the patch, but ended up with a new Task. Sorry, I don't master the process. See comments associated with task #39056. I copy hereunder:

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]which results inm_Polygons[-1]`, giving an incorrect pointer, which later crashes.

So it may be that fixing this correctly would imply deeper changes to derived mesh handling, beyond my capacity.
Hope someone more proficient can take it from there.

Hello, I gave it a try, and have pinpointed the bug, but only partially solved. Tried to upload the patch, but ended up with a new Task. Sorry, I don't master the process. See comments associated with task #39056. I copy hereunder: 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]` which results in `m_Polygons[-1]`, giving an incorrect pointer, which later crashes. So it may be that fixing this correctly would imply deeper changes to derived mesh handling, beyond my capacity. Hope someone more proficient can take it from there.

Added subscriber: @Inwader77

Added subscriber: @Inwader77

Added subscriber: @SakariNiittymaa

Added subscriber: @SakariNiittymaa

Still crashes in Blender 2.71. Windows 7 (x64). Any fix for this. Caps are very useful in digital meters and such...

Still crashes in Blender 2.71. Windows 7 (x64). Any fix for this. Caps are very useful in digital meters and such...
Member

Added subscriber: @JorgeBernalMartinez

Added subscriber: @JorgeBernalMartinez

Added subscriber: @panzergame

Added subscriber: @panzergame

Can't reproduce the exact bug in 2.76.1, there's no negative index (i checked in the function), but the object mesh is not converted to physics mesh.

Can't reproduce the exact bug in 2.76.1, there's no negative index (i checked in the function), but the object mesh is not converted to physics mesh.
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Aaron Carlisle self-assigned this 2015-10-20 18:59:41 +02:00
Member

Neither I or @panzergame can reproduce this anymore marking as resolved

Neither I or @panzergame can reproduce this anymore marking as resolved

@Blendify: The bug changed, it's why i can't reproduce the original/exact bug, but an other is created and can be put in this bug report.

@Blendify: The bug changed, it's why i can't reproduce the original/exact bug, but an other is created and can be put in this bug report.
Member

Please feel free to reopen

Please feel free to reopen

Changed status from 'Resolved' to: 'Open'

Changed status from 'Resolved' to: 'Open'
Aaron Carlisle removed their assignment 2015-10-20 19:46:50 +02:00
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Aaron Carlisle self-assigned this 2019-06-29 02:20:17 +02:00
Member

This task is being closed because the BGE has been removed in Blender 2.8.

This task is being closed because the BGE has been removed in Blender 2.8.
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
9 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#38913
No description provided.