{"action":"created","issue":{"url":"https://api.github.com/repos/js-platform/node-webrtc/issues/171","labels_url":"https://api.github.com/repos/js-platform/node-webrtc/issues/171/labels{/name}","comments_url":"https://api.github.com/repos/js-platform/node-webrtc/issues/171/comments","events_url":"https://api.github.com/repos/js-platform/node-webrtc/issues/171/events","html_url":"https://github.com/js-platform/node-webrtc/issues/171","id":63859527,"number":171,"title":"malloc: *** error for object 0x100000000: pointer being freed was not allocated","user":{"login":"guymguym","id":1091422,"avatar_url":"https://avatars.githubusercontent.com/u/1091422?v=3","gravatar_id":"","url":"https://api.github.com/users/guymguym","html_url":"https://github.com/guymguym","followers_url":"https://api.github.com/users/guymguym/followers","following_url":"https://api.github.com/users/guymguym/following{/other_user}","gists_url":"https://api.github.com/users/guymguym/gists{/gist_id}","starred_url":"https://api.github.com/users/guymguym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guymguym/subscriptions","organizations_url":"https://api.github.com/users/guymguym/orgs","repos_url":"https://api.github.com/users/guymguym/repos","events_url":"https://api.github.com/users/guymguym/events{/privacy}","received_events_url":"https://api.github.com/users/guymguym/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":27,"created_at":"2015-03-23T23:47:56Z","updated_at":"2015-04-02T11:09:42Z","closed_at":null,"body":"hi\r\n\r\nI see this issue like discussed in #170 \r\n\r\n```\r\nnode(46307,0x104516000) malloc: *** error for object 0x100000000: pointer being freed was not allocated\r\n*** set a breakpoint in malloc_error_break to debug\r\nAbort trap: 6\r\n```\r\n\r\nthough I use a different test - \r\nhttps://gist.github.com/guymguym/728bf41ab38466ccca4f (see usage in gist comment).  \r\nwhen the two peers are chrome/firefox it works well (though with 100% cpu for just ~5 MB/s on Macbook Air :snail: ). \r\nbut any wrtc client fails pretty quickly.\r\n\r\nthis occurs on OSX 10.10.2 with latest wrtc version which is 0.0.49 in npm (which is not the same as the github release numbers ?!)."},"comment":{"url":"https://api.github.com/repos/js-platform/node-webrtc/issues/comments/88866775","html_url":"https://github.com/js-platform/node-webrtc/issues/171#issuecomment-88866775","issue_url":"https://api.github.com/repos/js-platform/node-webrtc/issues/171","id":88866775,"user":{"login":"guymguym","id":1091422,"avatar_url":"https://avatars.githubusercontent.com/u/1091422?v=3","gravatar_id":"","url":"https://api.github.com/users/guymguym","html_url":"https://github.com/guymguym","followers_url":"https://api.github.com/users/guymguym/followers","following_url":"https://api.github.com/users/guymguym/following{/other_user}","gists_url":"https://api.github.com/users/guymguym/gists{/gist_id}","starred_url":"https://api.github.com/users/guymguym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guymguym/subscriptions","organizations_url":"https://api.github.com/users/guymguym/orgs","repos_url":"https://api.github.com/users/guymguym/repos","events_url":"https://api.github.com/users/guymguym/events{/privacy}","received_events_url":"https://api.github.com/users/guymguym/received_events","type":"User","site_admin":false},"created_at":"2015-04-02T11:09:42Z","updated_at":"2015-04-02T11:09:42Z","body":"I found that webrtc already fixed the code for SendQueuedDataMessages ~2 months ago to avoid deleting buffer and leaving in queue.\r\n\r\nhttps://chromium.googlesource.com/external/webrtc/+/cceb166a3fd2724c679da7d093149b0511e8d99b%5E%21/#F0\r\n\r\n@modeswitch can libwebrtc be updated? do you go to latest or pick specific patches?\r\n\r\n```\r\nvoid DataChannel::SendQueuedDataMessages() {\r\n  ASSERT(was_ever_writable_ && state_ == kOpen);\r\n  while (!queued_send_data_.Empty()) {\r\n    DataBuffer* buffer = queued_send_data_.Front();\r\n    if (!SendDataMessage(*buffer, false)) {\r\n      // Leave the message in the queue if sending is aborted.\r\n      break;\r\n    }\r\n    queued_send_data_.Pop();\r\n    delete buffer;\r\n  }\r\n}\r\n```"}}