Menu

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.

Show posts Menu

Messages - Eisverygoodletter

#1
sorry for the late reply...

The Issue fixed itself after I restarted Visual Studio 2019. Probably because of Visual Studio not updating the linking. Everything seems to work fine after I restarted Visual studio (and my computer). About the Debug or Release version i'm using, I was dynamically linking with Release, using precompiled versions from both websites for x32.

Basically I just had to restart Visual studio :|

Sorry for wasting your time :P
#2
Another really odd thing is that if I do

tgui::Widget::Ptr widgetPtr = gui.get("loadFromFile");
tgui::Button::Ptr ptrIWant = std::dynamic_pointer_cast<tgui::Button>(widgetPtr);

It doesn't throw me any errors, until I use a function like

ptrIWant->setSize();

where it gives me the read access violation error.

Some other functions such as
ptrIWant->isMouseDown();

somehow don't throw a read access violation error
#3
If I run

tgui::Widget::Ptr a = gui.get("loadFromFile");
std::cout << (a == nullptr);

it outputs 0 (it's not a nullptr)
If i use any other names, it outputs 1, (because of nullptr)

(attached file with startMenu.txt below. I checked the name inside)
#4
currently, I have this code:

sf::RenderWindow window{ {800, 600}, "TGUI window with SFML" };
tgui::GuiSFML gui{ window };
gui.loadWidgetsFromFile("menus/startMenu.txt");
auto b = gui.get<tgui::Button>("loadFromFile");
gui.mainLoop();

the program throws a read access violation error on the gui.get<tgui::Button>("loadFromFile");
I can confirm that without this line the page loads normally.
I've already asked at stackoverflow https://stackoverflow.com/q/69693109/16541868 , but I didn't get any answers :(