Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.5.0, 6.5.1, 6.5.2, 6.5.3, 6.6.0, 6.6.1
-
-
be6c651be (dev), 3576e6099 (6.7), 3d2d8c32c (6.6), c7142a40f (tqtc/lts-6.5)
Description
I am a collaborator of this open-source, note-taking app called Notes.
We use GitHub Actions to build and distribute binaries, and after trying to update Qt from 6.4.2 to 6.5.0 as a part of a feature addition, I encountered what I assume to be a regression in Qt. Unfortunately, my C++ debugging skills is very limited, so please bear with me.
Using gdb and valgrind/Kcachegrind, I came to the (very naïve) conclusion that our program is somehow stuck an infinite loop in QTextDocumentLayoutPrivate::layoutBlock(), more specifically in this block, causing the app to freeze and the memory to continuously grow. Keep in mind that I can be far off from the actual place, though.
Based on my tests, this only reproduces in Qt versions 6.5.0, 6.5.1 and 6.5.2, meaning earlier ones are most likely fine.
Unfortunately, I don't have minimal reproduction case, but if you're able to build Notes from source, here are some fairly easy steps to reproduce the problem:
1. Clone & build the app:
git clone https://github.com/nuttyartist/notes.git --recursive
cd notes
cmake -B build -S . -DUSE_QT_VERSION=6
cmake --build build
2. Run the app:
./build/notes
3. Create a new note (using the '+' blue button, or just by typing anything into the rightmost panel)
4. Type anything into that note (the issue doesn't reproduce for me when it's empty)
5. Maximize the window
6. Unmaximize the window
Result:
The app will freeze, while CPU and memory usage stay very high.
Videos:
Arch Linux (Qt 6.5.2): https://user-images.githubusercontent.com/626206/255402710-34b25f90-fd5a-4504-9d1d-87af4754c2ed.mp4
Windows 10 (Qt 6.5.0): https://user-images.githubusercontent.com/626206/252715637-780e726b-9624-475f-8c2a-d717e58eadae.mp4
Attachments
Issue Links
- relates to
-
QTBUG-109474 6.5: Behavioral change in QTextLine
-
- Closed
-
For Gerrit Dashboard: QTBUG-115459 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
535294,3 | Fix infinite loop in QTextLayout with setNumColumns() | dev | qt/qtbase | Status: MERGED | +2 | 0 |
535473,2 | Fix infinite loop in QTextLayout with setNumColumns() | 6.7 | qt/qtbase | Status: MERGED | +2 | 0 |
535498,2 | Fix infinite loop in QTextLayout with setNumColumns() | 6.6 | qt/qtbase | Status: MERGED | +2 | 0 |
535534,2 | Fix infinite loop in QTextLayout with setNumColumns() | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |