Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

incorrect checksum for freed object

incorrect checksum for freed object

Problem

On POSTing data to my expressjs app, this is what I am getting:

node(58287,0x7fff771ad960) malloc: *** error for object 0x7ff8a8600c58: incorrect
    checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6

Any idea why?

Update:

Here is some code:

Client side:

$.ajax({
 url: 'user/' + id,
 type: 'POST',
 dataType:'JSON',
 data: JSON.stringify(data),
 success: function(response){
  console.log(response);
 }      
});

Server side:

app.post('/user/:id', function(req,res){
  var id = req.params.id;
  console.log(data);
});

When I use JSON.stringify on the client side, I am hitting this weird error:

node(58461,0x7fff771ad960) malloc: * error for object 0x7fa861d00e28: incorrect checksum for freed object - object was probably modified after being freed. * set a breakpoint in malloc_error_break to debug Abort trap: 6

When I don't use JSON.stringify on the client side, I get 'null' strings on the server side.

Any ideas on what I am doing wrong?

Problem courtesy of: Rajat

Solution

I experienced this same error recently. Here's the fix:

Node.js has had some bugs that cause it to install improperly from source under OS X (see e.g. issue 2061). The good news is that the packaged installer installs it correctly. So, simply uninstall Node, then head to http://nodejs.org/#download and run the Macintosh Installer.

I've reported this bug on the Node issue tracker here.

Solution courtesy of: Trevor Burnham

Discussion

View additional discussion.



This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

incorrect checksum for freed object

×

Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription

×