Add logging to catch WAV export crashes#353
Merged
Gumball2415 merged 2 commits intomainfrom Jul 8, 2025
Merged
Conversation
We would fail to clear m_pWaveFile if we failed to start rendering. On the next render attempt, this would cause the assertion `ASSERT(m_pWaveFile == nullptr)` to fail. Manually clear m_pWaveFile to prevent this from happening. If mmioOpen fails, hmmioOut is nullptr and we don't need to call CloseFile().
The modulo logic is fiddly, but I confirmed it works with various log item counts (by reducing LOG_SIZE to 4, pushing items with and without overflow, and verifying the tail output is correct).
Collaborator
|
if it's within the scope of the feature, is it also possible to include information regarding the tracker version and the OS? |
Collaborator
|
lgtm though, merging |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request aims to catch rare crashes when exporting WAV files, to help debug what's causing them.
Changes in this PR:
To test the logger, edit
CSoundGen::~CSoundGen()to callLOGGER.dump().