Hi, I compiled my app on android and it crashed at the beginning. This is what I get while running ndk-dbg:
Thread 1 "thundergames.ki" received signal SIGSEGV, Segmentation fault.
0x5298f1a0 in sf::Mutex::lock() () from /home/kamil/Pulpit/android/test1/obj/local/armeabi-v7a/libsfml-system.so
Stacktrace:
#0 0x5298f1a0 in sf::Mutex::lock() () from /home/kamil/Pulpit/android/test1/obj/local/armeabi-v7a/libsfml-system.so
#1 0x5298f154 in sf::Lock::Lock(sf::Mutex&) () from /home/kamil/Pulpit/android/test1/obj/local/armeabi-v7a/libsfml-system.so
#2 0x529a133c in sf::priv::VideoModeImpl::getDesktopMode() ()
from /home/kamil/Pulpit/android/test1/obj/local/armeabi-v7a/libsfml-window.so
#3 0x5299dd34 in sf::VideoMode::getDesktopMode() () from /home/kamil/Pulpit/android/test1/obj/local/armeabi-v7a/libsfml-window.so
#4 0x52c60c18 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at jni/main.cpp:9
#5 0x52c628b6 in _GLOBAL__sub_I_main.cpp(void) () at jni/main.cpp:143
#6 0x400d82d4 in _start () from /home/kamil/Pulpit/android/test1/obj/local/armeabi-v7a/system/bin/linker
#7 0x400da132 in ?? () from /home/kamil/Pulpit/android/test1/obj/local/armeabi-v7a/system/bin/linker
#8 0x51ef71c4 in loadLibrary(char const*, _JNIEnv*, _jobject*&) ()
from /home/kamil/Pulpit/android/test1/obj/local/armeabi-v7a/libsfml-activity.so
#9 0x51ef7382 in ANativeActivity_onCreate () from /home/kamil/Pulpit/android/test1/obj/local/armeabi-v7a/libsfml-activity.so
#10 0x4025b8cc in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
I couldn't reproduce exact error using another code, but this one:
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include <SFML/Audio.hpp>
#include <SFML/Network.hpp>
int main(int argc, char *argv[])
{
sf::RenderWindow window(sf::VideoMode::getDesktopMode(), "");
sf::Mutex mutex;
mutex.lock();
mutex.unlock();
sf::View view = window.getDefaultView();
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
switch (event.type)
{
case sf::Event::Closed:
window.close();
break;
case sf::Event::Resized:
view.setSize(event.size.width, event.size.height);
view.setCenter(event.size.width/2, event.size.height/2);
window.setView(view);
break;
}
}
window.clear(sf::Color::White);
window.display();
}
}
Causes this:
0x4011a7ac in __futex_syscall3 ()
from /home/kamil/Pulpit/android/sample/obj/local/armeabi-v7a/system/lib/libc.so
Do you have any idea how to fix this?
Thanks in advance.