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

Author Topic: Running into seemingly random error in SFML code  (Read 3049 times)

0 Members and 1 Guest are viewing this topic.

chessguy

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
Running into seemingly random error in SFML code
« on: October 24, 2013, 04:41:17 am »
Greetings. So, go back a week ago. I was doing fine using VS 2012 with SFML.

Around this time, I got an odd error: while loading the font, is crashed. This after it had worked for weeks previous. I relinked everything, and it somehow worked.

It got me thinking, though: it would be useful to have the debug files on SFML, so I can step into it, as I would often like to. So, I was going to try building it again, to get said files.

All seemed well, and the pdb files DID work, but... it kept crashing there.

Not making any headway, I switched back. Until today, when I needed some variadic templates, which requires 2013. It gave me the same error while loading the font. I tried rebuilding it again, this time using 2013, with the same result.

It occurs when calling font.loadFromFile. Near the start of that is cleanup(). On the last line of cleanup - clearing the pixel buffer (of size 0), it... breaks.



Yes, this is my fourth attempt at making a snake clone :(. I was searching the memory locations - VS has some magic numbers it marks them with - but didn't find anything.

Any idea of the problem? It was suggested to me to make a minimal working example. In that test (same libraries and everything), it loaded the font fine, but died when I tried to draw it.


eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
AW: Running into seemingly random error in SFML code
« Reply #1 on: October 24, 2013, 06:59:59 am »
Just make sure, you've built SFML fresh for VS 2013, right? And you're not mixing debug libraries and release mode or the other way around, right?
And you're not using global resources, i.e. a global font object, right?

Could you anyways quickly write a complete example?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

chessguy

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
Re: Running into seemingly random error in SFML code
« Reply #2 on: October 24, 2013, 04:54:04 pm »
Yes, no, no.

I wrote another example, and... it worked. Apparently the other one was with VS 2012.


chessguy

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
Re: Running into seemingly random error in SFML code
« Reply #3 on: October 25, 2013, 06:20:28 pm »
Still stuck. I tried a fresh rebuild again, but same problems (including an updated Cmake).

I am on a Windows 7 64-bit, but as I have VS Express, and no desired to make 64-bit applications, generated the project as the non-ARM, non-@Win64 one. Was this correct?

I saw you say elsewhere, you plan to make a nightly build for this. Any timeframe on that that you know of?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Running into seemingly random error in SFML code
« Reply #4 on: October 25, 2013, 08:19:38 pm »
Still stuck. I tried a fresh rebuild again, but same problems (including an updated Cmake).

I saw you say elsewhere, you plan to make a nightly build for this. Any timeframe on that that you know of?
I really don't know what you're doing, but I've never really had any issues.  :-\
I'll make sure to get something together as soon as possible. Need to adapt a few build scripts etc... ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

chessguy

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
Re: Running into seemingly random error in SFML code
« Reply #5 on: October 26, 2013, 12:53:13 am »
I don't know what I am doing either, apparently. I seem to break something ever time I change something, as can be seen by my post history here. Hoping it ends, someday...

I wasn't aware you could successfully build it and still not work, though. Mixing debug and release can break, and that makes sense, but that is not the case here.