<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Ross, <div><br></div><div>I had another thought here -- and I open this to anyone else trying to use Live555 inside the scope of Xcode. My MediaSink subclass I implemented as a .cpp file, (as a matter of fact I had to do the same with my RTSPClient subclass, used a .cpp file), because if I attempted to use a .mm file (typical for compiling in C++ in Xcode), I received the following compilation error (as a result of Live555 header includes): </div><div><br></div><div>Boolean.hh: Typedef redefinition with different types ('unsigned int' vs 'unsigned char')</div><div><br></div><div>This is presumably due to type definition conflicts between Objective C boolean-related declarations and those declared in Boolean.hh. As I went through the Live555 source and consulted Googlepalooza's returned forum posts on the matter, I was a bit skittish about tweaking anything as fundamental as a base type definition without knowing in more detail the possible ramifications. I'm sure the answer is probably a simple one, but Ross, you seem to have insight into the entire code-base, so if you or anyone else can advise on how to address this so as to make Live555 play nice in Xcode with Objective C, I'd greatly appreciate it. </div><div><br></div><div>Bottom line, I'm wondering what effect this might be having on the runtime issue below. It is really the only nuance of environmental difference I can think of, other than use of Apple's LLVM and LLDB. </div><div><br></div><div>Thanks, </div><div><br></div><div><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Brad<br><br>Brad O'Hearne<br>Founder / Lead Developer<br>Big Hill Software LLC<br><a href="http://www.bighillsoftware.com">http://www.bighillsoftware.com</a></div></span></div></span></span>
</div>
<br><div><div>On Mar 6, 2012, at 3:31 PM, Brad O'Hearne wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Ross, <div><br></div><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><div>   <span class="Apple-style-span" style="font-family: Menlo; font-size: 11px; "> </span><span class="Apple-style-span" style="font-family: Menlo; font-size: 11px; "><span style="color: rgb(189, 35, 160); ">delete</span></span><span class="Apple-style-span" style="font-family: Menlo; font-size: 11px; ">[] sPropRecords;</span></div><div><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; "></span></div><div><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; "><br></span></div><div><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; ">with the error that the "pointer being freed was not allocated".</span></div></div></div></div></blockquote><div><br></div>I don't understand why you're getting an error here; the code looks OK.</div></div></blockquote><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>Yeah, I know the feeling!  ;-) But it would seem more than an issue of style, it outright crashes the entire app...</div><div><br></div></div></div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>FYI, in C++ "delete[]"ing (or "delete"ing) a NULL pointer is not an error (it has no effect).<br></div></div></blockquote><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>Yeah...I've been wondering if I'm dealing with some compiler nuance in part. I did that to see if it would have any marked effect on the outcome. </div><div><br></div><div>The only way I can get a run that doesn't crash is to remove the </div><div><br></div><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><div><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; "><span class="Apple-style-span" style="font-family: Menlo; font-size: 11px; ">   </span><span class="Apple-style-span" style="font-family: Menlo; font-size: 11px; "> </span><span class="Apple-style-span" style="font-family: Menlo; font-size: 11px; "><span style="color: rgb(189, 35, 160); ">delete</span></span><span class="Apple-style-span" style="font-family: Menlo; font-size: 11px; ">[] sPropRecords;</span></span></div><div><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; "></span></div></div></div></div></blockquote></div></div></blockquote></div><div><br></div><div>line entirely, and as a result, the memory....</div><div><br></div><div>Brad</div><div><br></div></div></div><div><div>On Mar 6, 2012, at 3:16 PM, Ross Finlayson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><div><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; ">This particular code snippet was taken directly from the Live555 H264VideoFileSink class implementation of its afterGettingFrame() method, so the exact code and usage context should be identical. </span></div><div><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; "><br></span></div><div><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; ">Anyway, I have taken my app run it on Xcode, and this line pretty quickly crashes the app: </span></div><div><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; "><br></span></div><div><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; "><span class="Apple-style-span" style="font-family: Menlo; font-size: 11px; ">   </span><span class="Apple-style-span" style="font-family: Menlo; font-size: 11px; "> </span><span class="Apple-style-span" style="font-family: Menlo; font-size: 11px; "><span style="color: rgb(189, 35, 160); ">delete</span></span><span class="Apple-style-span" style="font-family: Menlo; font-size: 11px; ">[] sPropRecords;</span></span></div><div><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; "></span></div><div><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; "><br></span></div><div><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; ">with the error that the "pointer being freed was not allocated". </span></div></div></div></div></blockquote><div><br></div>I don't understand why you're getting an error here; the code looks OK.</div><div><br></div><div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><div><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; ">I then figured that there was something internal to the parseSPropParameterSets which might conditionally allocate sPropRecords. So I wrapped the delete in a conditional: </span></div><div><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; "><br></span></div><div><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">    <span style="color: #bd23a0">if</span> (sPropRecords)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">    {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">        <span style="color: #bd23a0">delete</span>[] sPropRecords;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">    }</div><div><br></div><div>The error was the same</div></span></div></div></div></div></blockquote><div><br></div>FYI, in C++ "delete[]"ing (or "delete"ing) a NULL pointer is not an error (it has no effect).<br></div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Ross Finlayson<br>Live Networks, Inc.<br><a href="http://www.live555.com/">http://www.live555.com/</a></span></span>
</div>
<br></div>_______________________________________________<br>live-devel mailing list<br><a href="mailto:live-devel@lists.live555.com">live-devel@lists.live555.com</a><br><a href="http://lists.live555.com/mailman/listinfo/live-devel">http://lists.live555.com/mailman/listinfo/live-devel</a><br></blockquote></div><br></div></div>_______________________________________________<br>live-devel mailing list<br><a href="mailto:live-devel@lists.live555.com">live-devel@lists.live555.com</a><br>http://lists.live555.com/mailman/listinfo/live-devel<br></blockquote></div><br></div></body></html>