<?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 Re: QML based app crashing with drag/drop in Qt Maps SDK Questions</title>
    <link>https://community.esri.com/t5/qt-maps-sdk-questions/qml-based-app-crashing-with-drag-drop/m-p/761376#M3798</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;100.6 is an option eventually but I don't think we can get to it immediately. &amp;nbsp;In the meantime, we have implemented a work-around. &amp;nbsp;We pull the symbol from the feature, create a temporary graphic matching the symbol and place in same location, hide the feature, and let the user drag the graphic around. &amp;nbsp;This does not crash.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Sep 2019 17:58:41 GMT</pubDate>
    <dc:creator>JeremyRoberts2</dc:creator>
    <dc:date>2019-09-27T17:58:41Z</dc:date>
    <item>
      <title>QML based app crashing with drag/drop</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/qml-based-app-crashing-with-drag-drop/m-p/761370#M3792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello. &amp;nbsp;We are seeing an issue with a QML based app crashing. &amp;nbsp;When we allow for dragging and dropping of a feature, if you drag the feature around long enough, eventually the app completely crashes. &amp;nbsp;We are using runtimes 100.5. &amp;nbsp;This happens on both Mac and Win PCs. &amp;nbsp;We are using the basic ArcGIS template when creating a new application and slightly modifying it to allow for drag and drop. &amp;nbsp;Please see the attached project. &amp;nbsp;Any suggestions as to why this is happening? &amp;nbsp;It takes me about 50 seconds of dragging to get it to crash but our other developers have it happen much sooner.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2019 14:41:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/qml-based-app-crashing-with-drag-drop/m-p/761370#M3792</guid>
      <dc:creator>JeremyRoberts2</dc:creator>
      <dc:date>2019-09-25T14:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: QML based app crashing with drag/drop</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/qml-based-app-crashing-with-drag-drop/m-p/761371#M3793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeremy-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I know what is going on here. Can you try switching out your onIdentifyLayerStatusChanged signal handler to this and see if it works?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;onIdentifyLayerStatusChanged&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;identifyLayerStatus &lt;SPAN class="operator token"&gt;===&lt;/SPAN&gt; Enums&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;TaskStatusCompleted&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        featureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;clearSelection&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

        &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; i &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; i &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt; identifyLayerResult&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geoElements&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;length&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; i&lt;SPAN class="operator token"&gt;++&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            selectedFeatures&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;push&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;identifyLayerResult&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geoElements&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;i&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
        
        featureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;selectFeatures&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;selectedFeatures&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think your direct assigning of `selectedFeatures = identifyLayerResult.geoElements;` is the problem. This is now assigning selectedFeatures to the list of GeoElements, but nothing is specifically holding on a reference to the GeoElements in that list, so they go out of scope and get garbage collected after a random amount of time. On Windows, for me it was between 15-20 seconds.&amp;nbsp;Whenever things randomly stop working, garbage collection is a likely culprit. I ran the below code to force garbage collection, and reliably, the selectedfeatures.length is 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;onMousePositionChanged&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
   &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;selectedFeatures&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;length &lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
       mouse&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;accepted &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;true&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
       &lt;SPAN class="comment token"&gt;// force garbage collection&lt;/SPAN&gt;
       &lt;SPAN class="token function"&gt;gc&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
       &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; i &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; i &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt; selectedFeatures&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;length&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; i&lt;SPAN class="operator token"&gt;++&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
           selectedFeatures&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;i&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; mouse&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapPoint&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
       &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
       &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;featureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;featureTable&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;updateFeaturesStatus &lt;SPAN class="operator token"&gt;!==&lt;/SPAN&gt; Enums&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;TaskStatusInProgress&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
           featureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;featureTable&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;updateFeatures&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;selectedFeatures&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
       &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
   &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
       &lt;SPAN class="comment token"&gt;// this prints out right away&lt;/SPAN&gt;
       console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"no features in selectedFeatures list"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
       mouse&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;accepted &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
   &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can confirm that this matches with your findings, then please proceed with changing your code to directly store references to the Feature(s) you want. One way to do that is how I have it in the first snippet.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:21:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/qml-based-app-crashing-with-drag-drop/m-p/761371#M3793</guid>
      <dc:creator>LucasDanzinger</dc:creator>
      <dc:date>2021-12-12T08:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: QML based app crashing with drag/drop</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/qml-based-app-crashing-with-drag-drop/m-p/761372#M3794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It still crashes for us. &amp;nbsp;One time I ran it and 90 seconds went by and it never crashed. &amp;nbsp;Then I restarted and it crashed within 30 seconds. &amp;nbsp;We had another dev on a Win machine try it and it crashed within 30 seconds.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2019 20:22:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/qml-based-app-crashing-with-drag-drop/m-p/761372#M3794</guid>
      <dc:creator>JeremyRoberts2</dc:creator>
      <dc:date>2019-09-25T20:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: QML based app crashing with drag/drop</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/qml-based-app-crashing-with-drag-drop/m-p/761373#M3795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmm, that's strange. Can you upload your updated project so I can re-test please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2019 20:24:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/qml-based-app-crashing-with-drag-drop/m-p/761373#M3795</guid>
      <dc:creator>LucasDanzinger</dc:creator>
      <dc:date>2019-09-25T20:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: QML based app crashing with drag/drop</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/qml-based-app-crashing-with-drag-drop/m-p/761374#M3796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is the updated app to retest.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2019 20:34:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/qml-based-app-crashing-with-drag-drop/m-p/761374#M3796</guid>
      <dc:creator>JeremyRoberts2</dc:creator>
      <dc:date>2019-09-25T20:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: QML based app crashing with drag/drop</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/qml-based-app-crashing-with-drag-drop/m-p/761375#M3797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jeremy. I was testing with 100.6 and couldn't repro with the updated code, but can with 100.5. Is 100.6 an option? Even if it is just to validate that the issue is indeed fixed with 100.6? I tried to find a workaround for 100.5 but haven't been able to come up with anything yet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Sep 2019 15:30:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/qml-based-app-crashing-with-drag-drop/m-p/761375#M3797</guid>
      <dc:creator>LucasDanzinger</dc:creator>
      <dc:date>2019-09-26T15:30:06Z</dc:date>
    </item>
    <item>
      <title>Re: QML based app crashing with drag/drop</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/qml-based-app-crashing-with-drag-drop/m-p/761376#M3798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;100.6 is an option eventually but I don't think we can get to it immediately. &amp;nbsp;In the meantime, we have implemented a work-around. &amp;nbsp;We pull the symbol from the feature, create a temporary graphic matching the symbol and place in same location, hide the feature, and let the user drag the graphic around. &amp;nbsp;This does not crash.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Sep 2019 17:58:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/qml-based-app-crashing-with-drag-drop/m-p/761376#M3798</guid>
      <dc:creator>JeremyRoberts2</dc:creator>
      <dc:date>2019-09-27T17:58:41Z</dc:date>
    </item>
  </channel>
</rss>

