OpenArchive / Save-app-ios

Secure Mobile Media Preservation
https://open-archive.org/
GNU General Public License v3.0
11 stars 3 forks source link

App sometimes crashes after in-app asset add #112

Closed tladesignz closed 5 years ago

tladesignz commented 5 years ago

Happens randomly.

Sometimes, assets are there after restart, sometimes not.

When there, assets don't have a location resolved, although they should have one.

Can't reproduce here, but can confirm as seen via live session.

Best guess currently: Geocoder service in US is more likely to fail as in Europe. Problem with serializing geocoding requests?

tladesignz commented 5 years ago

Quick fix: disable geocoding.

tladesignz commented 5 years ago

How-to resymbolicate crash reports: https://medium.com/@Mrugraj/crash-re-symbolication-5c28d3a3a883

Crash report 1:

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)

...

Thread 11 Crashed:
0   libobjc.A.dylib                 0x00000001b7542e30 0x1b7525000 + 122416
1   CoreLocation                    0x00000001bf160214 0x1bf10e000 + 336404
2   libsystem_blocks.dylib          0x00000001b7db7914 0x1b7db7000 + 2324
3   libdispatch.dylib               0x00000001b7d33324 0x1b7d30000 + 13092
4   libdispatch.dylib               0x00000001b7d38f08 0x1b7d30000 + 36616
5   CoreLocation                    0x00000001bf15fdfc 0x1bf10e000 + 335356
6   OpenArchive                     0x0000000104d9698c closure #1 in Geocoder.next() + 27020 (Geocoder.swift:0)
7   OpenArchive                     0x0000000104ded604 thunk for @escaping @callee_guaranteed () -> () + 382468 (<compiler-generated>:0)
8   libdispatch.dylib               0x00000001b7d33374 0x1b7d30000 + 13172
9   libdispatch.dylib               0x00000001b7d348f4 0x1b7d30000 + 18676
10  libdispatch.dylib               0x00000001b7d3be2c 0x1b7d30000 + 48684
11  libdispatch.dylib               0x00000001b7d3c970 0x1b7d30000 + 51568
12  libdispatch.dylib               0x00000001b7d44d18 0x1b7d30000 + 85272
13  libsystem_pthread.dylib         0x00000001b7f2eab0 0x1b7f2b000 + 15024
14  libsystem_pthread.dylib         0x00000001b7f34dc4 0x1b7f2b000 + 40388

Crash report 2:

Exception Type:  EXC_BAD_ACCESS (SIGBUS)

...

Thread 6 Crashed:
0   libswiftCore.dylib              0x00000001bbf2a61c 0x1bbc61000 + 2922012
1   libswiftCore.dylib              0x00000001bbf20e54 0x1bbc61000 + 2883156
2   OpenArchive                     0x000000010490a8c4 closure #1 in Geocoder.next() + 26820 (Geocoder.swift:108)
3   OpenArchive                     0x0000000104961604 thunk for @escaping @callee_guaranteed () -> () + 382468 (<compiler-generated>:0)
4   libdispatch.dylib               0x000000018d527304 0x18d524000 + 13060
5   libdispatch.dylib               0x000000018d528884 0x18d524000 + 18564
6   libdispatch.dylib               0x000000018d52fdd4 0x18d524000 + 48596
7   libdispatch.dylib               0x000000018d530918 0x18d524000 + 51480
8   libdispatch.dylib               0x000000018d538cc0 0x18d524000 + 85184
9   libsystem_pthread.dylib         0x000000018d723a98 0x18d720000 + 15000
10  libsystem_pthread.dylib         0x000000018d729dc4 0x18d720000 + 40388

Crash report 3:

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)

...

Thread 5 Crashed:
0   libswiftCore.dylib              0x00000001e60cfe24 0x1e5e05000 + 2928164
1   libswiftCore.dylib              0x00000001e60ce6a8 0x1e5e05000 + 2922152
2   libswiftCore.dylib              0x00000001e60ce2ac 0x1e5e05000 + 2921132
3   libswiftCore.dylib              0x00000001e60d10d4 0x1e5e05000 + 2932948
4   libswiftCore.dylib              0x00000001e60c4db4 0x1e5e05000 + 2882996
5   OpenArchive                     0x00000001004a07a8 specialized _ArrayBufferProtocol.replaceSubrange<A>(_:with:elementsOf:) + 34728 (<compiler-generated>:0)
6   OpenArchive                     0x000000010049e8c4 closure #1 in Geocoder.next() + 26820 (Geocoder.swift:108)
7   OpenArchive                     0x00000001004f5604 thunk for @escaping @callee_guaranteed () -> () + 382468 (<compiler-generated>:0)
8   libdispatch.dylib               0x00000001b7d33374 0x1b7d30000 + 13172
9   libdispatch.dylib               0x00000001b7d348f4 0x1b7d30000 + 18676
10  libdispatch.dylib               0x00000001b7d3be2c 0x1b7d30000 + 48684
11  libdispatch.dylib               0x00000001b7d3c970 0x1b7d30000 + 51568
12  libdispatch.dylib               0x00000001b7d44d18 0x1b7d30000 + 85272
13  libsystem_pthread.dylib         0x00000001b7f2eab0 0x1b7f2b000 + 15024
14  libsystem_pthread.dylib         0x00000001b7f34dc4 0x1b7f2b000 + 40388

https://github.com/OpenArchive/openarchive-ios/blob/6659584d9ada3839f6474958e3881a666f2440c7/Shared/Utils/Geocoder.swift#L108

foundscapes commented 5 years ago

It hasn't crashed on iphone 6s or XR (and geo city/state is showing up), but continues to on ipad mini. All have updated software (ios 12.3) and I reinstalled the app on ipdad, but has same problem.

tladesignz commented 5 years ago

Please use the new build 23 which I released just now.