Monday, May 21, 2018

GAudio Bugs Crushed and Now Back to Memory Leak Detection

Date: 5/21/2018

Author: Tyler Murray

The previous week I manage to narrow down and discover the cause of the bug that caused the "pause" & "resume" functions on Linux's GAudio side to fail/crash. In the functions they are using a function from PusleAudio to pause and resume the stream. But this function returns an operation of which wasn't being accounted for. Second reason is that there is a structure that handles these "operations" but these structures are only created within the scope of the function so when a function end that structure is out of scope. So overall, in the streamSound loop was never getting notified that a sound is being paused or resumed so it continued as so, but the stream would still pause/resume. Which caused the application to stall out. Making the structure declared once as a global and assigning it operation member appropriately fixed this problem.

My goal/plan this week is to finish to Linux memory leaks. As of right now I managed to clean all of them except the ones that are within GAudio. This is good news and bad news at the same time because for some reason Valgrind, my Linux memory leak detector is having problems when I run it with GAudio's unit tests. This week is going to be interesting, hopefully I can solve the problem, if not I will have to find another means of memory leak detection. 

No comments:

Post a Comment