Ticket #63 (closed defect: duplicate)
WASAPI crashes when starting/stopping playback too quickly.
| Reported by: | bjornroche | Owned by: | davidv |
|---|---|---|---|
| Priority: | major | Milestone: | V19-PREVIEW1 |
| Component: | host-api-wasapi | Version: | |
| Keywords: | crash access violation ProcThread | Cc: |
Description
jf menard writes:
I realized WASAPI would crash my application (Access violation reading...) if I did the following quick sequence: - Pa_OpenStream(...) - Pa_StartStream(...) - Pa_StopStream(...) - Pa_CloseStream(...)
The issue arise when Stop and Close are called before the ProcThread is started by Windows. In this case, the new thread encounters a released pointer and crashes. To obtain a reliable behavior, I think we should consider that Stop and Close could be called anywhere between the start of ProcThread and the while (!stream->closeRequest).
Also, could someone verify if there is a "stream->running = false;" missing from Pa_AbortStream(...) because the actual version crashes.
Thanks,
J-F
