Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Viz3d removeWidget RtlValidateHeap

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.