cpShape::space is uninitialized

Discuss any Chipmunk bugs here.
Post Reply
ShiftZ
Posts: 114
Joined: Sat Mar 07, 2009 7:23 am
Contact:

cpShape::space is uninitialized

Post by ShiftZ »

There is no nullification of cpShape::space anywhere. Demos are still running fine because it uses default calloc for memory allocation. If i use malloc for shape, then:

Code: Select all

cpAssertHard(!shape->space, "This shape is already added to a space and cannot be added to another.");
assertion fails on cpSpaceAddShape.

Is that supposed to be nullified manually, or it should be always used calloc for mem allocations for everything?
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: cpShape::space is uninitialized

Post by slembcke »

Ah, nope. That is supposed to be initialized to NULL. Fixed it in Git.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
ShiftZ
Posts: 114
Joined: Sat Mar 07, 2009 7:23 am
Contact:

Re: cpShape::space is uninitialized

Post by ShiftZ »

Fixed it in Git.
Hm, cant see it.
Im new with git. Do i have to fetch or pull? Both says im up-to-date.
Once i thought project was abonded, since git 'fetch' told me that im up-to-date for 4 or 5 months, until I realized to pull instead of fetch.
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: cpShape::space is uninitialized

Post by slembcke »

Oh, whoops. I committed the changes, but forgot to push them to github. Everything takes twice as much work with Git. :-\
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
ShiftZ
Posts: 114
Joined: Sat Mar 07, 2009 7:23 am
Contact:

Re: cpShape::space is uninitialized

Post by ShiftZ »

Is there a practical reason you moved to GIT from SVN?

Still nothing new on fetch\pull.
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: cpShape::space is uninitialized

Post by slembcke »

Practical reason no? To be honest, I don't really like Git. The CLI is awful, unintuitive, and every time there is a minor issue I end up reading 10-20 minutes worth of documentation and random Googling to fix it. To make things worse, it seems Git reinvented most of the VCS language (just because they could it seems).

So why did I move to GitHub? Because I was getting 1-2 requests per week to do so. To be honest, it's not all bad. GitHub is really the killer feature for Git. It's a pretty nice interface and it really seems to encourage more social coding. I've gotten more patches submitted on GitHub in 6 months than I got in 2-3 years on Google Code.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
ShiftZ
Posts: 114
Joined: Sat Mar 07, 2009 7:23 am
Contact:

Re: cpShape::space is uninitialized

Post by ShiftZ »

Also cpConstraint::space stay uninitialized.

GitHub? Is that something i could use to fix intialization problem by myself?
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: cpShape::space is uninitialized

Post by slembcke »

Wee. Fixed that one too.

You should look into branches and pull requests on GitHub. Basically it helps automate making, distributing and applying a patch. A lot of it can even be done through the web interface if it's a simple one liner. It's pretty helpful in that regard.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests