SFML community forums
Bindings - other languages => DotNet => Topic started by: diRe on June 11, 2011, 07:50:38 pm
-
Hello,
I recently restarted working on my current project using SFML.Net 2.0.
I encounted a crash, whenever loading some *.png files and then quitting the program. So I looked into it, and it seems, the crash always occurs when loading an Image (Image foo = new Image("file.png"); ) and then quitting the program.
Specifically, the following code results in an App. crash after the program ends:
public static class Program
{
public static void Main() {
SFML.Graphics.Image img = new SFML.Graphics.Image("img/enemy.png");
Console.WriteLine("{0} x {1} px", img.Width, img.Height); // All fine, resulting text is as expected
}
}
I downloaded the latest SFML.Net 2.0 Snapshot, but still the same problem. Anyone else running into this problem?
-
So, as nobody answered I seem to be the only (testing) person to run into this problem.
Now, I tried everything:
x86 .Net and C
x64 .Net and C
as they were provided in the Snapshot. I even recompiled everything and tried again, still the same.
If it helps anything, there was this one time, when the console printed an error message: "Failed to share OpenGL context." (or something like that).
Now I switched back to Version 1.6 and everything works just fine.
-
I copied your code into a new project and it runs fine here using VS 2010 x86 profile. (C# / SFML.NET 2.0)