Issue with VTK in ROS Workspace

Hi everyone,

I am new to Qt and ROS. I am working on Qt Creator 4.8.0 (QT with ROS plugin). I have created a catkin workspace in Qt and a mainwindow was created. And I am trying to add QVTKWidget to the mainwindow . It was successfully built but when it is run, an error message is displayed.

Code: mainwindow.cpp:

QVTKWidget* vtkWidget;
vtkWidget = new QVTKWidget();

Error:realloc(): invalid pointer: 0x00007facb5723820 ***
======= Backtrace: =========

Any solution to this?