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

Crash when writing to WAV (channel export?) #92

Closed
nyanpasu64 opened this issue Oct 12, 2021 · 1 comment · Fixed by #93
Closed

Crash when writing to WAV (channel export?) #92

nyanpasu64 opened this issue Oct 12, 2021 · 1 comment · Fixed by #93

Comments

@nyanpasu64
Copy link
Collaborator

bool CSoundGen::PlayBuffer() calls m_pWaveFile->WriteWave(m_pAccumBuffer, m_iBufSizeBytes) when m_pWaveFile is nullptr.

I wonder if m_bRendering is written/seen before m_pWaveFile due to a data race.

@nyanpasu64
Copy link
Collaborator Author

nyanpasu64 commented Oct 12, 2021

it's a classic data race.

audio:

  • devenv_iFN8aPJro4

gui:

  • Channel export end: CWavProgressDlg::OnTimer():
    • devenv_mO90zaKCnM
      • devenv_z50URspknI
      • = false
    • devenv_vErlwrzar3
  • Next channel export begin: CWavProgressDlg::OnInitDialog():
    • devenv_BVjjj6eI9l
    • CSoundGen::RenderToFile()
      • devenv_ZaQKmC4kfl
      • m_pWaveFile has not been reset yet.

audio: CSoundGen::PlayBuffer():

  • devenv_jOmusdib57
    • m_pWaveFile has since been reset.

rewrite it in rust.

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

Successfully merging a pull request may close this issue.

1 participant