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

Author Topic: [SOLVED] SFML broken in Visual Studio 2013 Update 2?  (Read 4125 times)

0 Members and 1 Guest are viewing this topic.

alexlhoffman

  • Newbie
  • *
  • Posts: 4
    • View Profile
[SOLVED] SFML broken in Visual Studio 2013 Update 2?
« on: July 03, 2014, 04:22:59 am »
Hello.

I am running Visual Studio Professional 2013, Update 2. I compiled SFML 2.1 source from the site, and also the latest source from git. For both of them, even running the sample code results in strange behavior.

About 20% of the time, it will run properly, but in the output it says "The thread 0x1e60 has exited with code 1938423808 (0x738a0000)."

The rest of the time, it will open the SFML window, but it's white, and Visual Studio says it "has triggered a breakpoint." After hitting continue multiple times, it says "Unhandled exception at 0x00D70849 in test.exe: 0xC000041D: An unhandled exception was encountered during a user callback." If I keep hitting continue after that, it says "Unhandled exception at 0x00D70849 in test.exe: 0xC0000005: Access violation writing location 0x00000008."

The simple act of terminating it, and then running again will result in either it working, or it failing, seemingly randomly.

Specs:

OS: Windows 8.1 Pro Update (legal)
IDE: Visual Studio Professional 2013 (legal)
SFML: 2.1 source (from sfml-dev.org), and the latest git.
IDE Extensions: JetBrains ReSharper and Visual Paradigm
GPU: 2x GTX 780 Ti in SLI
GPU Driver: GeForce 340.43 Driver (BETA)

Other than the driver, I don't see why it's failing...
« Last Edit: July 03, 2014, 09:21:15 am by alexlhoffman »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
AW: SFML broken in Visual Studio 2013 Update 2?
« Reply #1 on: July 03, 2014, 07:40:37 am »
Run it in debug mode and ler the debugger show you where it crashes, including the callstack.
How do other OpenGL application run on your system?
Try using a non beta driver.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

alexlhoffman

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: SFML broken in Visual Studio 2013 Update 2?
« Reply #2 on: July 03, 2014, 08:18:07 am »
Hello,

When I run with the debugger, it crashes (ultimately) on a constructor for sf::RenderWindow. The call stack:

    003d0844()   Unknown
    [Frames below may be incorrect and/or missing]   
    [External Code]   
    sfml-window-d-2.dll!52a370a9()   Unknown
    [External Code]   
    WRusr.dll!738ae56f()   Unknown
    sfml-window-d-2.dll!52a34cb2()   Unknown
    sfml-window-d-2.dll!52a25801()   Unknown
    sfml-window-d-2.dll!52a3e5eb()   Unknown
    sfml-window-d-2.dll!52a245b5()   Unknown
    sfml-graphics-d-2.dll!522a5896()   Unknown
>   test.exe!main() Line 5   C++
    [External Code]   

main(), line 5 contains:
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");

The entire project is just the example (i.e. http://pastebin.com/VicDBNGR ).

I have not encountered any issues with OpenGL in any other applications (for example, in emulators). The compiled versions of SFML examples (the ones that come with the source) all seem to run fine as well.

Does it still seem like a graphics driver issue?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: SFML broken in Visual Studio 2013 Update 2?
« Reply #3 on: July 03, 2014, 08:45:06 am »
WRusr.dll = Webroot SecureAnywhere by Webroot Inc.

You might want to try and get rid of that (temporarily) and try again. Some AV and "security" measures can really screw up things from time to time.

It might also be smart to copy the PDB files from the SFML build directory, so you actually get debug symboles for the SFML libs and thus know what 52a370a9 and 52a34cb2 etc. actually represent.

But you're not running things in a VM, right?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

alexlhoffman

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: SFML broken in Visual Studio 2013 Update 2?
« Reply #4 on: July 03, 2014, 08:49:35 am »
Wow, I totally didn't notice that and link that back to Webroot D: Well, that's very strange... Thank you very much, that fixed it! Also thanks for the tip about the PDB files.

And no, I am not using a VM.

Again, thank you! :D

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: SFML broken in Visual Studio 2013 Update 2?
« Reply #5 on: July 03, 2014, 08:56:41 am »
Wow, I totally didn't notice that and link that back to Webroot D: Well, that's very strange...
Webroot most likely injects itself into any application you're running, which can help with security, but it can also screw up things quite a bit.

You can verify that by running Proc Mon and checking what DLLs an application loads.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

alexlhoffman

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: SFML broken in Visual Studio 2013 Update 2?
« Reply #6 on: July 03, 2014, 09:13:45 am »
Yep, sure enough, WRusr.dll is used by the project. What's interesting is that the dll is actually created in the project folder, then accessed. Also, it says it was created by test.exe.

But anyway, I suppose all that is off topic. Needless to say, the solution is to disable Webroot when developing (it seems whitelisting the app doesn't work, I'm assuming because it gets rebuilt).

 

anything