(iTaSC) Assertion failure in jntarray.cpp on Linux #31430

Closed
opened 2012-05-12 20:46:20 +02:00 by Felix Nawothnig · 10 comments

%%%Still present in blender-2.63a-linux-glibc27-i686.

The attached file causes an immediate assertion failure when the IK solver is switched to iTaSC on Linux. The model works fine on Windows.

Due to the fact that I am currently working with the code in question and I would probably not try to reduce the testcase to track this bug I didn't bother to do it for this submission...

I am currently working on Windows but I'll try to debug this if I have some time (I have to look how to set up a blender development environment on Linux first).%%%

%%%Still present in blender-2.63a-linux-glibc27-i686. The attached file causes an immediate assertion failure when the IK solver is switched to iTaSC on Linux. The model works fine on Windows. Due to the fact that I am currently working with the code in question and I would probably not try to reduce the testcase to track this bug I didn't bother to do it for this submission... I am currently working on Windows but I'll try to debug this if I have some time (I have to look how to set up a blender development environment on Linux first).%%%

Changed status to: 'Open'

Changed status to: 'Open'

%%%Ah, I forgot the actual assertion failure:

blender: intern/itasc/kdl/jntarray.cpp:83: double& KDL::JntArray::operator()(unsigned int, unsigned int): Assertion `i<size&&j==0' failed.
Aborted
%%%

%%%Ah, I forgot the actual assertion failure: blender: intern/itasc/kdl/jntarray.cpp:83: double& KDL::JntArray::operator()(unsigned int, unsigned int): Assertion `i<size&&j==0' failed. Aborted %%%

%%%I attached a reduced testcase which triggers another (similar) assertion failure - I attached a patch which fixes that bug so that the reduced test case again seems to trigger the original issue.%%%

%%%I attached a reduced testcase which triggers another (similar) assertion failure - I attached a patch which fixes that bug so that the reduced test case again seems to trigger the original issue.%%%

%%%Oh, and it should be noted that although the (patched) bug is a non-issue if the assertion is removed (as in the windows builds) the real one actually causes invalid memory access.%%%

%%%Oh, and it should be noted that although the (patched) bug is a non-issue if the assertion is removed (as in the windows builds) the real one actually causes invalid memory access.%%%

%%%Committed your patch. Still these assertions should be disabled in official builds.

Sergey, it seems that at least in the linux buildbot configuration -DNDEBUG was left out, and this report seems to indicate the same was done for the official release. Could we add that back? It can make quite a performance difference too in some of the code.%%%

%%%Committed your patch. Still these assertions should be disabled in official builds. Sergey, it seems that at least in the linux buildbot configuration -DNDEBUG was left out, and this report seems to indicate the same was done for the official release. Could we add that back? It can make quite a performance difference too in some of the code.%%%

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

%%%Sorry, but it is still open - my patch fixes assertions which got triggered by my reduced TC (which are trivial, with NDEBUG there would be no problem) - so that you can actually use the TC to debug the bug in question.

The true one is caused by (I believe) a mismatch between what blender thinks how many DoFs exist and what iTaSC thinks... (IIRC, can't look it up this second) I will continue this when I'm not sitting in a train. :) But it's still there, and it can potentially crash the app with NDEBUG.%%%

%%%Sorry, but it is still open - my patch fixes assertions which got triggered by my reduced TC (which are trivial, with NDEBUG there would be no problem) - so that you can actually use the TC to debug the bug in question. The true one is caused by (I believe) a mismatch between what blender thinks how many DoFs exist and what iTaSC thinks... (IIRC, can't look it up this second) I will continue this when I'm not sitting in a train. :) But it's still there, and it can potentially crash the app with NDEBUG.%%%
Member

%%%Indeed the UniHuman blend is still crashing, this time because one of the end effector (the bone with the IK constraint) is a fixed bone with no joint. That is causing access to invalid index in the joint array when evaluating the pose of the end effector. I've fixed this by changing the API to return a pointer instead of a reference, this way NULL pointer can be returned instead of crashing when the index is wrong. The fix in in revision 47561.%%%

%%%Indeed the UniHuman blend is still crashing, this time because one of the end effector (the bone with the IK constraint) is a fixed bone with no joint. That is causing access to invalid index in the joint array when evaluating the pose of the end effector. I've fixed this by changing the API to return a pointer instead of a reference, this way NULL pointer can be returned instead of crashing when the index is wrong. The fix in in revision 47561.%%%
Member

%%%by the way, thanks for sharing this impressive human armature. It allows to demonstrate the advantages of iTaSC: much faster in simulation mode, better mixing of constraints, natural movements (no flipping). %%%

%%%by the way, thanks for sharing this impressive human armature. It allows to demonstrate the advantages of iTaSC: much faster in simulation mode, better mixing of constraints, natural movements (no flipping). %%%

%%%Well, credit for the model itself goes to someone else: http://unihuman.yolasite.com/

We just restructured the bones, added IK targets, added IK constraints (which are obviously not done in your version) ... and yes - it demonstrates all of the points you mentioned... which are exactly the reasons why we went the Blender + iTaSC approach for what we wanted to do.

In case you are curious - this is a preliminary result ... realtime (IK) animation from optical motion capture:

http://flexo.sipsik.net/recording_hampelman.mp4%%%

%%%Well, credit for the model itself goes to someone else: http://unihuman.yolasite.com/ We just restructured the bones, added IK targets, added IK constraints (which are obviously not done in your version) ... and yes - it demonstrates all of the points you mentioned... which are exactly the reasons why we went the Blender + iTaSC approach for what we wanted to do. In case you are curious - this is a preliminary result ... realtime (IK) animation from optical motion capture: http://flexo.sipsik.net/recording_hampelman.mp4%%%
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
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
3 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#31430
No description provided.