Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Bug with Music instance when close the application.  (Read 4347 times)

0 Members and 1 Guest are viewing this topic.

NinjaFighter

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
    • http://www.sebagames.wordpress.com
Bug with Music instance when close the application.
« on: April 14, 2011, 11:37:35 pm »
I found a strange reading error when I create a Music instance and close the application, this error only performs when I run the standalone application (using Ctrl+F5 instead of F5).

I don't know what can be.
Here you can see a minimal code that reproduces this bug:


Code: [Select]

        static void Main(string[] args) {
            VideoMode vm = new VideoMode(320, 240);
            RenderWindow app = new RenderWindow(vm, "SebaTest SFML");
            app.Closed += new EventHandler(app_Closed);

            Music mMusic = new Music("music.ogg");

            while(app.IsOpened()) {
                app.DispatchEvents();
                app.Display();
            }
        }

        static void app_Closed(object sender, EventArgs e) {
            RenderWindow rw = (RenderWindow)sender;
            rw.Close();
        }




EDIT:

Now, I test it on my notebook with Windows7, and works. This only happens in my desktop machine for now, and under Windows XP.

EDIT 2:

Now, Again, I'm doing tests on my desktop machine, but under Windows7, and works fine, so looks like the problem was only under my WinXP. Is very strange, because I've already played (and programed) games with openal.  :?

OniLinkPlus

  • Hero Member
  • *****
  • Posts: 500
    • View Profile
Bug with Music instance when close the application.
« Reply #1 on: April 15, 2011, 02:08:43 am »
What does the error say?
I use the latest build of SFML2

NinjaFighter

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
    • http://www.sebagames.wordpress.com
Bug with Music instance when close the application.
« Reply #2 on: April 15, 2011, 03:30:57 am »


This is the error, I'm using a Spanish WinXP, so, this said something like:

The command at "0x04cb53cc" reference to memory at "0x04d3b9c0". The memory cannot be "read".

Click at Ok to close the program

NinjaFighter

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
    • http://www.sebagames.wordpress.com
Bug with Music instance when close the application.
« Reply #3 on: April 15, 2011, 06:19:01 am »
I've tested it on my girlfriend's netbook, and also the error appears. The operating system is WinXP again, so... looks like this error occurs on each run under WinXP

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Bug with Music instance when close the application.
« Reply #4 on: April 15, 2011, 07:45:16 am »
Are you sure that you use the OpenAL32.dll that is provided with SFML, and not some other version that would be installed in a standard path?
Laurent Gomila - SFML developer

NinjaFighter

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
    • http://www.sebagames.wordpress.com
Bug with Music instance when close the application.
« Reply #5 on: April 16, 2011, 02:13:50 am »
Yes, I'm using the same openal32.dll file that was included in Sfml folder, anyway, it's strange because only happens under WinXP, with the same dll. Can't be my soundcard, because I'm using the same for WinXP and Win7.

NinjaFighter

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
    • http://www.sebagames.wordpress.com
Bug with Music instance when close the application.
« Reply #6 on: April 20, 2011, 07:03:15 pm »
Is there any news about this problem? Someone have the same problem? or it ocurrs only on my two machines with xp?

NinjaFighter

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
    • http://www.sebagames.wordpress.com
Bug with Music instance when close the application.
« Reply #7 on: April 22, 2011, 07:14:59 pm »
cri cri...

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Bug with Music instance when close the application.
« Reply #8 on: April 22, 2011, 08:27:26 pm »
Quote
Someone have the same problem?

Apparently, no ;)
Laurent Gomila - SFML developer

NinjaFighter

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
    • http://www.sebagames.wordpress.com
Bug with Music instance when close the application.
« Reply #9 on: April 22, 2011, 09:58:43 pm »
Look, I uploaded a minimalistic project, that reproduces this bug.
So, if you can compile it and run it without debugger under a 32bits WindowsXP, surely you get the same error.

here is the link:
http://www.megaupload.com/?d=4UZ3QICX

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Bug with Music instance when close the application.
« Reply #10 on: April 22, 2011, 10:31:16 pm »
I only have a 64 bits Windows 7, sorry I can't test it myself.
Laurent Gomila - SFML developer

NinjaFighter

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
    • http://www.sebagames.wordpress.com
Bug with Music instance when close the application.
« Reply #11 on: April 23, 2011, 03:43:56 am »
What a pity  :cry:
I recently finish my api port from XNA to SFML2, but when I test under XP, this error appears every time after close my application  :cry:

Any sugestion about what can be?... it's very very strange, maybe I'm an idiot and I forgot an important thing, but I don't know how to evade this error. Even, this error happens too in other contexts now, not only when I loads a music, really, I can't figure what generates this error...

What's the real difference about running SFML2 directly or with debugger? It's very frustrating, because, all work perfectly if I run with debugger  :(

I'm confused.

NinjaFighter

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
    • http://www.sebagames.wordpress.com
Bug with Music instance when close the application.
« Reply #12 on: April 23, 2011, 04:31:14 am »
I'm testing now, the last build of SFML2 (again), I open the sound example, and the error appears again, so, isn't my project, but SFML2 doesn't work properly on Windows XP, not only my Windows XP, because I test it on 2 different machines.

Another info: In that case, the error performs with and without debugging, so, there's a bug under windowsXP 99% sure.