![Joachim Greiner's picture Joachim Greiner's picture](https://dev.opencascade.org/sites/default/files/styles/user/public/pictures/picture-53748-1628782833.jpg?itok=KIU3u7PT)
Thu, 03/12/2020 - 19:42
Hi,
I am iterating over a list of nodes of a VrmlData_Group. the iterator crashes after the last element in the next-function of the iterator (Access Violation). The problem appeared first when I made an update to OCC 7.4.0. In my previous version, OCC 7.1.0 the same code worked fine.
Here is my code:
const Handle(VrmlData_Group)& aGroupNode = Handle(VrmlData_Group)::DownCast(aNode);
if (!aGroupNode.IsNull())
{
VrmlData_ListOfNode::Iterator iter = aGroupNode->NodeIterator();
for (; iter.More(); iter.Next())
{
Handle(VrmlData_Node)& testnode = iter.Value();
}
}
What am I doing wrong? As I said, everthing worked fine before the update
Kind regards,
Joachim
Sun, 03/15/2020 - 11:36
I have some doubts that just using an iterator may cause such problem - most likely it happens somewhere else.
Does it happen with any VRML model or with specific one (which could be used for reproducing)?
Note that DownCast returns not a reference to casted object but a copy Handle(VrmlData_Group).
Thu, 03/19/2020 - 19:21
The problem is finally solved. After a lot try and error, I figured out that there was a problem with tcl86.dll. I downloaded the latest version an compiled it for VS 2015 32 Bit. After that, everything works fine. Before I used the 32 bit Version from the OCC website, but this one didn't work right together with VS 2015.