Question

I'm starting a project using the Aubio library within openFrameworks, so I'm copying in code to my project from Aubio demos, modifting, etc. The Aubio function new_aubio_pitchdetection() works great, but the similar function new_aubio_onset() doesn't. In fact, it gives me an EXC_BAD_ACCESS error in the freeImage library of all things-- which I'm not referencing at all, anywhere in my project. (FreeImage is built into openFrameworks, yes, but other than that I'm not going near it)

The error takes me to the file ofImage.cpp and says:

//this is for grayscale images they need to be paletted from: http://sourceforge.net/forum/message.php?msg_id=2856879

I'm familiar with EXC_BAD_ACCESS in a memory-management context, but this looks like maybe there's a namespace problem going on? I find it completely baffling to my little brain how this function can cause an error in such distant (and supposedly nonactive) code.

I can post code samples, of course, but this seems to be a problem on a more fundamental level than can be seen in a snippet.

Was it helpful?

Solution

The code is most probably corrupting the heap. That can cause widespread problems, just about any code is using the heap. The code that fails is not responsible for the corruption. Diagnose this with a good debug allocator, see what's available in your CRT. Or a thorough code review.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top