Ticket #62 (reopened defect)

Opened 12 months ago

Last modified 12 months ago

WASAPI multi-threading issue

Reported by: jf_menard Owned by: jf_menard
Priority: major Milestone:
Component: host-api-wasapi Version:
Keywords: Cc:

Description

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).

Attachments

Ticket62.patch (3.7 KB) - added by jf_menard 12 months ago.
SVN patch for ticket #62

Change History

Changed 12 months ago by jf_menard

SVN patch for ticket #62

Changed 12 months ago by jf_menard

  • status changed from new to closed
  • resolution set to fixed

This is a working fix for me. I have not evaluated all the impacts but at least it does not systematically crash. I also fixed some non 2-channels issues.

Changed 12 months ago by jf_menard

  • status changed from closed to reopened
  • resolution fixed deleted

Someone should commit this patch to SVN.

Note: See TracTickets for help on using tickets.