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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Chringo

Pages: [1]
1
Posted the issue. Not sure if the body text from the initial post is necessary anymore since we've kind of drifted towards Freetype and Font.cpp. Anyway, it was the initial findings. Tell me if the issue needs any clarifications.

The body of FT_Glyph_Stroke can be found here. Might look into it later in the week.
http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/src/base/ftstroke.c#n2302

2
Tested with the master branch on GitHub and the memory leak still exist. Then I changed the parameter in Font.cpp on line 561 to true and there are no longer any memory leaks. I built SFML in Win32 debug/release but I guess we have to be more thorough?

3
I'll do that since I've only pulled 2.4.2 from your website - https://www.sfml-dev.org/download/sfml/2.4.2/

Glyphs shouldn't be destroyed then, as the documentation states on Freetype? - https://www.freetype.org/freetype2/docs/reference/ft2-glyph_stroker.html#FT_Glyph_Stroke

4
Hi, I need confirmation on this bug before I post an issue on GitHub:
http://stackoverflow.com/a/44074908/5044558
As the answer states, it looks like a line in Font.cpp is incorrect?
https://github.com/SFML/SFML/blob/master/src/SFML/Graphics/Font.cpp#L561

Working with SFML 2.4.2 on Windows 7 64-bit version, I've noticed an issue with sf::Text::setOutlineThickness(float). Once it is used in the program, except for default value 0, crtdbg dumps a memory leak of various sizes of bytes but always the same amount. I believe this is related to the size of the string, if the text gets drawn, and if the parameter of setOutlineThickness is accepted, demonstrated here:

    /// Initial set-up
    sf::Text test;
    test.setString("A");
    // ... Set charactersize, font, fillcolor, etc ...
    test.setOutlineThickness(1);
    test.setOutlineColor(sf::Color::Black);

    /// Make a drawcall for test later in the program
    void Game::draw(sf::RenderTarget & target, sf::RenderStates states) const
    {
        target.draw(test, states);
    }

This produces a leak the size of the string, i.e. "A": 
{8601} normal block at 0x0000000005CA5C90, 60 bytes long.
 Data: <                > 03 00 07 00 0B 00 0F 00 13 00 17 00 1B 00 1F 00
{8600} normal block at 0x0000000005E03A20, 120 bytes long.
 Data: <                > 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
{8599} normal block at 0x0000000005E2A680, 960 bytes long.
 Data: <                > 00 00 00 00 80 07 00 00 0D 01 00 00 80 07 00 00
{8598} normal block at 0x0000000005CA36B0, 72 bytes long.
 Data: <        h       > F0 1A 9D 05 00 00 00 00 68 AE 83 DB FE 07 00 00

I could expand more from my question on StackOverflow if this isn't enough.

This person has the same problem but I wasn't sure if I should revive the post.
https://en.sfml-dev.org/forums/index.php?topic=21391.0

Pages: [1]