Page MenuHome

Game engine crash with Arraymod + cap-object
Closed, ArchivedPublic

Description

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

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.

Details

Type
Bug

Event Timeline

Karja Krähwald (karja) set Type to Bug.
Karja Krähwald (karja) created this task.
Karja Krähwald (karja) raised the priority of this task from to Needs Triage by Developer.

Can confirm it on Mac OSX 10.9.2

Crash log attached.

Thomas Dinges (dingto) triaged this task as Confirmed, Medium priority.

Crash confirmed on Windows x64.

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 T39056. 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.

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

Jorge Bernal (lordloki) lowered the priority of this task from Confirmed, Medium to Normal.

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.

Aaron Carlisle (Blendify) closed this task as Resolved.
Aaron Carlisle (Blendify) claimed this task.

Neither I or @Porteries Tristan (panzergame) can reproduce this anymore marking as resolved

@Aaron Carlisle (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.

Please feel free to reopen

Aaron Carlisle (Blendify) closed this task as Archived.Jun 29 2019, 2:20 AM
Aaron Carlisle (Blendify) claimed this task.

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