- 
    Bug 
- 
    Resolution: Done
- 
    P1: Critical 
- 
    4.8.3
- 
    None
- 
    linux
- 
        e28a957035878abc5e7cccc9d16ffe0fcad842a2, 2df3a87d1013c38e9aa8d90b6f2a5552bf88aaf4
I am seeing a crash when using Qt4 of SHA d5d0ecab with Qt Creator.
This crash does NOT happen when using Qt4 with SHA 5fd483d0 with the same binaries of Qt Creator.
I can reproduce this crash by selecting a area of text and then hitting backspace or delete.
Example line (from Qt Creator's baseqtversion.cpp):
QtVersionNumber::QtVersionNumber(int ma, int mi, int p)
Selecting from the second Q to the end of line: no crash.
Selecting from the second Q to the 4th r: no crash
Selecting from the first Q to the end of line: no crash.
Selecting from the second t to the end of line: CRASH.
Selecting from the second t to the 3rd i: CRASH
Selecting from the second t to the (: no crash
All examples have the letters given as part of the selection.
This is the backtrace:
0	raise	/usr/lib/libc.so.6		0x7ffff502ffa5	
1	abort	/usr/lib/libc.so.6		0x7ffff5031428	
2	qt_message_output	qglobal.cpp	2266	0x7ffff5e72df3	
3	qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *)	qglobal.cpp	2312	0x7ffff5e72f6f	
4	qFatal	qglobal.cpp	2495	0x7ffff5e73692	
5	qt_assert_x	qglobal.cpp	2021	0x7ffff5e729eb	
6	QVarLengthArray<int, 16>::remove	qvarlengtharray.h	319	0x7ffff6c921e5	
7	QTextEngine::resolveAdditionalFormats	qtextengine.cpp	2855	0x7ffff6c8cdf7	
8	QTextEngine::itemize	qtextengine.cpp	1633	0x7ffff6c870b0	
9	QTextLayout::beginLayout	qtextlayout.cpp	624	0x7ffff6c94d00	
10	QPlainTextDocumentLayout::layoutBlock	qplaintextedit.cpp	373	0x7ffff6f72596	
11	QPlainTextDocumentLayout::documentChanged	qplaintextedit.cpp	303	0x7ffff6f71f9b	
12	QTextDocumentPrivate::finishEdit	qtextdocument_p.cpp	1220	0x7ffff6ccc90c	
13	QTextDocumentPrivate::endEditBlock	qtextdocument_p.cpp	1201	0x7ffff6ccc790	
14	QTextCursor::removeSelectedText	qtextcursor.cpp	1662	0x7ffff6d0001a	
15	QTextCursor::deleteChar	qtextcursor.cpp	1500	0x7ffff6cff813	
16	QTextControlPrivate::keyPressEvent	qtextcontrol.cpp	1269	0x7ffff6c73597	
17	QTextControl::processEvent	qtextcontrol.cpp	946	0x7ffff6c717e3	
18	QTextControl::processEvent	qtextcontrol.cpp	906	0x7ffff6c7168e	
19	QPlainTextEditPrivate::sendControlEvent	qplaintextedit_p.h	136	0x7ffff6f7ce5d	
20	QPlainTextEdit::keyPressEvent	qplaintextedit.cpp	1698	0x7ffff6f781d2	
21	TextEditor::BaseTextEditorWidget::keyPressEvent	basetexteditor.cpp	1857	0x7fffebdda76e	
22	CppEditor::Internal::CPPEditorWidget::keyPressEvent	cppeditor.cpp	1644	0x7fffe7ebd5c9	
23	QWidget::event	qwidget.cpp	8406	0x7ffff69dbbf8	
24	QFrame::event	qframe.cpp	557	0x7ffff6ea5c7b	
25	QAbstractScrollArea::event	qabstractscrollarea.cpp	996	0x7ffff6f4eb1e	
26	QPlainTextEdit::event	qplaintextedit.cpp	1520	0x7ffff6f777a2	
27	TextEditor::BaseTextEditorWidget::event	basetexteditor.cpp	2115	0x7fffebddbfd7	
28	CppEditor::Internal::CPPEditorWidget::event	cppeditor.cpp	1578	0x7fffe7ebcde2	
29	QApplicationPrivate::notify_helper	qapplication.cpp	4557	0x7ffff6978e28	
30	QApplication::notify	qapplication.cpp	3998	0x7ffff69766eb	
31	QCoreApplication::notifyInternal	qcoreapplication.cpp	915	0x7ffff5fb9f82	
32	QCoreApplication::sendSpontaneousEvent	qcoreapplication.h	234	0x7ffff697c235	
33	qt_sendSpontaneousEvent	qapplication.cpp	5555	0x7ffff697916b	
34	QKeyMapper::sendKeyEvent	qkeymapper_x11.cpp	1866	0x7ffff6a4dc60	
35	QKeyMapperPrivate::translateKeyEvent	qkeymapper_x11.cpp	1836	0x7ffff6a4d96f	
36	QApplication::x11ProcessEvent	qapplication_x11.cpp	3523	0x7ffff6a14842	
37	x11EventSourceDispatch	qguieventdispatcher_glib.cpp	146	0x7ffff6a4fe80	
38	g_main_context_dispatch	/usr/lib/libglib-2.0.so.0		0x7ffff4740475	
39	??	/usr/lib/libglib-2.0.so.0		0x7ffff47407a8	
40	g_main_context_iteration	/usr/lib/libglib-2.0.so.0		0x7ffff4740864	
41	QEventDispatcherGlib::processEvents	qeventdispatcher_glib.cpp	424	0x7ffff5ff5b9f	
42	QGuiEventDispatcherGlib::processEvents	qguieventdispatcher_glib.cpp	204	0x7ffff6a5022e	
43	QEventLoop::processEvents	qeventloop.cpp	149	0x7ffff5fb7398	
44	QEventLoop::exec	qeventloop.cpp	204	0x7ffff5fb752c	
45	QCoreApplication::exec	qcoreapplication.cpp	1187	0x7ffff5fba618	
46	QApplication::exec	qapplication.cpp	3818	0x7ffff697607e	
47	main	main.cpp	435	0x40b952