Note that there are some explanatory texts on larger screens.

plurals
  1. PO64-bit build in OSX - inconsistant malloc error
    primarykey
    data
    text
    <p>I'm getting a very inconsistant error in Xcode: </p> <pre><code>malloc: *** error for object 0x1041146f8: incorrect checksum for freed object - object was probably modified after being freed. *** set a breakpoint in malloc_error_break to debug </code></pre> <p>I know that it's not my code directly because a 32-bit build works just fine (Architecture set to Standard 32/64 and Build Active Architectures Only is set to No). It also will occasionally work just fine without me changing even a comment, but only about %10 of the time.</p> <p>I've traced the error using breakpoints, sometimes it happens on an ivar like: myClass = new MyClass, but sometimes it happens on deleting an unrelated ivar. I've tried setting myClass to null prior to the new instances creation but that didn't help, and I'm at a loss because I don't completely understand caching, registers, heaps, and stacks (which may give insight into why this is happening).</p> <p>Here's some of the code in the places I'm getting the error. Note that each set of lines of code is a different place, and class, where the error may, or may not, happen.</p> <p>error 1</p> <pre><code>void functionA() { // bunch of unrelated code if (aAinterpFilter) delete aAinterpFilter; // this is where the first error sometimes happens aAinterpFilter = new InterpFilter((Window::Sinc::LP*)filterDesign, aAinterpFactor); } </code></pre> <p>error 2</p> <pre><code>Window::Sinc::LP::~LP () { // the z delete is where the error sometimes happens delete[] z; delete[] kernel; } </code></pre> <p>error 3</p> <pre><code>void AAOsc :: setPhase(double phase) { if (phase &lt; 0.0) phase = 0.0; if (phase &gt; 1.0) phase = 1.0; // this is where the error rarely happens, but it does sometimes. osc-&gt;tickInfo-&gt;curvPhase = static_cast&lt;uint&gt;(phase * 4294967296.0); } </code></pre> <p>Any ideas that may point to the solution will be greatly appreciated.</p> <p>GW</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload