aquila
aquila copied to clipboard
"Incorrect checksum for freed object" when calling calculate() on vector-based SignalSource.
I apologize in advance if this is a rookie mistake (or a painfully obvious one), but I've been completely stumped for weeks now, figured I'd ask at the source. I posted a fuller explanation (with source) on Stack Overflow, I'm trying to calculate the MFCC constants of multiple sections of a larger std::vector
, and running into:
prog(15384,0x7fff7cafb310) malloc: *** error for object 0x7f8781863208: 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 trying to calculate MFCC constants with an Aquila::SignalSource
created from a std::vector
- trying to run the same code as the MFCC example. I've debugged it with lldb
and run it through valgrind
(as much as OSX can run valgrind
), and it says it's reading beyond a vector's bounds somewhere, but I can't for the life of me find where that would be (the comments on the post go through where I've checked so far).
Similar questions suggest it's a dumb index-math error, and I get the feeling it's something with how I'm creating/using the Aquila::SignalSource
, but I'm not sure what would be better. Any insight on how it should be done?
Hi Chris! Sorry it took me so long to find your issue, I must have accidentally skipped over the notification. What size are your sample vectors? The recently reported issue #35 draw my attention to the fact that it's not documented that at the moment FFT works only for inputs which size is a power of 2. Can you try creating a signal source from a vector, of, say, 2048 samples and see if it still crashes?
No worries about the wait. That fixed the crash, looks like that's exactly what was causing it.