Custom property bug

Report problems here (or use the built-in feedback dialog in the editor)
Post Reply
joolean
Posts: 19
Joined: Mon Jun 24, 2013 7:46 am

Custom property bug

Post by joolean »

I was unable to create any joints in my Rube file and kept getting the following error:

Could not find body A for joint (body id 3)
Could not find body B for joint (body id 0)
addJoint failed

I worked out it's because I had a custom body property called "id" which was causing the following corruption:
( getBody( 1 ).id == 3 ) = true

Had I read RTFM on custom properties first I might have saved myself from the mistake in the first place, however I'd still call this a bug because it allows users to corrupt the file through normal program operations.
Perhaps make a list of reserved class property names and prevent users from being able to make custom properties with those names.
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: Custom property bug

Post by iforce2d »

Good point, thanks.
Post Reply