Closed proninyaroslav closed 7 years ago
do you have any other report with more information in the stacktrace?
Here are some of them, they maybe useful:
Build fingerprint: 'samsung/santos103gxx/santos103g:4.4.2/KOT49H/P5200XXUBNK1:user/release-keys'
Revision: '0'
pid: 14624, tid: 14624, name: rentTaskService >>> org.proninyaroslav.libretorrent:TorrentTaskService <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 000001c8
eax 00000000 ebx 70000005 ecx 00000e27 edx 00000071
esi 00000001 edi bfb8ad7c
xcs 00000073 xds 0000007b xes 0000007b xfs 00000000 xss 0000007b
eip 65949f3b ebp bfb8adb4 esp bfb8ad58 flags 00210206
backtrace:
#00 pc 001c2f3b /data/app-lib/org.proninyaroslav.libretorrent-1/libjlibtorrent.so
#01 pc 00083335 /system/lib/libdvm.so
#02 pc 00002f1f <unknown>
#03 pc 000e06dc /system/lib/libdvm.so
#04 pc 00000118 /dev/ashmem/dalvik-jit-code-cache (deleted)
#05 pc 00098c80 /system/lib/libdvm.so
#06 pc 000948c1 /system/lib/libdvm.so
#07 pc 00113798 /system/lib/libdvm.so
#08 pc 00126c69 /system/lib/libdvm.so
#09 pc 00237c79 /system/lib/libdvm.so
#10 pc 00008e9b <unknown>
#11 pc 00098c80 /system/lib/libdvm.so
#12 pc 000948c1 /system/lib/libdvm.so
#13 pc 001144ae /system/lib/libdvm.so
#14 pc 000d47ad /system/lib/libdvm.so
#15 pc 000624ba /system/lib/libandroid_runtime.so
#16 pc 000647a4 /system/lib/libandroid_runtime.so
#17 pc 00000f14 /system/bin/app_process
#18 pc 0001dd4a /system/lib/libc.so
#19 pc 00001206 /system/bin/app_process
Build fingerprint: 'google/angler/angler:7.1.1/NMF26F/3425388:user/release-keys'
Revision: '0'
ABI: 'arm64'
pid: 32118, tid: 32118, name: rentTaskService >>> org.proninyaroslav.libretorrent:TorrentTaskService <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x54
x0 0000007373c3e000 x1 0000007fd307d1f4 x2 0000007356a8e718 x3 0000007fd307d1f8
x4 0000000000000284 x5 0000000071735da9 x6 8080808080808080 x7 fefefefefefefeff
x8 0000000000000050 x9 0000000000000000 x10 0000000000430000 x11 000000000020001c
x12 00000073736aa8d0 x13 0000000000000000 x14 00000073736aa984 x15 0000000000000000
x16 0000007fd307d1f8 x17 0000000000e00c7e x18 0000000000000000 x19 0000007373c95a00
x20 00000073582f846c x21 00000000131619a0 x22 0000000013159710 x23 0000000000000284
x24 0000000012c9a0a0 x25 0000000000000285 x26 0000000000000284 x27 0000000012c9a0d0
x28 0000000012cc55b0 x29 00000000131619a0 x30 0000007358cc3f4c
sp 0000007fd307d1e0 pc 00000073582f8484 pstate 0000000020000000
backtrace:
#00 pc 000000000020e484 /data/app/org.proninyaroslav.libretorrent-1/lib/arm64/libjlibtorrent.so (Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_bitfield_1get_1bit+24)
#01 pc 000000000067af48 /data/app/org.proninyaroslav.libretorrent-1/oat/arm64/base.odex (offset 0x5fc000)
I suspect that you are calling get_bit
in a bitfield that have no data inside. Could you point me to the code where you are using this method?
I suspect that you are calling get_bit
in a bitfield that have no data inside. Could you point me to the code where you are using this method?
Apparently getPieces() returns null.
private double calcRelevance(peer_info peer, TorrentStatus torrentStatus)
{
bitfield allPieces = torrentStatus.pieces().swig();
bitfield peerPieces = peer.getPieces();
int remoteHaves = 0;
int localMissing = 0;
for (int i = 0; i < allPieces.size(); i++) {
if (!allPieces.get_bit(i)) {
++localMissing;
if (peerPieces.get_bit(i)) {
++remoteHaves;
}
}
}
double relevance = 0.0;
if (localMissing != 0) {
relevance = (double) remoteHaves / (double) localMissing;
}
return relevance;
}
Hi @proninyaroslav, I added a test https://github.com/frostwire/frostwire-jlibtorrent/commit/6c5f037f5b571154e8bcd97f43efedc73eb07a3f and I can't replicate the issue.
I point out that you need to pass the flag QUERY_PIECES
to actually get the field populated and it's expensive. I looked also at libretorrent and I see a code like this:
piece_index_bitfield allPieces = torrentStatus.pieces().swig();
piece_index_bitfield peerPieces = peer.getPieces();
Remember that the more you work with swig()
objects, the more careful you need to be with the lifetime of this objects and parents.
Feel free to reopen if you can provide a more concrete example or tweak the unit test to make it fail.
I get many messages with error in Google Play. This error is not caught with the help of ACRA.