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

Author Topic: Getting (reproducible) crash on font size changes  (Read 1081 times)

0 Members and 1 Guest are viewing this topic.

xparq

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • GitHub/xparq
    • Email
Getting (reproducible) crash on font size changes
« on: March 21, 2023, 06:51:27 pm »
Hi, I'm new here, and fairly new (2 months) to SFML itself, too.
I've been tinkering with a simple GUI lib (forked Alexandre Bodelot's `sfml-widgets` + ported to SFML3 + lots of other changes) for a few weeks.
Everything's been fine, but in the demo app, where I have a theme font size slider, I've been seeing a crash on changing it to certain sizes. (Not the largest, for example.)

I get no error messages whatsoever, earlier it didn't crash either, but resulted in completely collapsed (but recoverable) font rendering, as in this screenshot:



(Notice how some of the text, with constant font size, is not affected.)

When I could catch it in a debugger, there was an access violation exception due to texture size, deep down in sf::Text / sf::Font, but haven't yet investigated it fully.

I'd like to ask for some advice first: does this look/feel/sound familiar to anyone? (SFML devs, especially, if anyone's seeing this.) Does it smell like misuse (albeit I've been doing pretty standard & trivial stuff), or rather a bug in the lib, by your gut feeling?

Please see the details of my investigation so far at the related GH issue: https://github.com/xparq/sfw/issues/196.

Your insights may help pick the right strategy for further debugging. Thanks!
« Last Edit: March 21, 2023, 06:59:16 pm by xparq »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Getting (reproducible) crash on font size changes
« Reply #1 on: March 22, 2023, 05:34:01 pm »
Can't say I've seen this before. Best to try an reproduce it as a minimal example. If it is an SFML issue, it should be reproducible with a few lines of code.

Have you tried other fonts as well?

Might also want to try and update FreeType itself, as the one shipped with SFML isn't on the latest version.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/