Bug 426955

Summary: Seg fault on QMessageBox because of exceeding canvas size
Product: [Plasma] Breeze Reporter: Marcel <maeseee>
Component: QStyleAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: maeseee, nate, noahadvs
Priority: NOR    
Version First Reported In: 5.18.5   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Marcel 2020-09-25 11:31:49 UTC
SUMMARY
I get a segfault on long canvas sizes. Interestingly the fault is not only depending on the canvas size but also on its content. Here a working example and the one with the bug:

// Bug (seg. fault)
QMessageBox::question(qApp->activeWindow(),
                      QObject::tr("Saving"),
                      QObject::tr("Remember that when you move or rename image files on your disk or the storage device become unavailable"));

// No Bug (just '\n' added)
QMessageBox::question(qApp->activeWindow(),
                      QObject::tr("Saving"),
                      QObject::tr("Remember that when you move or rename image files\n on your disk or the storage device become unavailable"));

See https://github.com/cgilles/digikam-photolayouteditor/commit/1ded36d366884733b89753fb06e50e91396ce48b?branch=1ded36d366884733b89753fb06e50e91396ce48b&diff=unified for the origin of this bug

See also the attached backtrace

STEPS TO REPRODUCE
1. Run a program with the code above

OBSERVED RESULT
seg. fault

EXPECTED RESULT
No segfault. Support of longer lines.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 20.04
(available in About System)
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8

ADDITIONAL INFORMATION
Comment 1 Noah Davis 2021-09-18 19:15:04 UTC
Is this still a problem in the latest Plasma release or in git master?
Comment 2 Nate Graham 2021-09-18 21:48:36 UTC
.
Comment 3 Marcel 2021-09-27 18:33:58 UTC
Unfortunately I don't have the system from a year ago any more. Currently I can't reproduce the error. I get errors earlier. Still working on it and update here if I can reproduce it again. If so I will have to compile Breeze from source.
Comment 4 Noah Davis 2021-09-27 18:39:25 UTC
I will mark this as resolved for now. Feel free to reopen this if you encounter the bug.