VTK Error : "Vector subscript out of range" while setting Input connection in (happen only in debug)

Hello, I compiled VTK 9 and OCCT 7.6.0 with VTK 9.1.0 but I’m getting this error only in debug mode in release mode it is fine.

Exact line : //Mapper->SetInputConnection(OCCSource->GetOutputPort());

Exact same issue (asked by different person) : c++ - VTK is giving the error "Vector subscript out of range" while setting Input connection in debug - Stack Overflow

PS : I checked comments in stackoverflow and follow (0032331: VIS - Exception when trying to display some surfaces using iVtk with VTK 9 - MantisBT) here too but since I’m using 7.6.0 it is already included but still giving me error.

I solved the problem by adding occt runtime deps (freetype). After runtime deps solved port also return properly and debug symbols works properly as well.

Could you tell how you did it

I added dll to into $PATH in order to fix. (or you can copy dlls next to executable as well)