matomo-org / matomo-sdk-android

SDK for Android to measure your apps with Matomo. Works on Android phones, tablets, Fire TV sticks, and more!
BSD 3-Clause "New" or "Revised" License
393 stars 164 forks source link

Tracking app installs #229

Closed ejo4041 closed 5 years ago

ejo4041 commented 6 years ago

Here is the code that crashes my app inside the MainActivity onCreate(): TrackHelper.track().download().with(tracker);

The rest of the tracker works fine so far, I am seeing events on the server. Below is the tombstone from the crash.

2018-11-12 14:09:53.601 30355-30355/? A/DEBUG: 2018-11-12 14:09:53.601 30355-30355/? A/DEBUG: Build fingerprint: 'lge/judypn_lao_com/judypn:8.1.0/OPM1.171019.026/182641107dd05.FGN:user/release-keys' 2018-11-12 14:09:53.601 30355-30355/? A/DEBUG: Revision: '12' 2018-11-12 14:09:53.601 30355-30355/? A/DEBUG: ABI: 'arm64' 2018-11-12 14:09:53.601 30355-30355/? A/DEBUG: pid: 30328, tid: 30328, name: id.piwiktestapp >>> com.android.piwiktestapp <<< 2018-11-12 14:09:53.601 30355-30355/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x68 2018-11-12 14:09:53.601 30355-30355/? A/DEBUG: Cause: null pointer dereference 2018-11-12 14:09:53.601 30355-30355/? A/DEBUG: x0 0000000000000000 x1 0000007f657a8f28 x2 0000000000000003 x3 0000007fc00387cc 2018-11-12 14:09:53.601 30355-30355/? A/DEBUG: x4 0000000000000007 x5 0000007fc00386b8 x6 0080000000000000 x7 607560694b21ff3a 2018-11-12 14:09:53.601 30355-30355/? A/DEBUG: x8 0000000012ce1f24 x9 0000000000000000 x10 0000000000000000 x11 000000005d140000 2018-11-12 14:09:53.601 30355-30355/? A/DEBUG: x12 0000000000000000 x13 000000000000005d x14 0000000012ce1ea0 x15 0000000000000000 2018-11-12 14:09:53.601 30355-30355/? A/DEBUG: x16 0000007ee33ca5a8 x17 0000007f6549e7c0 x18 0000007ee3c00080 x19 0000000012ce1f18 2018-11-12 14:09:53.601 30355-30355/? A/DEBUG: x20 0000000000000006 x21 0000000000000006 x22 0000000c00000000 x23 0000000400000000 2018-11-12 14:09:53.601 30355-30355/? A/DEBUG: x24 0000007fc00388d0 x25 0000007fc00388d4 x26 0000007ee3af3b80 x27 0000007fc00388cc 2018-11-12 14:09:53.601 30355-30355/? A/DEBUG: x28 0000007fc0038c60 x29 0000007fc0038840 x30 0000007ee3032dec 2018-11-12 14:09:53.601 30355-30355/? A/DEBUG: sp 0000007fc0038810 pc 0000007ee3156e84 pstate 0000000020000000 2018-11-12 14:09:53.608 30194-30194/? I/MirrorLink_UPnP: loadPredefinedAppInfo : loaded app num:8 2018-11-12 14:09:53.608 30194-30194/? I/MirrorLink_UPnP: /data/data/com.lge.mirrorlink/files 2018-11-12 14:09:53.609 30355-30355/? A/DEBUG: backtrace: 2018-11-12 14:09:53.609 30355-30355/? A/DEBUG: #00 pc 00000000003bae84 /system/lib64/libart.so (art::mirror::MethodType::NumberOfVRegs()+112) 2018-11-12 14:09:53.609 30355-30355/? A/DEBUG: #01 pc 0000000000296de8 /system/lib64/libart.so (art::interpreter::InvokeBootstrapMethod(art::Thread, art::ShadowFrame&, unsigned int)+536) 2018-11-12 14:09:53.609 30355-30355/? A/DEBUG: #02 pc 0000000000296950 /system/lib64/libart.so (_ZN3art11interpreter14DoInvokeCustomILb0EEEbPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+336) 2018-11-12 14:09:53.609 30355-30355/? A/DEBUG: #03 pc 00000000002ab26c /system/lib64/libart.so (_ZN3art11interpreter17ExecuteSwitchImplILb1ELb0EEENS_6JValueEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameES2_b+62696) 2018-11-12 14:09:53.609 30355-30355/? A/DEBUG: #04 pc 00000000002751f8 /system/lib64/libart.so (art::interpreter::Execute(art::Thread, art::DexFile::CodeItem const, art::ShadowFrame&, art::JValue, bool)+700) 2018-11-12 14:09:53.609 30355-30355/? A/DEBUG: #05 pc 000000000027ad00 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread, art::DexFile::CodeItem const, art::ShadowFrame, art::JValue)+216) 2018-11-12 14:09:53.609 30355-30355/? A/DEBUG: #06 pc 0000000000295470 /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb1EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+1600) 2018-11-12 14:09:53.609 30355-30355/? A/DEBUG: #07 pc 00000000002b0c64 /system/lib64/libart.so (_ZN3art11interpreterL8DoInvokeILNS_10InvokeTypeE2ELb0ELb1EEEbPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+1120) 2018-11-12 14:09:53.609 30355-30355/? A/DEBUG: #08 pc 00000000002ac5e8 /system/lib64/libart.so (_ZN3art11interpreter17ExecuteSwitchImplILb1ELb0EEENS_6JValueEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameES2_b+67684) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #09 pc 00000000002751f8 /system/lib64/libart.so (art::interpreter::Execute(art::Thread, art::DexFile::CodeItem const, art::ShadowFrame&, art::JValue, bool)+700) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #10 pc 000000000027ad00 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread, art::DexFile::CodeItem const, art::ShadowFrame, art::JValue)+216) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #11 pc 0000000000294c74 /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+664) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #12 pc 00000000005308b0 /system/lib64/libart.so (MterpInvokeVirtual+612) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #13 pc 000000000053a414 /system/lib64/libart.so (ExecuteMterpImpl+14228) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #14 pc 00000000002750f8 /system/lib64/libart.so (art::interpreter::Execute(art::Thread, art::DexFile::CodeItem const, art::ShadowFrame&, art::JValue, bool)+444) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #15 pc 000000000027ad00 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread, art::DexFile::CodeItem const, art::ShadowFrame, art::JValue)+216) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #16 pc 0000000000294c74 /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+664) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #17 pc 00000000005308b0 /system/lib64/libart.so (MterpInvokeVirtual+612) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #18 pc 000000000053a414 /system/lib64/libart.so (ExecuteMterpImpl+14228) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #19 pc 00000000002750f8 /system/lib64/libart.so (art::interpreter::Execute(art::Thread, art::DexFile::CodeItem const, art::ShadowFrame&, art::JValue, bool)+444) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #20 pc 000000000027ad00 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread, art::DexFile::CodeItem const, art::ShadowFrame, art::JValue)+216) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #21 pc 0000000000294c74 /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+664) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #22 pc 00000000005308b0 /system/lib64/libart.so (MterpInvokeVirtual+612) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #23 pc 000000000053a414 /system/lib64/libart.so (ExecuteMterpImpl+14228) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #24 pc 00000000002750f8 /system/lib64/libart.so (art::interpreter::Execute(art::Thread, art::DexFile::CodeItem const, art::ShadowFrame&, art::JValue, bool)+444) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #25 pc 000000000027ad00 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread, art::DexFile::CodeItem const, art::ShadowFrame, art::JValue)+216) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #26 pc 0000000000294c74 /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+664) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #27 pc 00000000005308b0 /system/lib64/libart.so (MterpInvokeVirtual+612) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #28 pc 000000000053a414 /system/lib64/libart.so (ExecuteMterpImpl+14228) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #29 pc 00000000002750f8 /system/lib64/libart.so (art::interpreter::Execute(art::Thread, art::DexFile::CodeItem const, art::ShadowFrame&, art::JValue, bool)+444) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #30 pc 000000000027ad00 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread, art::DexFile::CodeItem const, art::ShadowFrame, art::JValue)+216) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #31 pc 0000000000294c74 /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+664) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #32 pc 00000000005308b0 /system/lib64/libart.so (MterpInvokeVirtual+612) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #33 pc 000000000053a414 /system/lib64/libart.so (ExecuteMterpImpl+14228) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #34 pc 00000000002750f8 /system/lib64/libart.so (art::interpreter::Execute(art::Thread, art::DexFile::CodeItem const, art::ShadowFrame&, art::JValue, bool)+444) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #35 pc 000000000027ad00 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread, art::DexFile::CodeItem const, art::ShadowFrame, art::JValue)+216) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #36 pc 0000000000294c74 /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+664) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #37 pc 00000000005308b0 /system/lib64/libart.so (MterpInvokeVirtual+612) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #38 pc 000000000053a414 /system/lib64/libart.so (ExecuteMterpImpl+14228) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #39 pc 00000000002750f8 /system/lib64/libart.so (art::interpreter::Execute(art::Thread, art::DexFile::CodeItem const, art::ShadowFrame&, art::JValue, bool)+444) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #40 pc 000000000027ad00 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread, art::DexFile::CodeItem const, art::ShadowFrame, art::JValue)+216) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #41 pc 0000000000294c74 /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+664) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #42 pc 0000000000531a68 /system/lib64/libart.so (MterpInvokeDirect+304) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #43 pc 000000000053a514 /system/lib64/libart.so (ExecuteMterpImpl+14484) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #44 pc 00000000002750f8 /system/lib64/libart.so (art::interpreter::Execute(art::Thread, art::DexFile::CodeItem const, art::ShadowFrame&, art::JValue, bool)+444) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #45 pc 000000000027ad00 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread, art::DexFile::CodeItem const, art::ShadowFrame, art::JValue)+216) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #46 pc 0000000000294c74 /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+664) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #47 pc 0000000000531a68 /system/lib64/libart.so (MterpInvokeDirect+304) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #48 pc 000000000053a514 /system/lib64/libart.so (ExecuteMterpImpl+14484) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #49 pc 00000000002750f8 /system/lib64/libart.so (art::interpreter::Execute(art::Thread, art::DexFile::CodeItem const, art::ShadowFrame&, art::JValue, bool)+444) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #50 pc 000000000027ad00 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread, art::DexFile::CodeItem const, art::ShadowFrame, art::JValue)+216) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #51 pc 0000000000294c74 /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+664) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #52 pc 0000000000531c24 /system/lib64/libart.so (MterpInvokeStatic+224) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #53 pc 000000000053a594 /system/lib64/libart.so (ExecuteMterpImpl+14612) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #54 pc 00000000002750f8 /system/lib64/libart.so (art::interpreter::Execute(art::Thread, art::DexFile::CodeItem const, art::ShadowFrame&, art::JValue, bool)+444) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #55 pc 000000000027ad00 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread, art::DexFile::CodeItem const, art::ShadowFrame, art::JValue)+216) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #56 pc 0000000000294c74 /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+664) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #57 pc 00000000005308b0 /system/lib64/libart.so (MterpInvokeVirtual+612) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #58 pc 000000000053a414 /system/lib64/libart.so (ExecuteMterpImpl+14228) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #59 pc 00000000002750f8 /system/lib64/libart.so (art::interpreter::Execute(art::Thread, art::DexFile::CodeItem const, art::ShadowFrame&, art::JValue, bool)+444) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #60 pc 000000000027ad00 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread, art::DexFile::CodeItem const, art::ShadowFrame, art::JValue*)+216) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #61 pc 0000000000294c74 /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+664) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #62 pc 00000000005308b0 /system/lib64/libart.so (MterpInvokeVirtual+612) 2018-11-12 14:09:53.610 30355-30355/? A/DEBUG: #63 pc 000000000053a414 /system/lib64/libart.so (ExecuteMterpImpl+14228)

d4rken commented 6 years ago

Hm... this is a crash in native code and the library uses no native code. :question:

I'd say debug this further by setting break points to narrow down what triggers it.

Start with setting one before and after checksum calculation, you are using that, right? https://github.com/matomo-org/piwik-sdk-android/blob/master/piwik-sdk/src/main/java/org/piwik/sdk/extra/DownloadTracker.java#L85

And maybe a break point before it goes to opening the URLConnection.

d4rken commented 5 years ago

Stale