Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Incorrect checksum for freed object" when calling calculate() on vector-based SignalSource. #34

Open
cnvandev opened this issue Jul 10, 2014 · 2 comments

Comments

@cnvandev
Copy link
Contributor

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?

@zsiciarz
Copy link
Owner

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?

@cnvandev
Copy link
Contributor Author

No worries about the wait. That fixed the crash, looks like that's exactly what was causing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants