<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic MapQuickView identifyLayerAsync sometimes stuck forever in Qt Maps SDK Questions</title>
    <link>https://community.esri.com/t5/qt-maps-sdk-questions/mapquickview-identifylayerasync-sometimes-stuck/m-p/1343430#M5129</link>
    <description>&lt;P&gt;I transformed the identify raster cell sample (&lt;A href="https://developers.arcgis.com/qt/cpp/sample-code/identify-raster-cell/" target="_blank"&gt;Identify raster cell | ArcGIS Maps SDK for Qt | ArcGIS Developers&lt;/A&gt;) to use the new identifyLayerAsync method using QFutures. However, sometimes the QFuture never finishes.&lt;/P&gt;&lt;P&gt;On every MapQuickView::hoverMoved event I'd like to update the raster cell value and display it on the map.&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;	connect(m_mapView, &amp;amp;MapQuickView::hoverMoved, this, [this](QHoverEvent&amp;amp; e) {
		if (!m_identifyLayerFuture.isFinished()) {
			qDebug() &amp;lt;&amp;lt; "Still identifying...";
			return;
		}

		qDebug() &amp;lt;&amp;lt; "IdentifyingLayer";
		m_identifyLayerFuture = m_mapView-&amp;gt;identifyLayerAsync(m_rasterLayer, e.position(), 10, false, 1);
		m_identifyLayerFuture.then(this, [this](IdentifyLayerResult* rawIdentifyResult) {
			qDebug() &amp;lt;&amp;lt; "Finished identifying";
			const auto identifyResult = std::unique_ptr&amp;lt;IdentifyLayerResult&amp;gt;(rawIdentifyResult);
			const auto elements = identifyResult-&amp;gt;geoElements();
			for (GeoElement* geoElement : elements) {
				if (RasterCell* rasterCell = dynamic_cast&amp;lt;RasterCell*&amp;gt;(geoElement)) {
					const AttributeListModel* attributes = rasterCell-&amp;gt;attributes();
					const QStringList attributeNames = rasterCell-&amp;gt;attributes()-&amp;gt;attributeNames();

					for (int i = 0; i &amp;lt; attributeNames.size(); ++i) {
						const QString value = QVariant((*attributes)[attributeNames[i]]).toString();
						if (attributeNames[i] == "Band_0") {
							setRasterValue(value);
						}
					}
				}
			}

			qDebug() &amp;lt;&amp;lt; "Finished processing result";
		});
	});&lt;/LI-CODE&gt;&lt;P&gt;While moving the mouse, panning, zooming, leaving the raster cell area, usually after a few seconds the identifyLayerAsync QFuture suddenly does not finish anymore. If I use qFuture.waitForFinished() the application is stuck. Sometimes the application also crashes due to access violations.&lt;/P&gt;&lt;P&gt;Please find attached the IdentifyRasterCell.cpp, IdentifyRasterCell.h, IdentifyRasterCell.qml files that I use.&lt;/P&gt;&lt;P&gt;Am I doing something wrong in general, or might this be a bug?&lt;/P&gt;</description>
    <pubDate>Mon, 30 Oct 2023 17:20:43 GMT</pubDate>
    <dc:creator>imbachb</dc:creator>
    <dc:date>2023-10-30T17:20:43Z</dc:date>
    <item>
      <title>MapQuickView identifyLayerAsync sometimes stuck forever</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/mapquickview-identifylayerasync-sometimes-stuck/m-p/1343430#M5129</link>
      <description>&lt;P&gt;I transformed the identify raster cell sample (&lt;A href="https://developers.arcgis.com/qt/cpp/sample-code/identify-raster-cell/" target="_blank"&gt;Identify raster cell | ArcGIS Maps SDK for Qt | ArcGIS Developers&lt;/A&gt;) to use the new identifyLayerAsync method using QFutures. However, sometimes the QFuture never finishes.&lt;/P&gt;&lt;P&gt;On every MapQuickView::hoverMoved event I'd like to update the raster cell value and display it on the map.&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;	connect(m_mapView, &amp;amp;MapQuickView::hoverMoved, this, [this](QHoverEvent&amp;amp; e) {
		if (!m_identifyLayerFuture.isFinished()) {
			qDebug() &amp;lt;&amp;lt; "Still identifying...";
			return;
		}

		qDebug() &amp;lt;&amp;lt; "IdentifyingLayer";
		m_identifyLayerFuture = m_mapView-&amp;gt;identifyLayerAsync(m_rasterLayer, e.position(), 10, false, 1);
		m_identifyLayerFuture.then(this, [this](IdentifyLayerResult* rawIdentifyResult) {
			qDebug() &amp;lt;&amp;lt; "Finished identifying";
			const auto identifyResult = std::unique_ptr&amp;lt;IdentifyLayerResult&amp;gt;(rawIdentifyResult);
			const auto elements = identifyResult-&amp;gt;geoElements();
			for (GeoElement* geoElement : elements) {
				if (RasterCell* rasterCell = dynamic_cast&amp;lt;RasterCell*&amp;gt;(geoElement)) {
					const AttributeListModel* attributes = rasterCell-&amp;gt;attributes();
					const QStringList attributeNames = rasterCell-&amp;gt;attributes()-&amp;gt;attributeNames();

					for (int i = 0; i &amp;lt; attributeNames.size(); ++i) {
						const QString value = QVariant((*attributes)[attributeNames[i]]).toString();
						if (attributeNames[i] == "Band_0") {
							setRasterValue(value);
						}
					}
				}
			}

			qDebug() &amp;lt;&amp;lt; "Finished processing result";
		});
	});&lt;/LI-CODE&gt;&lt;P&gt;While moving the mouse, panning, zooming, leaving the raster cell area, usually after a few seconds the identifyLayerAsync QFuture suddenly does not finish anymore. If I use qFuture.waitForFinished() the application is stuck. Sometimes the application also crashes due to access violations.&lt;/P&gt;&lt;P&gt;Please find attached the IdentifyRasterCell.cpp, IdentifyRasterCell.h, IdentifyRasterCell.qml files that I use.&lt;/P&gt;&lt;P&gt;Am I doing something wrong in general, or might this be a bug?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 17:20:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/mapquickview-identifylayerasync-sometimes-stuck/m-p/1343430#M5129</guid>
      <dc:creator>imbachb</dc:creator>
      <dc:date>2023-10-30T17:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: MapQuickView identifyLayerAsync sometimes stuck forever</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/mapquickview-identifylayerasync-sometimes-stuck/m-p/1344774#M5130</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I tried to reproduce this issue, but everything looks good (Mac, Qt 6.5.3, ArcGIS Maps SDK for Qt&amp;nbsp;200.2). Which platform do you use? Is there some specific moves to do to reproduce it?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2023 23:47:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/mapquickview-identifylayerasync-sometimes-stuck/m-p/1344774#M5130</guid>
      <dc:creator>GuillaumeBelz</dc:creator>
      <dc:date>2023-11-01T23:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: MapQuickView identifyLayerAsync sometimes stuck forever</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/mapquickview-identifylayerasync-sometimes-stuck/m-p/1346567#M5131</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/139551"&gt;@GuillaumeBelz&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for getting back to me. I've attached a zip containing 2 webm files showing how I get the issues.&lt;/P&gt;&lt;P&gt;An important distinction is that the issues are mostly prevalent in Debug configuration. In Release configuration the issues happen much less frequently.&lt;/P&gt;&lt;P&gt;We use Qt&amp;nbsp;&lt;SPAN&gt;6.5.3,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;ArcGISQtSDK&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;200.2, running on Microsoft Windows 10 Enterprise Version 10.0.19044&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The issue usually happens after hovering for a few seconds over the raster layer. Often times the QFutures also get stuck when leaving the raster layer and then hovering back into the raster layer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2023 09:00:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/mapquickview-identifylayerasync-sometimes-stuck/m-p/1346567#M5131</guid>
      <dc:creator>imbachb</dc:creator>
      <dc:date>2023-11-07T09:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: MapQuickView identifyLayerAsync sometimes stuck forever</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/mapquickview-identifylayerasync-sometimes-stuck/m-p/1356461#M5135</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Sorry, I was on vacation. I'll work on your issue this week.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 18:50:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/mapquickview-identifylayerasync-sometimes-stuck/m-p/1356461#M5135</guid>
      <dc:creator>GuillaumeBelz</dc:creator>
      <dc:date>2023-12-04T18:50:30Z</dc:date>
    </item>
  </channel>
</rss>

