My application uses QUndoStackBy QUndoStack stack = new QUndoStack().

Then I try to access the function QUndoStack::index() by using

stack->index();

Sometimes, my application crashes at:

QUndoStack::index () at util/qundostack.cpp:713
What is the reason causing the segmentation fault?