Yeah, I was using both TGUI and SFML from git.
Great job, thanks for figuring that out!
Great job, thanks for figuring that out!
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 MenuQuote from: texus on 06 February 2016, 21:06:24
Does the following work?auto font2 = std::make_shared<sf::Font>(font);
Quote
: #00 pc 000318d6 /data/app/xyz.simek.theycome-1/lib/arm/libsfml-graphics.so (FT_Stroker_Done+9)
: #01 pc 0001590d /data/app/xyz.simek.theycome-1/lib/arm/libsfml-graphics.so (sf::Font::cleanup()+72)
: #02 pc 00015931 /data/app/xyz.simek.theycome-1/lib/arm/libsfml-graphics.so (sf::Font::~Font()+4)
: #03 pc 0006422b /data/app/xyz.simek.theycome-1/lib/arm/libc++_shared.so (std::__1::__shared_weak_count::__release_shared()+46)
: #04 pc 0005dd1d /data/app/xyz.simek.theycome-1/lib/arm/libtgui.so (tgui::Widget::setFont(tgui::Font const&)+36)
: #05 pc 000423df /data/app/xyz.simek.theycome-1/lib/arm/libtgui.so (tgui::Container::setFont(tgui::Font const&)+6)
: #06 pc 000067cf /data/app/xyz.simek.theycome-1/lib/arm/libsfml-example.so (main+322)
: #07 pc 00006903 /data/app/xyz.simek.theycome-1/lib/arm/libsfml-example.so (sf::priv::main(sf::priv::ActivityStates*)+70)
: #08 pc 00007e6f /data/app/xyz.simek.theycome-1/lib/arm/libsfml-system.so
: #09 pc 0003e7f7 /system/lib/libc.so (__pthread_start(void*)+30)
: #10 pc 00018d9d /system/lib/libc.so (__start_thread+6)
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include <SFML/Audio.hpp>
#include <SFML/Network.hpp>
#include <TGUI/TGUI.hpp>
int main()
{
sf::RenderWindow window{{800, 600}, "Window"};
tgui::Gui gui{window}; // Create the gui and attach it to the window
sf::Font font;
if(!font.loadFromFile("assets/sansation.ttf"))
{
std::cerr << "Could not load font" << std::endl;
return 1;
}
gui.setFont(font);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
gui.handleEvent(event); // Pass the event to the widgets
}
window.clear();
gui.draw(); // Draw all widgets
window.display();
}
} auto font2 = std::make_shared<sf::Font>(font);
gui.setFont(font2);Quote02-06 21:09:13.381 66 66 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-06 21:09:13.381 66 66 F DEBUG : Build fingerprint: 'generic/sdk_phone_armv7/generic:6.0/MRA44C/2166767:eng/test-keys'
02-06 21:09:13.382 66 66 F DEBUG : Revision: '0'
02-06 21:09:13.382 66 66 F DEBUG : ABI: 'arm'
02-06 21:09:13.383 66 66 F DEBUG : pid: 1326, tid: 1340, name: .simek.theycome >>> xyz.simek.theycome <<<
02-06 21:09:13.383 66 66 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
02-06 21:09:13.881 66 66 F DEBUG : r0 00000000 r1 00000000 r2 00000000 r3 00000000
02-06 21:09:13.882 66 66 F DEBUG : r4 a4c3f578 r5 00000000 r6 a4c3f888 r7 ae91d740
02-06 21:09:13.882 66 66 F DEBUG : r8 a5442de4 r9 a4c3f570 sl a4c3f888 fp ad097de4
02-06 21:09:13.883 66 66 F DEBUG : ip ad111ff0 sp a4c3f4e8 lr ad10e721 pc ac768d8c cpsr 60000030
02-06 21:09:13.960 66 66 F DEBUG :
02-06 21:09:13.960 66 66 F DEBUG : backtrace:
02-06 21:09:13.961 66 66 F DEBUG : #00 pc 00008d8c /system/lib/libandroid.so (AAsset_seek+1)
02-06 21:09:13.961 66 66 F DEBUG : #01 pc 0000871d /data/app/xyz.simek.theycome-2/lib/arm/libsfml-system.so (sf::priv::ResourceStream::seek(long long)+8)
02-06 21:09:13.962 66 66 F DEBUG : #02 pc 00015d63 /data/app/xyz.simek.theycome-2/lib/arm/libsfml-graphics.so (sf::Font::loadFromStream(sf::InputStream&)+62)
02-06 21:09:13.962 66 66 F DEBUG : #03 pc 000065e3 /data/app/xyz.simek.theycome-2/lib/arm/libsfml-example.so (main+186)
02-06 21:09:13.963 66 66 F DEBUG : #04 pc 0000680b /data/app/xyz.simek.theycome-2/lib/arm/libsfml-example.so (sf::priv::main(sf::priv::ActivityStates*)+70)
02-06 21:09:13.963 66 66 F DEBUG : #05 pc 00007e6f /data/app/xyz.simek.theycome-2/lib/arm/libsfml-system.so
02-06 21:09:13.964 66 66 F DEBUG : #06 pc 0003e7f7 /system/lib/libc.so (__pthread_start(void*)+30)
02-06 21:09:13.964 66 66 F DEBUG : #07 pc 00018d9d /system/lib/libc.so (__start_thread+6)
sf::Font font;
if(!font.loadFromFile("assets/sansation.ttf"))
{
std::cerr << "Could not load font" << std::endl;
return 1;
}
gui.setFont(font);