For some reason I have been getting strange errors in this function lately. I implemeted a function with a thread constantly locking and unlocking samples, and as the traffic has been getting heavy, I’ve noticed some errors that were causing the kernel to crash. I noticed for one that sometimes my function will say to write n bytes, and afterwards, both of my pointers given to me will be null, and the lengths to write will be 0. Well after debugging, i spotted this, and wondered if you’ve run into this before.
Secondly, in the same function, I just did some testing, and got another kernel crash. This time it was because I had told FSOUND_Sample_Lock to write for n bytes, and it had given me only the first pointer with the size to write being all the space that i needed to write, but in the middle of writing, i got the crash after i had not yet written the full size into the sample. I looked at the memory, and it had not been allocated, so the function returned something like 900 bytes, and crashed after i wrote about 600 bytes! Ever heard of anything like this?
- homer asked 17 years ago
- You must login to post comments