Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Box2D simulation going on and a system that loads the bodies and its' shapes from a text file definition.

I create a new physics world, i load bodies into it, from one of these files. Everything seems to work fine, collisions included.

Then, i attempt to create a really simple one-shaped body from code, just like the most basic tutorials. Lets say a circle.

The circle appears fine, starts falling with gravity, and as soon as it hits a static body, both the circle and that body disapear. As simple as that. The body the circle is colliding with is in this case a ground static rectangle.. Pretty straightforward!

I think im setting everything just the regular way, but i can edit this question with more information if pertinent. Sorry for the lack of detail.

So, anyone knows any circumstances that could cause such an event?

EDIT: For some reason, seems to work in Debug builds, but no in Release.

share|improve this question

closed as off-topic by Anko, bummzack, Sean Middleditch, Josh Petrie Jun 21 '14 at 1:15

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about debugging a problem in your project must present a concise selection of code and context so as to allow a reader to diagnose the issue without needing to read all of your code or to engage in extensive back-and-forth dialog. For more information, see this meta thread." – Sean Middleditch, Josh Petrie
If this question can be reworded to fit the rules in the help center, please edit the question.

That could be anything really.. maybe a high restitution setting that makes your bodies bounce so hard that they just leave the screen? – bummzack Oct 29 '11 at 17:15
restitution is not being touched, a static body should not be harmed at all by collisions with dynamic objects. – Grimshaw Oct 29 '11 at 17:26
Sounds like a NaN resulting from the collision operation. Which Box2D implementation are you using, and is it stable? Also what are your physics params set in b2World. – Arcane Engineer Oct 29 '11 at 19:04
Im using 2.2.0, the official release. b2World is pretty much virgin, with a regular gravity vector, adequate to a scale-factor of 100 pixels per meter. Also, sleeping bodies are enabled. So, do you think it can be a "corrupt" setting in one of the colliding bodies? – Grimshaw Oct 29 '11 at 19:11
@DevilWithin: If that is the correct answer, please answer your own question and checkmark it. – Samaursa Oct 31 '11 at 2:38