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).
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?
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() ).
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…
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.
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.
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.
Try commenting out rendering code bit-by-bit until the error ends. This may help you pinpoint the root cause of the issue.