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

Author Topic: Error When Closing Window  (Read 10585 times)

0 Members and 2 Guests are viewing this topic.

Sazabi02

  • Newbie
  • *
  • Posts: 10
    • Yahoo Instant Messenger - nojj02
    • View Profile
    • Email
Error When Closing Window
« on: January 23, 2009, 06:43:39 am »
Can you help me please. I'm having trouble with the SFML 1.4.

After going to 1.4 every time I close the Window I an error message saying

Code: [Select]
The instruction at "0x6973c180" referenced memory at "0x014E0654". The memory could not be "read".

Click on OK to terminate the program.


I tried it with a sample from the tutorials too. The "graphics-view.cpp" tutorial and the same thing happened.

Here's the error in the output Window.


Code: [Select]
'SFTest2.exe': Loaded 'E:\Dev\C++\V C++ (SFML)\SFTest2\Debug\SFTest2.exe', Symbols loaded.
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\sfml-window-d.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\opengl32.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\secur32.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\user32.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\glu32.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\ddraw.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\dciman32.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\winmm.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\sfml-system-d.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_597c3456\msvcp90d.dll', Symbols loaded.
'SFTest2.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_597c3456\msvcr90d.dll', Symbols loaded.
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\sfml-graphics-d.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_d08d0375\msvcr90.dll', Symbols loaded.
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\imm32.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\lpk.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\usp10.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\dinput.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\hid.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\setupapi.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\wintrust.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\crypt32.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\msasn1.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\imagehlp.dll'
'SFTest2.exe': Loaded 'C:\Program Files\McAfee\SiteAdvisor\sahook.dll'
'SFTest2.exe': Loaded 'C:\Program Files\RocketDock\RocketDock.dll', Binary was not built with debug information.
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\psapi.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\nview.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\shlwapi.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\shell32.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\ole32.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\oleaut32.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\comctl32.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\version.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03\comctl32.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\ntmarta.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\wldap32.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\samlib.dll'
'SFTest2.exe': Loaded 'C:\Program Files\FlashGet\fgmgr.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\comdlg32.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\wininet.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\normaliz.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\iertutil.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\msctf.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\MSCTFIME.IME'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\nvoglnt.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\mcd32.dll'
'SFTest2.exe': Unloaded 'C:\WINDOWS\system32\mcd32.dll'
'SFTest2.exe': Loaded 'C:\Program Files\Common Files\Logitech\LVMVFM\LVPrcInj.dll'
The thread 'Win32 Thread' (0xae4) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0xf5c) has exited with code 35389440 (0x21c0000).
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\nvwimg.dll', Binary was not built with debug information.
'SFTest2.exe': Unloaded 'C:\WINDOWS\system32\nvwimg.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\nvwddi.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\nvwimg.dll'
'SFTest2.exe': Unloaded 'C:\WINDOWS\system32\nvwimg.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\nvwimg.dll'
'SFTest2.exe': Unloaded 'C:\WINDOWS\system32\nvwimg.dll'
'SFTest2.exe': Loaded 'C:\WINDOWS\system32\nvwimg.dll', Binary was not built with debug information.
'SFTest2.exe': Unloaded 'C:\WINDOWS\system32\nvwimg.dll'
The thread 'Win32 Thread' (0x398) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x580) has exited with code 0 (0x0).
First-chance exception at 0x6973c180 in SFTest2.exe: 0xC0000005: Access violation reading location 0x014e0654.
Unhandled exception at 0x6973c180 in SFTest2.exe: 0xC0000005: Access violation reading location 0x014e0654.


Can anyone tell me what I'm doing wrong?

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Error When Closing Window
« Reply #1 on: January 23, 2009, 08:46:09 am »
OS? Compiler? Minimal example? :)
Have you tried to debug your application, yet?

Sazabi02

  • Newbie
  • *
  • Posts: 10
    • Yahoo Instant Messenger - nojj02
    • View Profile
    • Email
Error When Closing Window
« Reply #2 on: January 23, 2009, 11:25:55 am »
Windows XP, MSVC++ 2008, and yes I did.

It stops somewhere in __crtExitFunction

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Error When Closing Window
« Reply #3 on: January 23, 2009, 02:44:57 pm »
Sorry, no idea from my side, since I'm not using MSVC/Windows.

