ArcGIS Runtime SDK:iOS 上的 Mapview 崩溃
ArcGIS Runtime SDK: Mapview crash on iOS
我希望看看是否有人知道这个问题以及任何可能的解决方法。
我正在使用适用于 Qt (100.2) 的 ArcGIS 运行时 SDK。问题是,如果创建了一个带有地图的地图视图,然后销毁它,它会崩溃并显示以下消息:
ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread. Current thread 0x0x174329f60. Receiver '' (of type 'QRTImpl::LocationDisplayImpl') was created in thread 0x0x17001d940", file kernel/qcoreapplication
.cpp, line 563
Mac 或 Android 不会发生这种情况。我的用例是在加载到 stackView 的组件中创建地图。当我离开该组件时,stackview 会杀死导致崩溃的 mapview。我创建了一个 Empty ArcGIS qml 应用程序,通过在加载器中显示带有 "unloads" 按钮的地图,以更简单的方式测试此问题。请参阅 post 底部的简单示例。
import QtQuick 2.6
import QtQuick.Controls 1.4
import Esri.ArcGISRuntime 100.2
ApplicationWindow {
id: appWindow
width: 800
height: 600
title: "IosMapTest"
Rectangle {
id: backgroundRect
anchors.fill: parent
color: "red"
}
Loader {
id: mapLoader
anchors.fill: parent
// add a mapView component
sourceComponent: MapView {
anchors.fill: parent
// set focus to enable keyboard navigation
focus: true
// add a map to the mapview
Map {
// add the BasemapTopographic basemap to the map
BasemapTopographic {}
}
}
}
Button {
anchors.bottom: parent.bottom
anchors.right: parent.right
text: "click here for crash"
onClicked: mapLoader.sourceComponent = undefined
}
}
这似乎是 ArcGIS Runtime 中的一个错误,因此我在我们的系统中记录了一个错误。我能想到的解决它的唯一方法是每次浏览堆栈时都不要 create/destroy 页面。
我希望看看是否有人知道这个问题以及任何可能的解决方法。
我正在使用适用于 Qt (100.2) 的 ArcGIS 运行时 SDK。问题是,如果创建了一个带有地图的地图视图,然后销毁它,它会崩溃并显示以下消息:
ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread. Current thread 0x0x174329f60. Receiver '' (of type 'QRTImpl::LocationDisplayImpl') was created in thread 0x0x17001d940", file kernel/qcoreapplication .cpp, line 563
Mac 或 Android 不会发生这种情况。我的用例是在加载到 stackView 的组件中创建地图。当我离开该组件时,stackview 会杀死导致崩溃的 mapview。我创建了一个 Empty ArcGIS qml 应用程序,通过在加载器中显示带有 "unloads" 按钮的地图,以更简单的方式测试此问题。请参阅 post 底部的简单示例。
import QtQuick 2.6
import QtQuick.Controls 1.4
import Esri.ArcGISRuntime 100.2
ApplicationWindow {
id: appWindow
width: 800
height: 600
title: "IosMapTest"
Rectangle {
id: backgroundRect
anchors.fill: parent
color: "red"
}
Loader {
id: mapLoader
anchors.fill: parent
// add a mapView component
sourceComponent: MapView {
anchors.fill: parent
// set focus to enable keyboard navigation
focus: true
// add a map to the mapview
Map {
// add the BasemapTopographic basemap to the map
BasemapTopographic {}
}
}
}
Button {
anchors.bottom: parent.bottom
anchors.right: parent.right
text: "click here for crash"
onClicked: mapLoader.sourceComponent = undefined
}
}
这似乎是 ArcGIS Runtime 中的一个错误,因此我在我们的系统中记录了一个错误。我能想到的解决它的唯一方法是每次浏览堆栈时都不要 create/destroy 页面。