Box2D Forums

It is currently Tue May 21, 2013 2:54 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon Aug 01, 2011 4:49 pm 
Offline

Joined: Mon Aug 01, 2011 4:33 pm
Posts: 2
Hello! I used to work with box2dFlash, and now decided to use it with C++.

When I'm trying to define gravity vector I get a segmentation fault:
Code:
     b2Vec2 gravity(0.0f, -10.0f);  // segmentation fault here!!
     
     doSleep = true;

     world = new b2World(gravity,doSleep);



Can you please help me to fix it?

Thanks!

upd. Box2d v2.1.2


Top
 Profile  
 
PostPosted: Mon Aug 01, 2011 8:35 pm 
Offline

Joined: Tue Jun 24, 2008 8:25 pm
Posts: 1515
Location: Tokyo
That seems a highly unlikely place for a segfault. Double check the line the debugger is telling you... post a stack trace maybe might help too.


Top
 Profile  
 
PostPosted: Mon Aug 01, 2011 11:17 pm 
Offline

Joined: Mon Aug 01, 2011 4:33 pm
Posts: 2
Thank you! I checked it and it's not a fault of b2Vec2, sorry. Maybe I was too tired yesterday and made a mistake. Thank you anyway! =)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group