Details
-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
None
-
5.12.2
-
None
-
Windows 10
Description
TextEdit seems to leak memory when text is entered and deleted. This was reproduced on Windows 10 and iOS (iPhone 11 pro, 14.6) with Qt 5.12.2 so far. Perhaps more platforms are affected.
This becomes very apparent when inputting lots of text, some hundreds of lines or more, and watching the application's memory consumption. A default-created (empty QML) project with the following code quickly gets from ~80mb to >1500mb memory consumption.
After deleting the text from the TextEdit, the memory consumption goes down but stays at ~800mb (10x the initial amount!). In more complex applications with lots of QML, custom fonts, etc., where the TextEdit is supposed to hold large texts, the problem is amplified by a factor of 2-10, and breaks the user experience (the application slows down until crashing in the worst case).
My minimal example:
import QtQuick 2.12 import QtQuick.Window 2.12 Window { width: 1024 height: 768 visible: true title: qsTr("Hello World") TextEdit { anchors.fill: parent } }
// EDIT: Probably related to https://bugreports.qt.io/browse/QTBUG-103819.
Attachments
Issue Links
- is duplicated by
-
QTBUG-103819 QML TextEdit memory usage is extreme and the memory is not freed
- Closed
- relates to
-
QTBUG-107214 QML Text Memory leak
- Closed