<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><code>I have been trying hard to find how to get access to the object I stored in a QMultiMap container. I am able to retrieve the numbered keys but when I try accessing the object QGIS crashes. <br><br>I have done similar work in plain C++ and it has worked with out any problem, I used regualr multimap before. Here I tried both QT multimap and regualr multimap and while trying to access the second item in the iterator QGIS seems to give up. Any help will be appreciated. I have pasted a piece of the code below,&nbsp; &nbsp; <br><br><br>&nbsp;&nbsp; typedef QMultiMap&lt;long,QgsPoint&gt; mmaplngQPt;<br>// QgsPoint map iterator objects<br>&nbsp; &nbsp;typedef mmaplngQPt::iterator maplngQPtit1, maplngQPtit2;<br>&nbsp; &nbsp;mmaplngQPt::iterator Pt1Qmapit, Pt2Qmapit,itQlow, itQup;<br>&nbsp; &nbsp;typedef pair &lt; long, QgsPoint &gt;&nbsp; QPt_pair;<br>&nbsp;
 &nbsp;mmaplngPt mapQPt,mapQPt0,mapQPt1;<br>&nbsp; &nbsp;mmaplngPt::iterator mapQPtit;<br>&nbsp; &nbsp;long iKey;<br>&nbsp; &nbsp;int lbx,ubx;<br>&nbsp; QgsPoint vx;<br><br>&nbsp; &nbsp;itQlow=mapQPt.lowerBound (lbX);<br>&nbsp; &nbsp;itQup=mapQPt.upperBound (ubX);<br><br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;for ( mapQPtit=itQlow ; mapQPtit != itQup; mapQPtit++ ) <br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;{<br><br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;txtStream &lt;&lt;"key = "&lt;&lt;itQlow.key()&lt;&lt;endl;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; iKey = (QPt1mapit).key();<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
 &nbsp;vx = (QPt1mapit).value();<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br><br><br><br>The program crashes write after it prints the key value. By the way any way of finding a meaningful error message in QGIS?<br><br>Thank you,<br><br>Maaza<br></code></td></tr></table>