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

Author Topic: Image Destructor -> Crash  (Read 3604 times)

0 Members and 1 Guest are viewing this topic.

Wurstinator

  • Newbie
  • *
  • Posts: 33
    • View Profile
Image Destructor -> Crash
« on: January 13, 2011, 10:26:15 pm »
Hi,
I'm using Code::Blocks. You know, you can choose between "Debug" and "Release" when compiling a project and if you choose the first, there will be a console window for debugging purposes.
When I close my project the normal way (with exit or ending the main() method) everything works fine.
But when I close the debugging console of Code::Blocks, Windows gives me an error. The Debugger says the following:
#0 5F0D530E   glDeleteTextures() (C:\WINDOWS\system32\opengl32.dll:??)
#1 6871CF5C   sf::Image::~Image() (C:\WINDOWS\system32\sfml-graphics.dll:??)
#2 00404357   __tcf_2() (D:\Programme\CodeBlocks\Projects\Shooter\spriteset.cpp:6)
#3 77C09E24   msvcrt!_initterm() (C:\WINDOWS\system32\msvcrt.dll:??)
#4 77C09EC5   msvcrt!_cexit() (C:\WINDOWS\system32\msvcrt.dll:??)
#5 00000000   0x00000000 in ??() (??:??)

I'm using SFML 1.6.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Image Destructor -> Crash
« Reply #1 on: January 13, 2011, 11:28:05 pm »
Did you link the correct configuration of the SFML libraries?
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Wurstinator

  • Newbie
  • *
  • Posts: 33
    • View Profile
Image Destructor -> Crash
« Reply #2 on: January 14, 2011, 04:50:18 pm »
I hope so :/

Are that the "Linker Settings":
-lsfml-audio
-lsfml-window
-lsfml-graphics
-lsfml-system
?

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Image Destructor -> Crash
« Reply #3 on: January 14, 2011, 05:40:02 pm »
Exiting by closing the console window forces the application to exit and any cleanup code you wanted to run won't run. So per definition, the application exits abnormally.

also saw on your linker settings, your linkage isn't in order, you have to link after dependency. IE: Graphics depends on Window, Window depends on System.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Wurstinator

  • Newbie
  • *
  • Posts: 33
    • View Profile
Image Destructor -> Crash
« Reply #4 on: January 16, 2011, 07:48:06 pm »
So I have to put it like this?
-lsfml-audio
-lsfml-system
-lsfml-window
-lsfml-graphics

Terrydil

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Image Destructor -> Crash
« Reply #5 on: January 16, 2011, 08:53:52 pm »
Quote
The rule is the following : if library XXX depends on (uses) library YYY, put XXX first and then YYY.


-lsfml-audio
-lsfml-graphics
-lsfml-window
-lsfml-system