SFML community forums

Bindings - other languages => DotNet => Topic started by: diRe on June 11, 2011, 07:50:38 pm

Title: [SFML 2.0] App. crash when using Image and quitting the app?
Post 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:
Code: [Select]
   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?
Title: [SFML 2.0] App. crash when using Image and quitting the app?
Post by: diRe on June 21, 2011, 09:09:46 pm
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.
Title: [SFML 2.0] App. crash when using Image and quitting the app?
Post by: BuGG on July 08, 2011, 04:22:10 pm
I copied your code into a new project and it runs fine here using VS 2010 x86 profile. (C# / SFML.NET 2.0)