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 - lesnoy

Pages: [1]
1
Now I have one more problem. :'( I built .pdb files and put them into the directory with .exe file so I can get
information about SFML function calls, but it seems like Visual Studio doesn't even see these files.
Quote
Frames below may be incorrect and/or missing, no symbols loaded for sfml-graphics-2.dll   
Might it be caused by building project in Release mode? What could I do to fix this?

2
Program crashes exactly in the specific place into the Abstract_button constructor when setOutlineThickness() is called. Unfortunately I have no idea what causes such specific error and debugger can't help me more in that although I know what code causes crash.

3
Graphics / sf::Shape::setOutlineThickness() function causes program crash
« on: February 26, 2019, 10:05:47 am »
Hi, I'm learning SFML and practicing in creating some GUI elements like buttons. Here I have my Abstract_button class constructor.
//Abstract_button is virtually inherited from sf::Shape so I can call its functions
Abstract_button::Abstract_button()
{
        /*...insignifacant details unrelated to the problem...*/

        setFillColor(style()->normal_fill_color());
        setOutlineColor(style()->normal_outline_color());

        //the following line causes program crash
        setOutlineThickness(style()->normal_outline_thickness());
}
The problem is when I call setOutlineThickness() function from this constructor, program crashes for no obvious reason.
Quote
Unhandled exception at 0x747824CB(ucrtbase.dll) in GUI_element.exe: Fatal program exit requested.
This address is the same every time I run the program.
Calling setOutlineThickness() function from member functions or derived class constructor doesn't cause the crash. Calling similar functions like setFillColor() also doesn't result in any unwanted behavior.
//Rect_button is inherited from my Abstract_button class and sf::RectangleShape
Rect_button::Rect_button(const Point& pos, const Size& size)
        :RectangleShape(size)
{
        setPosition(pos);

        //if I put the following code line into this constructor,
        //program will work without any problems
        setOutlineThickness(style()->normal_outline_thickness());
}
I think I should say that I use a little bit modified version of SFML. I edited source code and rebuilt library so sf::RectangleShape is virtually inherited from sf::Shape. I don't think this might result in crashes but I think I should give this information just in case.

Pages: [1]