Sazabi02

  • Newbie
  • *
  • Posts: 10
    • Yahoo Instant Messenger - nojj02
    • View Profile
    • Email
Error When Closing Window
« Reply #4 on: January 23, 2009, 02:47:41 pm »
Thanks anyway. Uhmmm... can anyone else help me?

It was _crtExitProcess not __crtExitFunction btw, sorry.

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Error When Closing Window
« Reply #5 on: January 23, 2009, 04:49:18 pm »
Ah btw, have you tried to build in release mode?

Sazabi02

  • Newbie
  • *
  • Posts: 10
    • Yahoo Instant Messenger - nojj02
    • View Profile
    • Email
Error When Closing Window
« Reply #6 on: January 24, 2009, 02:56:43 am »
Yeah I did.

BTW, Here's where the problem shows up.

[/img]

Sazabi02

  • Newbie
  • *
  • Posts: 10
    • Yahoo Instant Messenger - nojj02
    • View Profile
    • Email
Error When Closing Window
« Reply #7 on: January 25, 2009, 02:17:26 am »
Ok, I tried my program on someone else's pc and it didn't have the errors. The problem might be just with my pc I guess.

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Error When Closing Window
« Reply #8 on: January 25, 2009, 11:05:29 am »
Yep, could be true. When the official SFML tutorials don't work perfectly, there's mostly a problem on the user-side. But it would still be helpful to know what it was when you solve it, so that others who may experience the same problems get the right direction.

Sazabi02

  • Newbie
  • *
  • Posts: 10
    • Yahoo Instant Messenger - nojj02
    • View Profile
    • Email
Error When Closing Window
« Reply #9 on: January 25, 2009, 03:36:15 pm »
I still haven't solved it.

I did a google search on the dlls in the call stack and it says they're my nVidia drivers. This didn't happen with SFML 1.3 so I'm assuming that 1.4 probably has some problems with nVidia drivers. Anyone else have the same problem?

I tried updating my drivers too. Didn't work though. The only difference is that the memory address that conatined the error was moved to a different one.

Laguna

  • Newbie
  • *
  • Posts: 11
    • View Profile
Error When Closing Window
« Reply #10 on: March 10, 2009, 11:19:43 pm »
Well I do have the same problem. Did you solve it by now?

Win Xp 32 bit Sp 3 (also an Nvidia card)
with Visual Studio 2008 and SFML 1.4

The problem only appears, when i tried to use a sf::string. The problem occurs after i set the text of the string.
If the string is only created but with no text, there is no error.

So Far...

Laguna

Sazabi02

  • Newbie
  • *
  • Posts: 10
    • Yahoo Instant Messenger - nojj02
    • View Profile
    • Email
Error When Closing Window
« Reply #11 on: March 11, 2009, 12:22:50 am »
Ohhh... Yeah. I tried it and you're right. The problem is associated with sf::String.  Though even if I don't put text the error comes up and it only disappears when there's no text in my program.

Laguna

  • Newbie
  • *
  • Posts: 11
    • View Profile
Error When Closing Window
« Reply #12 on: March 11, 2009, 09:14:11 am »
It's interesting, that the problem occurs, even if the sf:string object has been deleted long ago before the termination of the program.

Any Guesses? Just using no strings will cause no error, but this is surely not the way intended.

So Far...

Laguna

dunce

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Error When Closing Window
« Reply #13 on: March 11, 2009, 10:08:06 am »
I think this error may occur if you use a string with the default sfml font. Try to use another font, say Arial.ttf.
Code: [Select]
 sf::Font font;
  font.LoadFromFile("Arial.ttf", 32));
  sf::String text;
  text.SetFont("Arial.ttf");
  text.SetText("My String");

In this case the font file Arial.ttf must be in the same folder with your executable file.

Laguna

  • Newbie
  • *
  • Posts: 11
    • View Profile
Error When Closing Window
« Reply #14 on: March 11, 2009, 11:59:43 am »
Hi,

No this didn't fix it. The problem does not seem to be associated with sf::font oder the default font.

It makes no difference wether the text is set via sf::string.SetText() or via the constructor of sf::string.

So Far...

Laguna

 

anything