[Development] Too long text in qlabel crashes my gdm

Kotanski, Jan jan.kotanski at desy.de
Thu Sep 29 22:08:05 CEST 2016


Hi,

I've noticed that too long test in qlabel e.g.

   void retranslateUi(QDialog *Dialog)
    {
        Dialog->setWindowTitle(QApplication::translate("Dialog", "Dialog", 0, QApplication::UnicodeUTF8));
        char str[2000];
        for(int i=0; i<1999;i++)
          str[i] = 'a';
        str[1999]='\0';
        label->setText(QApplication::translate("Dialog", str, 0, QApplication::UnicodeUTF8));
    } // retranslateUi

crashed my gdm (for gnome 3).

Is it a known problem? How to fix it?

More info on:

https://www.riverbankcomputing.com/pipermail/pyqt/2016-September/038145.html

Bests,
Jan



More information about the Development mailing list