首页 > 解决方案 > 地理服务崩溃

问题描述

我仅在iOS 13上遇到崩溃。

这是堆栈跟踪:

Thread 52 name:
Thread 52 Crashed:
0   GeoServices                      0x00000001a16c3520 (null) (GeoServices)
1   GeoServices                      0x00000001a16ab110 addr_obj::venue::TemplateFactory::TemplateForStyleAndParams(addr_obj::venue::TemplateFactory::TemplateStyle, addr_obj::venue::VenueInfoFormatterParams const&) const (GeoServices)
2   GeoServices                      0x00000001a17717a0 addr_obj::venue::Formatter::fromPattern(addr_obj::venue::VenueInfoFormatterParams const&, addr_obj::venue::LabelContext) (GeoServices)
3   GeoServices                      0x00000001a1771ca8 addr_obj::venue::Formatter::Formatter(addr_obj::venue::VenueInfoFormatterParams const&, addr_obj::venue::LabelContext) (GeoServices)
4   GeoServices                      0x00000001a1773264 addr_obj::venue::Formatters::Formatters(addr_obj::venue::VenueInfoFormatterParams const&) (GeoServices)
5   GeoServices                      0x00000001a1777f08 addr_obj::VenueInfo::VenueInfo(addr_obj::venue::VenueInfoFormatterParams const&) (GeoServices)
6   GeoServices                      0x00000001a1700514 addr_obj::V1AddressObject::V1AddressObject(addr_obj::Localization const&, addr_obj::Fingerprints const&, addr_obj::AddressObjectProto const&, addr_obj::AddressObjectBase::AddressObjectVersion const&) (GeoServices)
7   GeoServices                      0x00000001a1704474 addr_obj::V2AddressObject::V2AddressObject(addr_obj::Localization const&, addr_obj::Fingerprints const&, addr_obj::AddressObjectProto const&, addr_obj::AddressObjectBase::AddressObjectVersion const&) (GeoServices)
8   GeoServices                      0x00000001a16d3f58 addr_obj::AddressObjectFactory::fromProto(addr_obj::AddressObjectProto const&, addr_obj::Localization const&) const (GeoServices)
9   GeoServices                      0x00000001a16d3248 addr_obj::AddressObjectFactory::parseBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const (GeoServices)
10  GeoServices                      0x00000001a16d2048 addr_obj::AddressObjectFactory::fromBytes(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const (GeoServices)
11  GeoServices                      0x00000001a167ce08 -[GEOAddressObject initWithPlaceDataAddressObject:placeDataAddress:placeDataInfo:placeDataEntity:language:country:phoneticLocale:] (GeoServices)
12  GeoServices                      0x00000001a167cad8 +[GEOAddressObject addressObjectWithPlaceDataAddressObject:placeDataAddress:placeDataInfo:placeDataEntity:] (GeoServices)
13  GeoServices                      0x00000001a167c760 +[GEOAddressObject(PlaceDataExtras) addressObjectForPlaceData:] (GeoServices)
14  GeoServices                      0x00000001a167ee0c +[GEOAddress(PlaceDataExtras) geoAddressForPlaceData:] (GeoServices)
15  GeoServices                      0x00000001a167eacc -[_GEOPlaceDataItem addressDictionary] (GeoServices)
16  GeoServices                      0x00000001a167e6f0 -[GEOMapItemStorage(GEOMapItem) addressDictionary] (GeoServices)
17  CoreLocation                     0x000000019f556904 (null) (CoreLocation)
18  CoreLocation                     0x000000019f5573c4 (null) (CoreLocation)
19  CoreLocation                     0x000000019f54e178 (null) (CoreLocation)
20  libdispatch.dylib                0x000000019c0c9610 _dispatch_call_block_and_release (libdispatch.dylib)
21  libdispatch.dylib                0x000000019c0ca184 _dispatch_client_callout (libdispatch.dylib)
22  libdispatch.dylib                0x000000019c0a773c _dispatch_lane_serial_drain$VARIANT$armv81 (libdispatch.dylib)
23  libdispatch.dylib                0x000000019c0a8154 _dispatch_lane_invoke$VARIANT$armv81 (libdispatch.dylib)
24  libdispatch.dylib                0x000000019c0b143c _dispatch_workloop_worker_thread (libdispatch.dylib)
25  libsystem_pthread.dylib          0x000000019c119fa4 _pthread_wqthread (libsystem_pthread.dylib)
26  libsystem_pthread.dylib          0x000000019c11cae0 start_wqthread (libsystem_pthread.dylib)

如您所见,堆栈跟踪没有提及应用程序的任何代码,而是提及系统框架(GeoServices)。这种崩溃不会发生 100% 的时间。我实际上无法重现它,但它正在影响一些用户,并且它已在我们的崩溃报告工具中报告。

这是我们用来初始化 CLLocationManager 的代码:

var locationManager = CLLocationManager()

locationManager.desiredAccuracy = kCLLocationAccuracyKilometer
locationManager.distanceFilter = 5
locationManager.requestWhenInUseAuthorization()
locationManager.startUpdatingLocation()
locationManager.startUpdatingHeading()
locationManager.delegate = self

我们不做任何复杂或奇怪的事情。之后,我们只需使用委托方法收听更新。

当我们对此进行调查时,我们发现这个线程提到了同样的问题: https ://forums.developer.apple.com/thread/120110

您是否见过类似的崩溃,或者您是否知道可能导致这种情况的原因?

标签: iosswift

解决方案


推荐阅读