trueaxis.com Forum Index trueaxis.com
True Axis Physics SDK Forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

foo.exe has triggered a breakpoint

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    trueaxis.com Forum Index -> Getting Started
View previous topic :: View next topic  
Author Message
Mouse



Joined: 24 Nov 2007
Posts: 6

PostPosted: Wed Nov 28, 2007 9:42 pm    Post subject: foo.exe has triggered a breakpoint Reply with quote

Whilst getting started I've been dropping a small cube onto a plane (which works fine.) For giggles and to try out a collision with bigger objects I made the plane 10000 square and the cube an odd size.

Running it gave me "foo.exe has triggered a breakpoint" and broke into the debugger which shows the breakpoint on line 18246 of zpta028.cpp

Not a biggie as I was just messing - but did wonder what it was about what i'd done that caused this?

Code at breakpoint.
Code:
TA\
_\
ASSERT
(
ll\
OllOlOO\
OOl
.
llOl\
lOlOOOlO
[
0
]
>
0.0f
)



The plane is created with:

Code:

    TA::StaticObject* staticObject = TA::StaticObject::CreateNew();
    TA::CollisionObjectAABBMesh* staticCollisionObject =
        TA::CollisionObjectAABBMesh::CreateNew();   

    staticCollisionObject->Initialise(
        4,              // Num vertices.
        1,              // Num polygons.
        4);             // Num polygon indices.

    float k_fGroundExtent = 10000.0f;
    staticCollisionObject->AddVertex( TA::Vec3( k_fGroundExtent, -100.0f, k_fGroundExtent  ) );
    staticCollisionObject->AddVertex( TA::Vec3( -k_fGroundExtent, -100.0f, k_fGroundExtent) );
    staticCollisionObject->AddVertex( TA::Vec3( -k_fGroundExtent, -100.0f, -k_fGroundExtent ) );
    staticCollisionObject->AddVertex( TA::Vec3( k_fGroundExtent, -100.0f, -k_fGroundExtent ) );

    int pnPolygonIndexList[4] = { 0, 1, 2, 3 };
    staticCollisionObject->AddPolygon( 4, pnPolygonIndexList );
    staticCollisionObject->FinishedAddingGeometry();


And the cube like:

Code:

    pDynamicObject = TA::DynamicObject::CreateNew();
    aabb.Initialise(                       // Make a 10 by 1 by 10 box.
        TA::Vec3(0.0f, 0.0f, 0.0f),        // Center.
        TA::Vec3(500, 5, 500));       // Extent
    pDynamicObject->InitialiseAsABox(aabb);

    // Place the dynamic object
    pDynamicObject->SetPosition(TA::Vec3(0.0f, 2.0f, 0.0f));
Back to top
View user's profile Send private message
luke
Site Admin


Joined: 15 Oct 2004
Posts: 621

PostPosted: Thu Nov 29, 2007 3:00 am    Post subject: Reply with quote

This is caused by making the dynamic object too big.

It is causing a floating point overflow during a matrix inverse for the calculation of the objects Inverse Interia Tensnor. The Inverse Intertia Tensor ends up zero, which later causes this assert. (Don't worry if you don't understand)

This has been fixed for the next release. You might also be able to avoid this by seting the objects mass to something much lower.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    trueaxis.com Forum Index -> Getting Started All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group