What happened to Box2D errors?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
The Burrito
Party member
Posts: 153
Joined: Mon Sep 21, 2009 12:14 am
Contact:

What happened to Box2D errors?

Post by The Burrito »

So Löve 0.7.0 is awesome, except for some reason the box2d error messages no longer show up, löve just stops responding and closes (under windows 7). I really need some way to prevent this from happening.
I'm specifically talking about creating shapes, for some reason even with area calculation I can't seem to avoid the errors 100% of the time.
If löve had some kind of handler for this it would be great, but I can understand if that wasn't happening until after its been updated to the newest version of box2d.

In the mean time is there anything else I can do? I mean if I could compile a custom version of löve that would just fail to create the shapes without any feedback that would be acceptable for the time being, but I'm not really sure how to do that. (I'm trying to get something done for a contest and a weird physics glitch is preferable to crashing.)
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: What happened to Box2D errors?

Post by bartbes »

Yeah sorry, I was experimenting with hooking it into love's error handling system (which I partially did), but it required loads and loads of work, so I discarded it for the time being, unfortunately I accidentally committed it in my next change, will revert that in the repo now, so don't worry, it will be fixed in 0.7.0 final.
User avatar
The Burrito
Party member
Posts: 153
Joined: Mon Sep 21, 2009 12:14 am
Contact:

Re: What happened to Box2D errors?

Post by The Burrito »

Cool, I appreciate it. I was wondering if maybe it would be possible to simply ignore shapes that are too small, it could just return nil instead of the shape. I know that would be sort of sloppy, but generally shapes that are that small are created by accident anyway, and it would mean you could check on it like this:

Code: Select all

shape = love.physics.newPolygonShape( body, ... )
if not shape then
(shape does not exist)
end
Just a thought, not sure if it would actually be that easy to implement. It's just really difficult and seems like a waste of energy to check every single dynamically generated shape to ensure that its within certain tolerances.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: What happened to Box2D errors?

Post by bartbes »

That would be just as hard as going to love errors, so...
User avatar
The Burrito
Party member
Posts: 153
Joined: Mon Sep 21, 2009 12:14 am
Contact:

Re: What happened to Box2D errors?

Post by The Burrito »

I kinda figured but was worth asking... I guess I can figure something else out. I'm not sure why I'm having such a hard time catching all the potential errors in the first place.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 70 guests