The following code crashes on android since
this commit.
#include <SFML/Window.hpp>
int main()
{
sf::Keyboard::setVirtualKeyboardVisible(true);
}
Backtrace from adb logcat:
02-15 17:27:44.603 949 949 F DEBUG : #00 pc 00083606 /system/lib/libc.so (tgkill+22)
02-15 17:27:44.603 949 949 F DEBUG : #01 pc 000815e8 /system/lib/libc.so (pthread_kill+70)
02-15 17:27:44.603 949 949 F DEBUG : #02 pc 00027205 /system/lib/libc.so (raise+36)
02-15 17:27:44.603 949 949 F DEBUG : #03 pc 000209e4 /system/lib/libc.so (abort+80)
02-15 17:27:44.603 949 949 F DEBUG : #04 pc 005173cb /system/lib/libart.so (art::Runtime::Abort()+377)
02-15 17:27:44.603 949 949 F DEBUG : #05 pc 0014d9f3 /system/lib/libart.so (art::LogMessage::~LogMessage()+1343)
02-15 17:27:44.603 949 949 F DEBUG : #06 pc 003a5252 /system/lib/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+3842)
02-15 17:27:44.603 949 949 F DEBUG : #07 pc 003a5eac /system/lib/libart.so (art::JavaVMExt::JniAbortV(char const*, char const*, char*)+116)
02-15 17:27:44.603 949 949 F DEBUG : #08 pc 00163a10 /system/lib/libart.so (art::ScopedCheck::AbortF(char const*, ...)+62)
02-15 17:27:44.603 949 949 F DEBUG : #09 pc 00176f4d /system/lib/libart.so (art::CheckJNI::DeleteRef(char const*, _JNIEnv*, _jobject*, art::IndirectRefKind)+829)
02-15 17:27:44.603 949 949 F DEBUG : #10 pc 001772d3 /system/lib/libart.so (art::CheckJNI::DeleteLocalRef(_JNIEnv*, _jobject*)+52)
02-15 17:27:44.603 949 949 F DEBUG : #11 pc 000127b4 /data/app/com.example.sfml-1/lib/x86/libsfml-window.so
02-15 17:27:44.603 949 949 F DEBUG : #12 pc 000092ac /data/app/com.example.sfml-1/lib/x86/libsfml-window.so (sf::Keyboard::setVirtualKeyboardVisible(bool)+28)
02-15 17:27:44.603 949 949 F DEBUG : #13 pc 000020d1 /data/app/com.example.sfml-1/lib/x86/libsfml-example.so (main+33)
02-15 17:27:44.603 949 949 F DEBUG : #14 pc 00002178 /data/app/com.example.sfml-1/lib/x86/libsfml-example.so (sf::priv::main(sf::priv::ActivityStates*)+152)
02-15 17:27:44.603 949 949 F DEBUG : #15 pc 00002330 /data/app/com.example.sfml-1/lib/x86/libsfml-example.so (sf::priv::ThreadFunctorWithArg<void* (*)(sf::priv::ActivityStates*), sf::priv::ActivityStates*>::run()+16)
02-15 17:27:44.603 949 949 F DEBUG : #16 pc 0000e392 /data/app/com.example.sfml-1/lib/x86/libsfml-system.so (sf::Thread::run()+18)
02-15 17:27:44.603 949 949 F DEBUG : #17 pc 0000f54b /data/app/com.example.sfml-1/lib/x86/libsfml-system.so
02-15 17:27:44.603 949 949 F DEBUG : #18 pc 00080a93 /system/lib/libc.so (__pthread_start(void*)+56)
02-15 17:27:44.603 949 949 F DEBUG : #19 pc 00021952 /system/lib/libc.so (__start_thread+25)
02-15 17:27:44.603 949 949 F DEBUG : #20 pc 000170b6 /system/lib/libc.so (__bionic_clone+70)
The issue seems to be related to
this line. Removing that line and thus not deleting the lNativeActivity seems to solve the crash.