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

Author Topic: Sfml 1.3 Visual studio express 2008 error  (Read 7006 times)

0 Members and 2 Guests are viewing this topic.

pekl

  • Newbie
  • *
  • Posts: 5
    • View Profile
Sfml 1.3 Visual studio express 2008 error
« on: June 29, 2008, 10:27:38 pm »
Hi,
I've tried compiling just a simple program to test the sfml library.

The program is really simple.

#include <SFML/Window.hpp>
int main()
{
sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window");
while (true)
   {
   App.Display();
   }
    return EXIT_SUCCESS;
}

I link the VC2008 libraries and use the supplied DLL-files.
In debug mode I use the -d libraries and in release I use the regular libraries.

In debug mode I get the error message "Run-Time Check Failure #2 - Stack around the variable 'State' was corrupted."

And relaese mode doesn't work at all.

I've also tried compiling the libraries using the supplied vc2000 Solution and used the libraries and dll's with no solution to the problem.

It allways crashes when the window is about to be initiated at "sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window");"

Metaby

  • Newbie
  • *
  • Posts: 23
    • View Profile
Sfml 1.3 Visual studio express 2008 error
« Reply #1 on: June 29, 2008, 11:41:43 pm »
afaik you have to link the sfml-system-d.lib to your linker
I hacked 127.0.0.1 *g*

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Sfml 1.3 Visual studio express 2008 error
« Reply #2 on: June 30, 2008, 03:11:35 am »
Hi

What's your OS ? Are you running a 64 bits system ?
Laurent Gomila - SFML developer

pekl

  • Newbie
  • *
  • Posts: 5
    • View Profile
Sfml 1.3 Visual studio express 2008 error
« Reply #3 on: June 30, 2008, 09:47:47 am »
I have linked "sfml-window-d.lib sfml-system-d.lib sfml-main-d.lib", I'm running windows XP SP2 32-bit.

I've tried both a win32 consol and win32 project solution in visual studio.

This is the solution/project file http://www.klaesson.net/sfmltest.rar

SirJulio

  • Full Member
  • ***
  • Posts: 241
    • View Profile
Sfml 1.3 Visual studio express 2008 error
« Reply #4 on: June 30, 2008, 10:10:43 am »
Hi,

i don't get the message, but your code is not correct. You don't check incoming events : your application freezes (I'm pretty sure that's the reason of your problem).

Add an event loop in your main loop (while (app.GetEvent(...) etc ...).

pekl

  • Newbie
  • *
  • Posts: 5
    • View Profile
Problem "solved"
« Reply #5 on: June 30, 2008, 11:33:38 am »
Ok,

Upon debugging, I saw that I got a break point in joystick.cpp at line 111.

Then I tested to unplug my USB soundcard (Hercules DJ consol) and it solved the problem(!). Some kind of driver error? Library error?

I guess I have to use only my internal sound card for now then.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Sfml 1.3 Visual studio express 2008 error
« Reply #6 on: June 30, 2008, 11:42:19 am »
That's a weird bug. Unfortunately I won't be able to debug this, but obviously your system is taking your sound card as a joystick and it messes things up somewhere. So I'm not sure it is a SFML bug.
Laurent Gomila - SFML developer

pekl

  • Newbie
  • *
  • Posts: 5
    • View Profile
Sfml 1.3 Visual studio express 2008 error
« Reply #7 on: June 30, 2008, 12:57:43 pm »
I tried once more after updating the sound card drivers but the fault remain.

It's probably the midi interface and/or the controller knobs on the sound card that are handled as a joystick.

T.T.H.

  • Full Member
  • ***
  • Posts: 112
    • View Profile
Sfml 1.3 Visual studio express 2008 error
« Reply #8 on: July 03, 2008, 12:12:51 am »
edit: moved my original post here.

sph3re

  • Newbie
  • *
  • Posts: 3
    • View Profile
Maybe that can help
« Reply #9 on: July 16, 2008, 09:31:49 pm »
i have exactly the same error. I also rebuild the sfml. There seemes to be something wrong with RenderWindow::ForceContextInit. I could debug until this line (WindowImpl.cpp)
Code: [Select]
WindowImpl* WindowImpl::New()
{
    WindowImpl* Window = NULL;

    #if defined(SFML_SYSTEM_WINDOWS)

        // Win32 window
 ->     Window = new WindowImplWin32();


the error seemes to be there... i couldn debug farer. also by pressing f11(new.cpp not found).

ps: i have no external sound card :?
ps2: vista 64 bit home premium
excuse my English, I'm German ;)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Sfml 1.3 Visual studio express 2008 error
« Reply #10 on: July 17, 2008, 02:43:46 am »
Hi

This problem is fixed in the current SVN version.
Laurent Gomila - SFML developer

 

anything