How to debug this error when program is running?

SymGetLineFromAddr64 returned error code 487
at BaseThreadInitThunk

ERROR: In D:\APP\VTK-8.2.0\Rendering\OpenGL2\vtkOpenGLImageSliceMapper.cxx, line 485
vtkOpenGLImageSliceMapper (02A30300): failed after RenderPolygon 1 OpenGL errors detected
0 : (1286) Invalid framebuffer operation

vtkoutputwindow message


Are you using Qt? Do you have the latest graphics driver installed?



Hello PC,
I didn’t use QT yet.
these info were output by vtkoutputWindow


the graphics driver on windows, you mean OpenGL?

Yes. The back-end libraries of the 3D graphics APIs (OpenGL, Direct3D, etc.) are provided by the vendor of your graphics card. These should be kept updated so to support all the possible operations made by the front-end (VTK making OpenGL calls in your program).

I checked the graphics driver, it’s newest.

is the error code about memory leak?

No. A memory leak is a silent defect that consists of a program loosing track of dynamically allocated memory (e.g. a delete or free() wasn’t executed due to an early function return or exception thrown). That memory remains unavailable and unusable until the program finishes, but it doesn’t trigger an exception.

Well, usually, the first suspect in such cases is client code. Here are the parts of the stack strace that I believe are client code:

I’d take a look at those codes, starting at the topmost one. A stack trace is presented such that the code where the exception emerged appears first. Note that it is not necessarily the root cause of the error. It may be caused by ill-written multithreaded code. It may be caused by pixel format mismatch between the OpenGL back-end and the GUI API. It may be caused by excess Update()s triggered by mouse events… BTW, which graphics system are you using? You said you’re not using Qt, so what? MFC? GLUT?

Really thanks for your reply, Paulo.

I will use Qt in the future , I haven’t integrated these vtk codes into QT yet.

You are very right , I called many update() function in MouseMove event.

Becaues I have 7 windows to display actors. And when MouseMove event happened in one window, all other window need to be updated( called interactor->Render() ).

codes at line 28 :
void GLIOIREWindow::Show() { this->interactor->Start(); }

codes line 375:


codes at line 90:

void GLIOIREWindow::Update()

yeah ,It’s all about to rerender the window.

So, according to the stack trace, you’re basically calling Render() on your interactor thrice in a row, right? If so, why are you doing that? Wich class does this->interactor belong to?

I have many windows. when I do some mouse action at one window, I need to render other windows to update the actors’s status. that’s why I called Render() in high-frequency.

GLIOIREWindow class was created by myself , it contains many components like vtkRenderWindow / vtkInteractor and so on…



Is it also Win3D::Win3DInteractorStyle?

I guess you need to thoroughly review those custom classes. Without access to their code, we’re left to guess. I believe the issue is caused by possibly spamming of mouse events resulting in overflowing OpenGL calls given the multiple view ports. Perhaps calling WaitForCompletion() right after calling Render() on your vtkRenderWindow objects may prevent those errors. vtkRenderWindow::CheckInRenderStatus() (returns an int) may also be used to verify whether rendering is still under way for a given vtkRenderWindow.

yeah , Win3D::Win3DInteractorStyle was set to GLIOIREWindow::interactor as follow:

void Win3D::InitInteractorStyle()

So much thanks for the advice, I will have a try.
thanks again.

Other things to try:

  1. If your app renders from multiple threads, please consider dropping this. Massive parallelization already occurs in the GPU. But if you do need that, do be sure each thread has its own OpenGL context.
  2. You still didn’t say which windowing system you are using. Check whether the pixel format being used in OpenGL matches the one the windowing system was configured to use.
  3. Try commenting out rendering code bit-by-bit until the error ends. This may help you pinpoint the root cause of the issue.

Windows System: The default output window that comes with vtk
and I will Integrate these codes into vtk in the future.

thanks for so many advice

Do you mean MFC?

I write vtk code in vs, and show the display window.
is that MFC? I don’t think so.

If you’re not using Qt, I think you need to know which GUI API you are using in order to diagnose issues that are related to it.