This project has moved. For the latest updates, please go here.

ExecutionEngineException: SIGILL when attempting to parse m4a file

Jul 6, 2016 at 12:07 AM
Edited Jul 6, 2016 at 12:18 AM
I am trying to use NAudio in Unity to read in different audio file formats and convert them to wav. I had no trouble reading in an mp3 file using Mp3FileReader or aif using AiffFileReader, but if I try to read in an m4a file using MediaFoundationReader or AudioFileReader, I get this SIGILL error. I'm not sure if this is Unity causing the error or if I'm just not using the correct reader to read in the m4a file.

The stack trace I get is:
System.Runtime.InteropServices.Marshal.QueryInterface (IntPtr pUnk, System.Guid& iid, System.IntPtr& ppv) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs:716)
Mono.Interop.ComInteropProxy.GetProxy (IntPtr pItf, System.Type t) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/Mono.Interop/ComInteropProxy.cs:89)
(wrapper cominterop-invoke) NAudio.MediaFoundation.IMFSourceReader:SetStreamSelection (int,bool)
NAudio.Wave.MediaFoundationReader.CreateReader (NAudio.Wave.MediaFoundationReaderSettings settings)
NAudio.Wave.MediaFoundationReader..ctor (System.String file, NAudio.Wave.MediaFoundationReaderSettings settings)
NAudio.Wave.MediaFoundationReader..ctor (System.String file)
(wrapper remoting-invoke-with-check) NAudio.Wave.MediaFoundationReader:.ctor (string)
NAudio.Wave.AudioFileReader.CreateReaderStream (System.String fileName)
NAudio.Wave.AudioFileReader..ctor (System.String fileName)
(wrapper remoting-invoke-with-check) NAudio.Wave.AudioFileReader:.ctor (string)
Jul 21, 2016 at 7:27 PM
sorry, afraid I can't help you with that. Not sure mono and NAudio are a great combination. as NAudio relies heavily on interop to operating system functions