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

Memory access violation if all I do is: "mNVAudioManager = [Novocaine audioManager]" #32

Closed
casbreuk opened this issue Aug 24, 2012 · 3 comments

Comments

@casbreuk
Copy link
Contributor

The only thing I do with Novocaine in my current iOS project is:
mNVAudioManager = [Novocaine audioManager];"

I have commented out all other code that would try to use the audio manager / novocaine functions.

It crashes with a memory access violation in novocaine::inputCallback(), on the second line:

if( !sm.playing ) <-- memory access violation

I am using ARC. Disabled ARC for all Novocaine files. .mm file extensions for files using Novocaine.
Compiler set to ObjectiveC++.
No compiler errors or warnings.

@casbreuk
Copy link
Contributor Author

I got around this by changing the first line of novocaine::inputCallback() and novocaine::outputCallback() functions as follows:
Novocaine *sm = [Novocaine audioManager]; //(Novocaine *)inRefCon;

It seems like the inRefCon pointer was ... forgotten. Some of the other parameters still look correct - not sure about the data though. I get this weird super high pitched warbling sound playing all the time, now.

@alexbw
Copy link
Owner

alexbw commented Aug 24, 2012

Whoa, that sounds totally weird. I've never ever seen that before. What device are you using?

On Aug 24, 2012, at 2:39 PM, Corey wrote:

I got around this by changing the first line of novocaine::inputCallback() and novocaine::outputCallback() functions as follows:
Novocaine *sm = [Novocaine audioManager]; //(Novocaine *)inRefCon;

It seems like the inRefCon pointer was ... forgotten. Some of the other parameters still look correct - not sure about the data though. I get this weird super high pitched warbling sound playing all the time, now.


Reply to this email directly or view it on GitHub.

@casbreuk
Copy link
Contributor Author

iTouch4. The Simulator gives the -50 output error.
I discovered the root of the issue though - I must have inadvertently changed something when going through the first time to fix compiler warnings. I thought I had undone every change I had made to the file after adding the flags to disable arc and changing the compiler to ObjC++. I reverted the novocaine.m file, and it runs fine now.

Still having the weird feedback issue though - listening with the mic makes a lot of very high pitched loud noise (like speaker/mic feedback). I'll probably just have to play with the in/out blocks to see what is going on.

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