Viz3d removeWidget RtlValidateHeap

asked 2016-03-24 09:54:17 -0500

acajic gravatar image

An error occurs when trying to remova a widget from a Viz3d window. The error only occurs using a Release configuration in Visual Studio. When using Debug configuration, everything works fine.

HEAP[ArUco.exe]: Invalid address specified to RtlValidateHeap( 00000000003B0000, 0000000014BC8BC0 )

The call stack at the moment of exception looks like this:

image description

At the bottom, we can see removeWidget method being called. It then goes through a long chain of VTK calls. Among other calls, I see "garbage collector" so I assume something is wrongly trying to get deallocated. (?)

I an altered code, if I perform

viz::Widget widg = measurementsWindow->getWidget(id);

before calling

removeWidget(id)

then the error is delayed. It is delayed up until the point when execution leaves the current scope. The scope in which widg object lives. When this widg object tries to get deallocated, the same error occurs.

edit retag flag offensive close merge delete