NullReferenceException, no stack trace… where to start?
问题 I have a WPF audio application. Occasionally (and even in the debugger) I'm seeing a NullReferenceException which carries no stack trace information with it. How can one start debugging such an issue? Some background: I'm P/Invoking functions in WinMM.dll which involves registering a callback when calling waveOutOpen [DllImport("winmm.dll")] public static extern MmResult waveOutOpen(out IntPtr phwo, IntPtr uDeviceID, WaveFmt pwfx, WaveCallbk dwCallback, IntPtr dwInstance, int fdwOpen); This