Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-79945

App fails to start if executable's filename is longer than 128 characters

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 5.12.5
    • Widgets: Main Window
    • None
    • Windows 7 Professional SP 1 64-bit
      All Qt versions mentioned were installed using standalone installers downloaded from qt.io
    • Windows

    Description

      Somewhere between Qt 5.11.0 and Qt 5.12.5, executables with names longer than 128 characters stopped working: they'll show a generic Windows error dialog instead.

      Steps to reproduce the issue:

      1. create a new Qt Widgets App with Qt Creator (or open it from filename_length.zip ). Its main.cpp looks like this:
        #include "mainwindow.h"
        
        #include <QApplication>
        
        int main(int argc, char *argv[]) {
          QApplication a(argc, argv);
          MainWindow w;
          w.show();
          return a.exec();
        }
        
      2. compile it with Qt 5.12.5.
      3. copy Qt5Core, Qt5Gui, Qt5Widgets DLLs next to the executable.
      4. make sure the executable starts fine.
      5. rename executable to ___________________________________________________________________________________________________________________________x.exe – that is 123 underscores, one "x", and the filename extension. The total length is thus 128 characters.
      6. try to start the executable and get a generic Windows error dialog:

        The details say:
        Сигнатура проблемы:
          Имя события проблемы:	BEX
          Имя приложения:	________________________________________________________________
          Версия приложения:	0.0.0.0
          Отметка времени приложения:	5dca5cba
          Имя модуля с ошибкой:	igdumdim32.dll
          Версия модуля с ошибкой:	10.18.14.5057
          Отметка времени модуля с ошибкой:	5b75a484
          Смещение исключения:	001599d2
          Код исключения:	c0000417
          Данные исключения:	00000000
          Версия ОС:	6.1.7601.2.1.0.256.48
          Код языка:	1049
          Дополнительные сведения 1:	bb5f
          Дополнительные сведения 2:	bb5ff5b63d0256cfc8d75f4881c993cb
          Дополнительные сведения 3:	fa22
          Дополнительные сведения 4:	fa22a9b38a3fac2a94e9385fb41b7142
        
        Ознакомьтесь с заявлением о конфиденциальности в Интернете:
          http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0419
        
        Если заявление о конфиденциальности в Интернете недоступно, ознакомьтесь с его локальным вариантом:
          C:\Windows\system32\ru-RU\erofflps.txt
        

        (I'm sorry it's in Russian, but the layout is probably the same across different languages. Exception code c0000417 didn't give me any clues about the source of the problem.)
        Note that the third line says "123 underscores" without the "x" – in other words, the filename was truncated.

      7. open main.cpp and comment out the line saying w.show().
      8. rename the newly compiled app again, start it, observe there is no error. (Since there is no main window displayed, I ran the app from Git Bash to make sure it is running.)

      Further details:

      • I can also reproduce this with Qt 5.12.5 64-bit
      • I couldn't reproduce this with Qt 5.5.1 32-bit and 5.10.1 32-bit

      Attachments

        1. error.png
          error.png
          28 kB
        2. filename_length.zip
          2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            minoru Alexander Batischev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes