Crashed: com.apple.main-thread

1613
6
04-29-2021 01:32 AM
g3oapp
by
New Contributor II

I am using ArcGIS iOS SDK 100.10, and I have seen this error:

iOS 14.4.2

Device iPad (7th generation)

Stack trace:

Crashed: com.apple.main-thread
0 ArcGIS 0x10626dde4 Esri_runtimecore::Map_renderer::Sql_cache_tile_provider::provide(std::__1::shared_ptr<Esri_runtimecore::Map_renderer::Tile_provider_provision_context> const&) + 2214680
1 ArcGIS 0x10625fe08 Esri_runtimecore::Map_renderer::Resampled_tile_provider_base::provide(std::__1::shared_ptr<Esri_runtimecore::Map_renderer::Tile_provider_provision_context> const&) + 2157372
2 ArcGIS 0x1062586dc Esri_runtimecore::Map_renderer::Raster_tile_surface::draw(std::__1::shared_ptr<Esri_runtimecore::Rendering_engine::Device> const&, Esri_runtimecore::Geometry::Envelope_2D const&, Esri_runtimecore::Geometry::Point_2D const&, osg::Matrix4f const&, std::__1::pair<unsigned int, unsigned int> const&, std::__1::shared_ptr<Esri_runtimecore::Map_renderer::Image_modify> const&, Esri_runtimecore::Rendering_engine::Sampler_filter, double, float) + 2126864
3 ArcGIS 0x10625516c Esri_runtimecore::Map_renderer::Raster_tile_layer::draw(std::__1::shared_ptr<Esri_runtimecore::Rendering_engine::Device> const&, std::__1::shared_ptr<Esri_runtimecore::Map_renderer::Drawable::Render_properties> const&, std::__1::shared_ptr<Esri_runtimecore::Map_renderer::Display_properties> const&) + 2113184
4 ArcGIS 0x10623d79c Esri_runtimecore::Map_renderer::Map::draw(std::__1::shared_ptr<Esri_runtimecore::Rendering_engine::Device> const&) + 2016464
5 ArcGIS 0x1051b7e60 Esri_runtimecore::Geo_views::Map_view::draw(Esri_runtimecore::Geo_views::Device&) + 1697860
6 ArcGIS 0x104e72684 RT_GeoView_draw + 60
7 ArcGIS 0x1049b07b0 -[AGSMetalGeoViewRenderer drawRequested] + 106 (AGSMetalGeoViewRenderer.m:106)
8 ArcGIS 0x1049e6a20 __28-[AGSGeoView setRtcGeoView:]_block_invoke_2 + 309 (AGSGeoView.m:309)
9 ArcGIS 0x104a2174c drawRequestedHandler + 298 (RTCGeoView.m:298)
10 ArcGIS 0x1050cffa0 Esri_runtimecore::Common::Slot<void (Esri_runtimecore::Geo_views::Geo_view const&)>::target_model<void Esri_runtimecore::Common::Signal<void (Esri_runtimecore::Geo_views::Geo_view const&)>::connect<std::__1::function<void (void*)> >(void*, std::__1::function<void (void*)>&&) const::'lambda'(Esri_runtimecore::Common::Signal_context<void (Esri_runtimecore::Geo_views::Geo_view const&)>, std::__1::function<void (void*)>&&, auto&&...)>::invoke(void const*, Esri_runtimecore::Geo_views::Geo_view const&) + 747908
11 ArcGIS 0x106e48220 Esri_runtimecore::Common::Signal_detail::Signal_base::notify_(Esri_runtimecore::Common::Function_ref<void (Esri_runtimecore::Common::Signal_detail::erased_target_base&)> const&) const + 14643028
12 ArcGIS 0x1050e8424 Esri_runtimecore::Geo_views::Geo_view_draw_requested::draw_request_callback() + 847368
13 ArcGIS 0x10623fbf4 Esri_runtimecore::Map_renderer::Map::on_pulse_() + 2025768
14 ArcGIS 0x1051b7d88 Esri_runtimecore::Geo_views::Map_view::pulse() + 1697644
15 ArcGIS 0x104e74ce0 RT_GeoView_pulse + 32
16 ArcGIS 0x1049b06d4 -[AGSMetalGeoViewRenderer drawInMTKView:] + 91 (AGSMetalGeoViewRenderer.m:91)
17 MetalKit 0x1d4001174 -[MTKView draw] + 180
18 MetalKit 0x1d3ffd870 -[MTKViewDisplayLinkTarget draw] + 36
19 QuartzCore 0x1a6ff7640 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 660
20 IOKit 0x1ae638464 IODispatchCalloutFromCFMessage + 376
21 CoreFoundation 0x1a3e1cb54 __CFMachPortPerform + 172
22 CoreFoundation 0x1a3e40420 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
23 CoreFoundation 0x1a3e3f834 __CFRunLoopDoSource1 + 588
24 CoreFoundation 0x1a3e399f4 __CFRunLoopRun + 2332
25 CoreFoundation 0x1a3e38ba0 CFRunLoopRunSpecific + 572
26 GraphicsServices 0x1bab9e598 GSEventRunModal + 160
27 UIKitCore 0x1a672a2f4 -[UIApplication _run] + 1052
28 UIKitCore 0x1a672f874 UIApplicationMain + 164
29 APPangea 0x10410fd0c main + 30 (ExtensionUIViewController.swift:30)
30 libdyld.dylib 0x1a3b17568 start + 4

0 Kudos
6 Replies
Nicholas-Furness
Esri Regular Contributor

Hi,

Can you provide more information to help us narrow this down please?

Is this repeatable?

What layers are visible at the time?

Are you able to share a simple reproducer with us?

Any additional info you can provide that will help us home in on this would be great.

0 Kudos
g3oapp
by
New Contributor II

Hi Nicholas,

it is not repeatable, or at least I do not know how to repeat it. I have only seen the error twice, but the same map is used quite often without issues.

The map is created dynamically: imagery basemap + two operational layers:

https://services9.arcgis.com/2wLcuLnZTu7nSSwm/arcgis/rest/services/EUR_Paises/FeatureServer/0 

https://services9.arcgis.com/2wLcuLnZTu7nSSwm/arcgis/rest/services/EUR_Capitales/FeatureServer/0

I have also seen this in the log:

CFNetwork internal error (0xc01a:/Library/Caches/com.apple.xbs/Sources/CFNetwork/CFNetwork-1220.1/Loading/Connection/Loader Side/URLConnectionLoader.cpp:266)

I think it might be related to random network errors and the basemap (Sql_cache_tile_provider). Does it make sense for you?

Anyway, congrats for the iOS SDK, it is way better than the Android one 😉

0 Kudos
Nicholas-Furness
Esri Regular Contributor

Thanks for the basemap and layer info. For the basemap, are you using the new platform basemap (with vector labels) or just a plain imagery basemap? To answer that, it might be easiest to just show a code snippet of how you're creating that/adding it to the map. And is there an approximate area or scale you were using when it happened (or typically use with your app)?

If you do see the crash again, please send over all the threads (feel free to DM me). It's often useful to get some context on what else might be happening. If you're in Xcode, a bt all at the console will do it.

Also, thanks for the congrats 🎉 Glad you like the SDK. And I won't tell the Android team you said that 🤫 But seriously, if you do have some specific issues, it would be great to let us know so we can look into them. The Android team does a really good job making sure the Android SDK works across so many devices and architectures, which the iOS team has the luxury of generally not having to worry about (thank you, Apple!). Again, feel free to DM me if you prefer.

0 Kudos
g3oapp
by
New Contributor II

I am still using the old imagery basemap, and for other styles it depends on the iOS version because I saw not so good performance with iOS 12 and the new vector basemaps. The basemap depends on some configuration and this is my code:

    func getBasemap() -> AGSBasemap {

        let basemapName = getBasemapName()

        switch basemapName {

            case "lightGrayCanvas":

                if #available(iOS 13, *) {

                    return .init(style: .arcGISLightGray)

                }

                return .lightGrayCanvas()

            case "terrain":

                if #available(iOS 13, *) {

                    return .init(style: .arcGISTerrain)

                }

                return .terrainWithLabels()

            case "streets":

                if #available(iOS 13, *) {

                    return .init(style: .arcGISStreets)

                }

                return .streets()

            default:

                return .imagery()

        }

    }

Best,

Juan

 

0 Kudos
Nicholas-Furness
Esri Regular Contributor

Thanks.

The team wants to confirm that the call stack is consistent when you see the crash (i.e. it's not crashing in the same spot via some other route).

However, we improved the internals of tiling with 100.11 and sql_cache_tile_provider has been removed. Are you planning on updating to 100.11?

0 Kudos
Nicholas-Furness
Esri Regular Contributor

Hi @g3oapp. Just following up. Are you considering updating to 100.11? We think there's a good chance this will resolve this issue for you.

0 Kudos