1
General / Re: Debugging SFML android app
« on: February 06, 2016, 10:42:14 pm »
So thanks to the help provided by texus, I found out that the crash in fact is not related to TGUI, but to font.loadFromFile().
This is a minimal reproducible example:
I guess I should open a bug report at Github?
EDIT: Bug report created.
This is a minimal reproducible example:
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include <iostream>
int main()
{
sf::Window window(sf::VideoMode(800, 600), "My window");
sf::Font font;
if(!font.loadFromFile("assets/sansation.ttf")) // <-- CRASH
{
std::cerr << "Could not load font" << std::endl;
return 1;
}
// run the program as long as the window is open
while (window.isOpen())
{
// check all the window's events that were triggered since the last iteration of the loop
sf::Event event;
while (window.pollEvent(event))
{
// "close requested" event: we close the window
if (event.type == sf::Event::Closed)
window.close();
}
}
return 0;
}
#include <SFML/Graphics.hpp>
#include <iostream>
int main()
{
sf::Window window(sf::VideoMode(800, 600), "My window");
sf::Font font;
if(!font.loadFromFile("assets/sansation.ttf")) // <-- CRASH
{
std::cerr << "Could not load font" << std::endl;
return 1;
}
// run the program as long as the window is open
while (window.isOpen())
{
// check all the window's events that were triggered since the last iteration of the loop
sf::Event event;
while (window.pollEvent(event))
{
// "close requested" event: we close the window
if (event.type == sf::Event::Closed)
window.close();
}
}
return 0;
}
I guess I should open a bug report at Github?
EDIT: Bug report created.