[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4762: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4764: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4765: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4766: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
Chipmunk Physics • View topic - Bug in cpSpaceSegmentQueryFirst

Bug in cpSpaceSegmentQueryFirst

Official forum for the .

Re: Bug in cpSpaceSegmentQueryFirst

Postby Beta Carotene » Mon Apr 29, 2013 7:26 pm

Im still messing around with various things. Nothing seems to be responding at all except modifying that function
Beta Carotene
 
Posts: 123
Joined: Sat Aug 04, 2012 6:34 pm

Re: Bug in cpSpaceSegmentQueryFirst

Postby Beta Carotene » Mon Apr 29, 2013 9:18 pm

so I've been thinking, and I think it might actually not be an issue with Visual Studio.

I was doing some experiments and noticed something very interesting.

So, my engine supports free-form geometry for platforms, but its default mode is to snap squares to a grid (of variable sizes) for quick prototyping. I was playing around with the tiles in the world, moving them up and down while the character was on it. I quickly noticed that the errors and glitch behavior ONLY occurred when the tile border was dead-smack on an integer. Like if the floor level was at -38 or at -39, the glitches happened, but 38.000001 - 39.999999, they were gone.

To me, this seems like it actually might be an issue with a missing corner case in then algorithm.

I know there's been extensive testing with your engine, but it seems like the case of ray testing from such exact distances on such exact borders may have slipped through the cracks. I was doing some searching online and I found at least one other post of a person with a very similar issue. The thread went nowhere though
Beta Carotene
 
Posts: 123
Joined: Sat Aug 04, 2012 6:34 pm

Re: Bug in cpSpaceSegmentQueryFirst

Postby Beta Carotene » Mon Apr 29, 2013 9:35 pm

yeah see.... and the bug also goes away when I rotate the platform by 0.00001
Beta Carotene
 
Posts: 123
Joined: Sat Aug 04, 2012 6:34 pm

Re: Bug in cpSpaceSegmentQueryFirst

Postby ShiftZ » Tue Apr 30, 2013 12:13 pm

I dont want to interrupt you, but i have just updated chipmunk and suddenly discovered that cpSpaceSegmentQueryFirst cast sometime returns flipped normal. It's directed "inside" the shape. Is that common behaviour?

EDIT Oh, well, that was querying inside-out.
Last edited by ShiftZ on Tue Apr 30, 2013 1:55 pm, edited 2 times in total.
ShiftZ
 
Posts: 114
Joined: Sat Mar 07, 2009 7:23 am

Re: Bug in cpSpaceSegmentQueryFirst

Postby slembcke » Tue Apr 30, 2013 12:54 pm

Blah. I haven't been able to reproduce the issue at all as a unit test. I'm just going to make a blind rewrite of cpBBSegmentQuery() I guess.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: Bug in cpSpaceSegmentQueryFirst

Postby slembcke » Tue Apr 30, 2013 2:13 pm

Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: Bug in cpSpaceSegmentQueryFirst

Postby Beta Carotene » Tue Apr 30, 2013 3:21 pm

So I tried your new version. I don't know if the error is gone, but I can no longer get it to happen and my speed is pretty much back to normal. I'll contact again if I find anything else wrong. Thanks much!

Perhaps you should include this as a "ifdef MSVC" pre-processor statement. Or perhaps if this new function is just as fast (or good enough), you can just replace the old version. I'll leave that one up to you though ;)

Thanks so much for your help!
Beta Carotene
 
Posts: 123
Joined: Sat Aug 04, 2012 6:34 pm

Re: Bug in cpSpaceSegmentQueryFirst

Postby slembcke » Tue Apr 30, 2013 3:53 pm

I think the performance of the new one should be pretty similar. It's really just more verbose.

Though even using integer coordinates I'm not sure how this one worked and the old one didn't unless it's a compiler bug. :-\ It was really only relying on 1.0/(+-)0.0 to produce +-infinity and multiplying by infinity. That was really the only part I took out. Not really like it matters. Even if it's verified to be a compiler bug, it would need a workaround in Chipmunk anyway.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: Bug in cpSpaceSegmentQueryFirst

Postby Beta Carotene » Wed May 01, 2013 2:57 pm

ok.... so while that error has not popped up again, now I've got all kinds of weird shit happening in my program. This is without question some kind of memory corruption issue happening somewhere. I'll keep you updated if I find anything.
Beta Carotene
 
Posts: 123
Joined: Sat Aug 04, 2012 6:34 pm

Re: Bug in cpSpaceSegmentQueryFirst

Postby slembcke » Wed May 01, 2013 4:28 pm

Sounds like it's time for some valgrind. :-\
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

PreviousNext

Return to Chipmunk2D Physics

Who is online

Users browsing this forum: No registered users and 1 guest

cron