getNode_array returns a reference. You probably don’t want to copy the array so use “domNode_Array& nodes = …” instead. Technically what you’re doing should still be ok (though inefficient), but I remember reading that there are problems with copying daeArray objects, and that may be causing your crash.
There were problems with the array copy constructor and operator=
They have been fixed in the SVN repository but have yet been released in an official package. Saving the reference instead of doing a copy is definately more effecient and likely a better approach to take. And it gets around the problem you are seeing. Either save as a reference or get the newest code from the SVN on the sourceforge site.