NAudio icon indicating copy to clipboard operation
NAudio copied to clipboard

Application crash when starting recording

Open RomanPlekhanov opened this issue 3 years ago • 4 comments

Hello! Sometimes I have a problem when starting the recording. Here's an exception:

System.AccessViolationException в NAudio.Wave.WaveInterop.waveInReset(IntPtr) в NAudio.Wave.WaveInEvent.CloseWaveInDevice() в NAudio.Wave.WaveInEvent.OpenWaveInDevice() в NAudio.Wave.WaveInEvent.StartRecording()

RomanPlekhanov avatar Mar 16 '21 13:03 RomanPlekhanov

I'm having the same issue. It happends in an unexpected way.

Any solution or idea?

System.AccessViolationException en NAudio.Wave.WaveInterop.waveInPrepareHeader(IntPtr, NAudio.Wave.WaveHeader, Int32) en NAudio.Wave.WaveInBuffer.Reuse() en NAudio.Wave.WaveInEvent.DoRecording() en NAudio.Wave.WaveInEvent.RecordThread() en System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) en System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) en System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() en System.Threading.ThreadPoolWorkQueue.Dispatch()

davidromero55 avatar Nov 11 '22 02:11 davidromero55

Have same issue

Description: The process was terminated due to an unhandled exception.

Exception Info: System.AccessViolationException at NAudio.Wave.WaveInterop.waveInReset(IntPtr) at NAudio.Wave.WaveInEvent.CloseWaveInDevice() at NAudio.Wave.WaveInEvent.Dispose(Boolean)

Does anyone know how to fix this?

envoydev avatar Jul 20 '23 14:07 envoydev

Hard to track this kind of thing down without being able to reproduce it. What sound card are you using, and what version of Windows and version of .NET?

markheath avatar Jul 28 '23 20:07 markheath

I'm having the same issue. It happends in an unexpected way.

Any solution or idea?

System.AccessViolationException en NAudio.Wave.WaveInterop.waveInPrepareHeader(IntPtr, NAudio.Wave.WaveHeader, Int32) en NAudio.Wave.WaveInBuffer.Reuse() en NAudio.Wave.WaveInEvent.DoRecording() en NAudio.Wave.WaveInEvent.RecordThread() en System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) en System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) en System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() en System.Threading.ThreadPoolWorkQueue.Dispatch()

I have the same exact issue, have you found a solution to this?

FossaMalaEnt avatar Oct 24 '23 11:10 FossaMalaEnt