Hi!
I'm using the .NET binding of SFML 2.0.
My application has a class (a Windows.Forms.Form-based dialog) which contains the following SFML members:
private SoundBufferRecorder sBufRecorder = new SoundBufferRecorder();
private Sound sound = new Sound();
If I run the app and open this dialog at least once (and therefore the objects are created) I get the following error message after the application closes:
The instruction at "0x04b053cc" referenced memory at "0x05c1be80". The memory could not be read.
This happens whether or not I dispose of the objects explicitly.
The error goes away, if I do not actually create the objects (leave them as null):
private SoundBufferRecorder sBufRecorder;
private Sound sound;
but if either one of the two objects is created, the error message appears.
Could this have something to do with the CLR finalizer finding these objects in an invalid state?
Interestingly, I do not get the error message when I run the application in debug mode from the VS C# 2010 Express IDE.
The error occurs, however, if I run the exe in either the bin/Debug or the bin/Release folder, or publish and install the application with ClickOnce.
I've been wondering if you can give me a hint as to what might cause this problem, and how I could get rid of it.
Thanks in advance,
Gabor