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

Author Topic: Crash error with Windows Vista / Visual Studio 2008  (Read 9097 times)

0 Members and 2 Guests are viewing this topic.

SkyGriffin

  • Newbie
  • *
  • Posts: 2
    • View Profile
Crash error with Windows Vista / Visual Studio 2008
« Reply #15 on: February 15, 2010, 10:00:18 pm »
In my programme, setting:

#define _HAS_ITERATOR_DEBUGGING 0

gives a crash when calling:

rendertarget::clear(const Color& FillColor = Color(0, 0, 0)).

No idea why. Removing the define seemed to fix the issue.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Crash error with Windows Vista / Visual Studio 2008
« Reply #16 on: February 16, 2010, 12:02:33 am »
Because it makes STL containers have (or not) additional members, and their definition doesn't match the one they had when SFML was compiled. You can see it easily by comparing sizeof(std::vector<int>) when _HAS_ITERATOR_DEBUGGING is defined to 0 and when it is not.

I have no idea why it happens on a call to RenderTarget::Clear though, it doesn't seem to involve any STL container.
Laurent Gomila - SFML developer

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Crash error with Windows Vista / Visual Studio 2008
« Reply #17 on: February 16, 2010, 01:00:00 am »
Quote from: "Laurent"
I have no idea why it happens on a call to RenderTarget::Clear though, it doesn't seem to involve any STL container.
Probably the inconsistent libraries result in undefined behaviour (anywhere in the code), which manifests only at Clear().

Such errors are really evil because they're very hard to find. Some of them have already cost me hours of debugging... ;)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

ncarrasco

  • Newbie
  • *
  • Posts: 9
    • View Profile
Crash error with Windows Vista / Visual Studio 2008
« Reply #18 on: February 17, 2010, 01:23:40 am »
Hi,

I had to format my computer and then I installed Windows 7 instead of Vista, I had recompiled the libraries and worked fine, haven't tested if it works with the ones that came originally as now I have Windows 7 it could work without doing a recompilation.

Many thanks and sorry for my delay, I could't chech this before.

Nicolas.

WitchD0ctor

  • Full Member
  • ***
  • Posts: 100
    • View Profile
    • http://www.teleforce-blogspot.com
Crash error with Windows Vista / Visual Studio 2008
« Reply #19 on: February 23, 2010, 02:03:23 am »
so it works on Windows 7? thats good because im gonna build a new computer soon with windows 7 64 bit and was wondering if SFML would still work with it, Still stuck working on my game only at school in the mean time :/
John Carmack can Divide by zer0.