JokerMartini
JokerMartini

Reputation: 6147

Qt Creator error endless loop

When I try to create a project which was developed by someone working in a different country and timezone I keep getting the following error in my console. He had mentioned this problem is because of the Data/Time being different from his computer to mine. I'm not sure if that is true, if it is, there has to be a solution for that without having to change my computer time to match his. I'm not sure what else to post that would be helpful in trouble shooting this, if there is just let me know and I'll update. I'm a bit new to C++/Qt Creator. Why is this happening. It seems to never finish, it just endlessly prints this to the console.

Compile Output Console

Running steps for project Nexus...
Configuration unchanged, skipping qmake step.
Starting: "C:\Qt\Tools\mingw492_32\bin\mingw32-make.exe" 
C:\Qt\5.5\mingw492_32\bin\qmake.exe -spec win32-g++ "CONFIG+=debug" "CONFIG+=qml_debug" -o Makefile ..\Nexus\Nexus.pro
C:\Qt\5.5\mingw492_32\bin\qmake.exe -spec win32-g++ "CONFIG+=debug" "CONFIG+=qml_debug" -o Makefile ..\Nexus\Nexus.pro
C:\Qt\5.5\mingw492_32\bin\qmake.exe -spec win32-g++ "CONFIG+=debug" "CONFIG+=qml_debug" -o Makefile ..\Nexus\Nexus.pro
C:\Qt\5.5\mingw492_32\bin\qmake.exe -spec win32-g++ "CONFIG+=debug" "CONFIG+=qml_debug" -o Makefile ..\Nexus\Nexus.pro

General Message Output Console

Warnings while parsing QML type information of C:/Qt/5.5/mingw492_32/qml:
<dump of C:\Qt\5.5\mingw492_32\qml>:1:24: Reading only version 1.1 parts.
<dump of C:\Qt\5.5\mingw492_32\qml>:10:5: Expected only Component and ModuleApi object definitions.

Pro file

#-------------------------------------------------
#
# Project created by QtCreator 2016-02-29T21:37:32
#
#-------------------------------------------------

QT       += core gui xml

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

include(core/core.pri)
include(node/node.pri)
include(librarybox/librarybox.pri)
include(blockeditor/blockeditor.pri)
include(propertyeditor/propertyeditor.pri)
include(lib/lib.pri)


TARGET = Nexus
TEMPLATE = app


SOURCES += main.cpp\
    mainwindow.cpp


HEADERS  += mainwindow.h


FORMS    += mainwindow.ui \
    virtualnamepropertyitem.ui

RESOURCES += \
    nexus_resources.qrc

RC_FILE = nexus.rc

Upvotes: 4

Views: 2994

Answers (3)

jpo38
jpo38

Reputation: 21514

Had the same problem with latest version of QtCreator (3.6.1 with Qt 5.6.0).

Answer proposed by "Zeta" did not help.

Disabling "Shadow build" in project options fixed the problem for me. That's a good workaround.

Finally shorten file names (somes where huge) to fix the issue:

  • Shortened project names (.pro) (file name and path, removed a few caracters)
  • Shortened resources names (.qrc) (file name and path, removed a few caracters)

Issue then disappeared (even with shadow build, it's probably related as shadow-builds are using an output folder with a very long name).

There's apparently a bug when file paths are too long (>~170, found a post on a forum reporting that).

An alternative is also to change the pattern used by QtCreator for shadow builds. This can be modified from the QtCreator options and you can then make the name shorter, this is another way to quickly and easily fix the issue.

Upvotes: 5

Zeta
Zeta

Reputation: 105876

This can happen if your .pro file (or any other file) has a timestamp from the future. The Makefile generated by qmake contains a rule that will generated the Makefile anew when its older than the .pro file. Since the new Makefile is still older than its counterpart from the future, this will go on till you actually reach the correct time.

There are two ways to get rid of this behavior:

  1. Wait till the .pro file's timestamp is in the past (not recommended)
  2. Edit the .pro file. Even a trivial edit like a new comment should be enough.

Upvotes: 6

JokerMartini
JokerMartini

Reputation: 6147

I wrote a python script that loops through recursively through all the files of the project and simply just resaves the files. That updated the timestamp and corrected the QMake Infinite loop. It now compiles correctly.

Upvotes: 0

Related Questions