Thanks again for this very useful project! After the merge of https://github.com/m1dugh/native-sound-mixer/issues/42, that issue went away, but new null pointer dereference issues appeared in our bug tracker. I had a look at it and found the following:
On multiple places, there is an interaction with endpointVolume and the function is expected to return something, but the return value of endpointVolume is not checked. Therefore, undefined values may be returned. This PR adds return value checks with default values as return values for failing endpointVolume interactions. This should fix null pointer dereference issues.
For the record, here is the stack trace that I initially triaged:
Please note that I still don't have a setup to compile and test this myself and therefore the code is NOT tested. @m1dugh can you have a look at it?
I was not able to reproduce the error myself, but maybe you can try disabling your audio card in the Windows settings to create a faulty audio device that may trigger these errors.
Hello again!
Thanks again for this very useful project! After the merge of https://github.com/m1dugh/native-sound-mixer/issues/42, that issue went away, but new null pointer dereference issues appeared in our bug tracker. I had a look at it and found the following:
On multiple places, there is an interaction with
endpointVolume
and the function is expected to return something, but the return value ofendpointVolume
is not checked. Therefore, undefined values may be returned. This PR adds return value checks with default values as return values for failingendpointVolume
interactions. This should fix null pointer dereference issues.For the record, here is the stack trace that I initially triaged:
Instruction with the issue:
mov rax, [rcx]
. rcx is clearly NULL and therefore can't be dereferenced.The stack trace points to the following lines of code: https://github.com/m1dugh/native-sound-mixer/blob/master/cppsrc/win/win-sound-mixer.cpp#L235-L236:
Please note that I still don't have a setup to compile and test this myself and therefore the code is NOT tested. @m1dugh can you have a look at it?
I was not able to reproduce the error myself, but maybe you can try disabling your audio card in the Windows settings to create a faulty audio device that may trigger these errors.