<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div><div><div><div>The behavior of the bug is that python crashes when you create an index with a pointer to an instantiated object's attribute, and then try to access that pointer using the internalPointer method.<br><br></div>Example<br>------------<br><pre style="background-color:rgb(43,43,43);color:rgb(169,183,198);font-family:"Courier New";font-size:9pt"><span style="color:rgb(204,120,50);font-weight:bold">class </span><span style="font-weight:bold">foo</span>:<br>    <span style="color:rgb(204,120,50);font-weight:bold">def </span><span style="color:rgb(178,0,178)">__init__</span>(<span style="color:rgb(148,85,141)">self</span>):<br>        <span style="color:rgb(148,85,141)">self</span>.bar = <span style="color:rgb(104,151,187)">2<br></span><span style="color:rgb(104,151,187)"><br></span><span style="color:rgb(204,120,50);font-weight:bold">class </span><span style="font-weight:bold">TreeModel</span>(QtCore.<wbr>QAbstractItemModel):<br>    <span style="color:rgb(204,120,50);font-weight:bold">def </span><span style="color:rgb(178,0,178)">__init__</span>(<span style="color:rgb(148,85,141)">self</span><span style="color:rgb(204,120,50)">, </span>parent=<span style="color:rgb(136,136,198)">None</span>):<br>        <span style="color:rgb(136,136,198)">super</span>(TreeModel<span style="color:rgb(204,120,50)">, </span><span style="color:rgb(148,85,141)">self</span>).<span style="color:rgb(178,0,178)">__init__</span>(parent)<br>        <span style="color:rgb(148,85,141)">self</span>.foo = foo()<br>        ind = <span style="color:rgb(148,85,141)">self</span>.createIndex(<span style="color:rgb(104,151,187)">1</span><span style="color:rgb(204,120,50)">,</span><span style="color:rgb(104,151,187)">1</span><span style="color:rgb(204,120,50)">,</span><span style="color:rgb(148,85,141)">self</span>.foo.<wbr>bar)<br>        <span style="color:rgb(204,120,50);font-weight:bold">print </span>ind.internalPointer()</pre><br></div>Any help would be appreciated.<br><br></div>Thanks,<br></div>Andres<br><div><div><div><br></div></div></div></div>
</div><br></div>