frostwire / frostwire-jlibtorrent

A swig Java interface for libtorrent by the makers of FrostWire. Develop libtorrent based apps with the joy of coding in Java.
http://www.frostwire.com
MIT License
458 stars 139 forks source link

Pure virtual function called! On Android 10+ [Using version 1.2.16.0] #280

Closed vickyoo7 closed 2 years ago

vickyoo7 commented 2 years ago

On play store seeing lots of crashes with "Pure virtual function called!" error. Unfortunately logs are not very helpful

Android version: A10+ Jlibtorrent version: 1.2.16.0

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> idm.internet.download.manager.plus <<<

backtrace:
  #00  pc 0x0000000000082fb4  /apex/com.android.runtime/lib64/bionic/libc.so (abort)
  #01  pc 0x00000000004fa064  /data/app/idm.internet.download.manager.plus-fhKqMzCPCkqIoptagWM20Q==/split_config.arm64_v8a.apk!libjlibtorrent.so
  #02  pc 0x00000000004f7dd4  /data/app/idm.internet.download.manager.plus-fhKqMzCPCkqIoptagWM20Q==/split_config.arm64_v8a.apk!libjlibtorrent.so (__cxa_pure_virtual)
  #03  pc 0x000000000018a6d4  /data/app/idm.internet.download.manager.plus-fhKqMzCPCkqIoptagWM20Q==/oat/arm64/base.odex (art_jni_trampoline)
  #04  pc 0x00000000001c565c  /data/app/idm.internet.download.manager.plus-fhKqMzCPCkqIoptagWM20Q==/oat/arm64/base.odex (com.frostwire.jlibtorrent.SessionManager$5.run)
  #05  pc 0x00000000001a50b8  /system/framework/arm64/boot.oat (java.lang.Thread.run)
  #06  pc 0x0000000000137334  /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub)
  #07  pc 0x000000000014606c  /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*))
  #08  pc 0x00000000004accd0  /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*))
  #09  pc 0x00000000004add64  /apex/com.android.runtime/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue const*))
  #10  pc 0x00000000004edb00  /apex/com.android.runtime/lib64/libart.so (art::Thread::CreateCallback(void*))
  #11  pc 0x00000000000e205c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*))
  #12  pc 0x0000000000084af0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread)
gubatron commented 2 years ago

try upgrading to jlibtorrent 1.2.17, it's built with the latest LTS Android NDK.

This seems like a bug in Android's libary, for all we know it might even be cause by some other dependency unrelated to jlibtorrent in your app.