电报JNI从UserConfig和define更改max_account_count后,发现应用程序错误:线程线程。h

时间:2019-05-09 09:14:25

标签: android java-native-interface telegram

我试图从他们的官方git仓库下载电报源。我的应用程序可以使用原始代码进行编译并完美运行。

现在,我想将电报中的最大帐户数从3修改为5。因此,我将MAX_ACCOUNT_COUNT中的UserConfig更改为5,并将defines.h中的{{1}}更改为5,但是我在线程中遇到了运行时JNI错误:

  

05-09 14:34:29.948 21639-21655 / org.telegram.messenger E / FA:?> AppMeasurementReceiver未注册/启用   05-09 14:34:29.948 21639-21655 / org.telegram.messenger E / FA:未注册/未启用AppMeasurementService   05-09 14:34:29.948 21639-21655 / org.telegram.messenger E / FA:无法上传。应用测量已禁用   05-09 14:34:31.243 21639-21722 / org.telegram.messenger A / art:art / runtime / java_vm_ext.cc:410] JNI检测到应用程序错误:线程Thread [35,tid = 21722,Native,Thread * = 0x9c135a00,peer = 0x130b80a0,“ Thread-93784”]使用来自线程Thread [35,tid = 21722,Native,Thread * = 0x9c135a00,peer = 0x130b80a0,“ Thread-93784”]的JNIEnv *   05-09 14:34:31.243 21639-21722 / org.telegram.messenger A / art:art / runtime / java_vm_ext.cc:410]调用CallStaticVoidMethodV   05-09 14:34:31.243 21639-21722 / org.telegram.messenger A / art:art / runtime / java_vm_ext.cc:410]“ Thread-93784” prio = 10 tid = 35 Runnable   05/09 14:34:31.243 21639-21722 / org.telegram.messenger A / art:art / runtime / java_vm_ext.cc:410] | group =“ main” sCount = 0 dsCount = 0 obj = 0x130b80a0 self = 0x9c135a00   05/09 14:34:31.243 21639-21722 / org.telegram.messenger A / art:art / runtime / java_vm_ext.cc:410] | sysTid = 21722 nice = -11 cgrp =默认值sched = 0/0句柄= 0x9acd6930   05/09 14:34:31.243 21639-21722 / org.telegram.messenger A / art:art / runtime / java_vm_ext.cc:410] |状态= R schedstat =(0 0 0)utm = 0 stm = 0核心= 3 HZ = 100   05/09 14:34:31.243 21639-21722 / org.telegram.messenger A / art:art / runtime / java_vm_ext.cc:410] |堆栈= 0x9abda000-0x9abdc000堆栈大小= 1014KB   05/09 14:34:31.243 21639-21722 / org.telegram.messenger A / art:art / runtime / java_vm_ext.cc:410] |持有的互斥锁=“ mutator lock”(共享持有)   05-09 14:34:31.243 21639-21722 / org.telegram.messenger A / art:art / runtime / java_vm_ext.cc:410]本机:#00 pc 0035b179 /system/lib/libart.so(_ZN3art15DumpNativeStackERNSt3__113basic_ostreamicNS0_11char_traitSBackPetIkEE11   05-09 14:34:31.243 21639-21722 / org.telegram.messenger A / art:art / runtime / java_vm_ext.cc:410]本机:#01 pc 0033bfdb /system/lib/libart.so(_ZNK3art6Thread4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEE +   05-09 14:34:31.243 21639-21722 / org.telegram.messenger A / art:art / runtime / java_vm_ext.cc:410]本机:#02 pc 0024ee4d /system/lib/libart.so( ZN3art9JavaVMExt8JniAbortEPKcS2 +752)   05-09 14:34:31.243 21639-21722 / org.telegram.messenger A / art:art / runtime / java_vm_ext.cc:410]本机:#03 pc 0024f4ef /system/lib/libart.so(_ZN3art9JavaVMExt9JniAbortVEPKcS2_St9__va_list + 54)   05-09 14:34:31.243 21639-21722 / org.telegram.messenger A / art:art / runtime / java_vm_ext.cc:410]本机:#04 pc 000fbabd /system/lib/libart.so(_ZN3art11ScopedCheck6AbortFEPKcz + 28)   05-09 14:34:31.243 21639-21722 / org.telegram.messenger A / art:art / runtime / java_vm_ext.cc:410]本机:#05 pc 00100851 /system/lib/libart.so(_ZN3art11ScopedCheck5CheckERNS_18ScopedObjectAccessEbPKcPNS_12JniValueTypeE.constprop。 95 + 4780)   05-09 14:34:31.243 21639-21722 / org.telegram.messenger A / art:art / runtime / java_vm_ext.cc:410]本机:#06 pc 0010e7c9 /system/lib/libart.so(_ZN3art8CheckJNI11CallMethodVEPKcP7_JNIEnvP8_jobjectP7_Type_9_Type_9_Type_9_Type_9_Type_9_Type_9_Type_9_Type_9_Type_9_Type_9_Type_9_Type_9_Type_9_Type_9_Type_9_9   05-09 14:34:31.243 21639-21722 / org.telegram.messenger A / art:art / runtime / java_vm_ext.cc:410]本机:#07 pc 0010f0c7 /system/lib/libart.so(_ZN3art8CheckJNI21CallStaticVoidMethodVEP7_JNIEnvP7_jIDP26_9)   05-09 14:34:31.243 21639-21722 / org.telegram.messenger A / art:art / runtime / java_vm_ext.cc:410]本机:#08 pc 00197704 /data/app/org.telegram.messenger-1/ lib / arm / libtmessages.30.so(_ZN7_JNIEnv20CallStaticVoidMethodEP7_jclassP10_jmethodIDz + 52)   05-09 14:34:31.243 21639-21722 / org.telegram.messenger A / art:art / runtime / java_vm_ext.cc:410]本机:#09 pc 0026d8b4 /data/app/org.telegram.messenger-1/ lib / arm / libtmessages.30.so(_ZN18ConnectionsManager6selectEv + 3028)   05-09 14:34:31.243 21639-21722 / org.telegram.messenger A / art:art / runtime / java_vm_ext.cc:410]本机:#10 pc 00278c84 /data/app/org.telegram.messenger-1/ lib / arm / libtmessages.30.so(_ZN18ConnectionsManager10ThreadProcEPv + 280)   05-09 14:34:31.243 21639-21722 / org.telegram.messenger A / art:art / runtime / java_vm_ext.cc:410]本机:#11 pc 0003fe37 /system/lib/libc.so(_ZL15__pthread_startPv + 30)   05-09 14:34:31.243 21639-21722 / org.telegram.messenger A / art:art / runtime / java_vm_ext.cc:410]本机:#12 pc 0001a56d /system/lib/libc.so(__start_thread + 6)   05-09 14:34:31.243 21639-21722 / org.telegram.messenger A / art:art / runtime / java_vm_ext.cc:410](无托管堆栈框架)   05-09 14:34:31.243 21639-21722 / org.telegram.messenger A / art:art / runtime / java_vm_ext.cc:410]   05-09 14:34:31.243 21639-21722 / org.telegram.messenger A / art:art / runtime / runtime.cc:368]运行时中止...   05-09 14:34:31.243 21639-21722 / org.telegram.messenger A / art:art / runtime / runtime.cc:368]   05-09 14:34:31.248 21639-21722 / org.telegram.messenger A / libc:致命信号6(SIGABRT),tid 21722中的代码-6(Thread-93784)

有人知道我在做什么错吗?

1 个答案:

答案 0 :(得分:0)

在ConnectionsManager.cpp中更改ConnectionsManager&ConnectionsManager :: getInstance(int32_t instanceNum)