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

Author Topic: Crash after clear  (Read 2777 times)

0 Members and 3 Guests are viewing this topic.

hythron

  • Newbie
  • *
  • Posts: 8
    • View Profile
Crash after clear
« on: June 28, 2010, 01:47:54 pm »
After reinstalling visual studio 2008 I suddenly get all kind of erros within my project that worked fine before.

first the know crash bug with sf::String. I heard it was fixed in 1.6 but for me it is still there.

when I comment out the sf::String I get another crash after the App.Clear() function. Yes I have used the debug Libraries like sfml-window-b.lib

whyyyyyy  :cry:

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Crash after clear
« Reply #1 on: June 28, 2010, 01:57:20 pm »
You're probably still using the SFML 1.5 DLLs, are you sure that you completely removed them?
Laurent Gomila - SFML developer

hythron

  • Newbie
  • *
  • Posts: 8
    • View Profile
1.6 draw issues
« Reply #2 on: June 28, 2010, 02:37:54 pm »
thx, that was the problem! project is running again.
but now I am using 1.6 I get draw image issues. I have a scroll map with tiles. every tile have now a transparent border or do not fit well.  is there something changed within the draw/view engine because its not my code because it was fine in 1.5

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Crash after clear
« Reply #3 on: June 28, 2010, 02:42:34 pm »
Can you post a screenshot?
Laurent Gomila - SFML developer

hythron

  • Newbie
  • *
  • Posts: 8
    • View Profile
Crash after clear
« Reply #4 on: June 28, 2010, 02:52:54 pm »


its weird because it is just simple code like x=imageWidth*i

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Crash after clear
« Reply #5 on: June 28, 2010, 03:03:14 pm »
Does it work if you turn image smoothing off?
Laurent Gomila - SFML developer

hythron

  • Newbie
  • *
  • Posts: 8
    • View Profile
Crash after clear
« Reply #6 on: June 28, 2010, 06:38:26 pm »
You are amazing. Only a couple of tiles are wrong but that's probably within my code.
Thank you so much for the quick replies.


hythron

  • Newbie
  • *
  • Posts: 8
    • View Profile
Crash after clear
« Reply #7 on: June 28, 2010, 08:20:17 pm »
The reason because some tiles still did't fit is because I am rotating and set another center to the sprites.
Do you have any clue why this is?

Code: [Select]

sprite.SetCenter(bgTileSize,bgTileSize);
sprite.SetRotation(180);
sprite.SetImage(ImageControl::Instance()->GetImage(BG_TILE_WATER_END));

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Crash after clear
« Reply #8 on: June 28, 2010, 09:08:44 pm »
Did you try the center without the rotation, and vice-versa? Is bgTileSize a decimal value?
Laurent Gomila - SFML developer

hythron

  • Newbie
  • *
  • Posts: 8
    • View Profile
Crash after clear
« Reply #9 on: June 28, 2010, 10:00:42 pm »
It's a decimal float value set to 320, it only occurs when I use sf::Sprite::SetRotation() func.
SetCenter works fine.

hythron

  • Newbie
  • *
  • Posts: 8
    • View Profile
Crash after clear
« Reply #10 on: June 30, 2010, 08:59:09 pm »
Is there a solution or alternative to rotate a sprite and stay fitting?
else I will do the rotation within the image.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Crash after clear
« Reply #11 on: June 30, 2010, 11:13:23 pm »
There's no other solution, but rotating 180° should not produce such artifacts.

Can you try with SFML 2? Maybe with a simple code, if your game is too big.
Laurent Gomila - SFML developer