Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QT Creator hangs on opening a file or project



  • Hi!

    My previously installed QT SDK 1.2.1 was working fine.

    Then, I tried to upgrade it to QT OpenSource 5.6.1. It was working fine.
    One day, it started hanging on clicking "File--->Open a New File or Project".

    I have reinstalled QT 5.6.1 multiple times, but it still hangs on that.
    I tried the same for QT OpenSource 4.9.2 and 5.3.0, but they also show the same issue.

    Have attached the screenshot whenever I click on "Open a File or Project"
    9446ce30-5370-48ce-a1c1-852a39e26b3e-image.png

    Please help
    Thanks



  • So most likely some Qt Creator plugin is the culprit.
    To find which one(s), start Qt Creator (you can start it normally), open the Help\About Plugins dialog box.

    Try deselecting (making the plugin not Load) some of the plugins, try first with all the plugins listed under Utilities. Then exit Qt Creator, start it again and try Open File or Project and see if it hangs. If it still hangs, try deselecting more plugins. If it does not hang, then try selecting a few plugins to see which one is the bad boy :-)


  • Lifetime Qt Champion

    Hi and welcome to the forums

    No other app has any issues with their "File open" ?

    I have seen network shares and disconnected disks do this but then its also for say notepad.

    You could try the last reinstall. ( yeah we always say that on windows :)

    Uninstall - Remove all.

    Then clean files in

    %APPDATA%\QtProject
    and
    %LOCALAPPDATA%\QtProject

    ( you can paste to explorer to go there )
    This will wipe out ALL Creators settings. (just so you are prepared for that)

    then reboot the system.

    Then install again.

    I know it sucks but not sure what else to try.



  • @mrjj
    Hi!

    No other app has any issues with their "File open"

    I tried all your methods. There was no QTProject folder in my %LOCALAPPDATA%.
    I even deleted the Nokia folder in APPDATA (related to old QT SDK files) & restarted + reinstalled the Qt5.6.1

    But, the issue is still there

    I just discovered that it also hangs on "File->Open File With ..."

    Further, it shows no issue on "File->New Project"
    However, when I choose, say, Widgets---->OK---->Browse for project folder location, it stucks there also.

    So, basically anything related to opening my filesystem from QT causes hangs without even opening a new window for opening file/project

    No other menu option click has any such issues

    I wonder if I need to edit registry setting

    QT is such a wonderful software, I wonder why that is happening.
    Kindly help


  • Lifetime Qt Champion

    @dashthird
    Ok that is super weird. I never saw it be stuck in this way before. Just Creator.
    For test, did you try run it as admin ?

    alt text



  • @mrjj
    I tried "Run as administrator"
    Even after that, the issue is still same :(

    Please see: After the fresh install, the hanging of QT screen is different in the sense as I now get "Not responding" when QT freezes.

    16e7ad63-3112-40d2-a3f6-eac02c8498bd-image.png


  • Lifetime Qt Champion

    Hi
    im out of ideas.
    Do you have any scanners installed?
    Its win 7 right so no windows defender.



  • @mrjj
    I have avg antivirus free edition
    OS is windows 7


  • Lifetime Qt Champion

    @dashthird
    Hi
    for test could you try to uninstall it ?



  • @mrjj
    OK, I would uninstall it now.
    Kindly suggest the next steps after that


  • Lifetime Qt Champion

    @dashthird
    reboot
    Then just try to run Creator.
    (i pray for a bit of luck)



  • To add to @mrjj, in case the uninstallation of AVG didn't help, there's one more thing you could try, start a CMD window, type set path= to clear the path and then in that same CMD try start Qt Creator manually, eg:

    set path=
    C:\qt\tools\qtcreator\bin\qtcreator.exe
    

    If you can Browse for project folder location now, then there's something spooky in your path settings. However, when starting Qt Creator this way, you will most likely not be able to compile from inside Qt Creator :-(



  • @mrjj
    Even after AVG uninstall + reboot, the issue is still there :(



  • @hskoglund
    Tried your method also, set the path & also ran the QTCreator from CMD.
    Still then, on "File->Open project/file", the issue is same :(

    I would record a small video of the same & post it here



  • Ok one more : try disconnect from internet, pull out the wire or disconnect the WiFi



  • @hskoglund Even after disconnecting from the internet, the issue is same

    @hskoglund @mrjj Please find the video link attached

    QTIssue.avi



  • Hi, saw the video, 2 things you can try:

    1. try reinstalling Qt 5.6.1 on C: (not E:)
    2. go to Control Panel and create a new user, log out and log in as that new user, then try Qt Creator


  • @hskoglund The issue is still the same!


  • Lifetime Qt Champion

    @dashthird
    so even with new user, and Qt install on C:
    it still does it ?
    (OMG)



  • Oh, forgot one thing you can test: open a CMD window and start Qt Creator with 2 switches, like this:

    C:\qt\Tools\QtCreator\bin\qtcreator.exe -noload all -load Core
    

    You will have a stripped down UI but Open File or Project is still present...



  • @mrjj

    I had tried 2 approaches:
    created a new user "test"

    1. in new user, simply tried opening QT Creator of E:(installed by old user) & then "File->Open project/file"
      Still the same issue

    2. in old user, deleted the QT from E:
      in new user, installed QT at C: & then "File->Open project/file"
      Still the same issue

    @hskoglund
    Would try your latest CMD method & would let you know the output



  • @hskoglund
    Yes, Yes, I am able to see the Open Project/file window when I open from CMD using:

    C:\Qt\Qt5.6.1\Tools\QtCreator\bin\qtcreator.exe -noload all -load Core

    Here's the screenshot:
    5d16ef46-bdda-49de-8c3b-7f44628077ea-image.png

    :)

    Where do you think is the cause?



  • So most likely some Qt Creator plugin is the culprit.
    To find which one(s), start Qt Creator (you can start it normally), open the Help\About Plugins dialog box.

    Try deselecting (making the plugin not Load) some of the plugins, try first with all the plugins listed under Utilities. Then exit Qt Creator, start it again and try Open File or Project and see if it hangs. If it still hangs, try deselecting more plugins. If it does not hang, then try selecting a few plugins to see which one is the bad boy :-)



  • @hskoglund
    Would this be a case where the user should set

    set QT_DEBUG_PLUGINS=1
    

    in CMD before running qtcreator.exe and see if it reveals any plugin problem or suspect?



  • @JonB Might be, but the hang does not occur when launching Qt Creator, but when selecting Open File or Project, and by that time most of the plugins are already loaded.



  • @hskoglund
    Yes, I have no idea, I was hoping with QT_DEBUG_PLUGINS they might speak up as they were called to do something and give a clue as to what was happening :)



  • @JonB QT_DEBUG_PLUGINS will cause qDebug() outputs from the likes of qpluginloader.cpp and qlibrary.cpp but a normal plugin I think is an ignoramus re. that env. variable.

    But having a dbgview running before trying that Open File or Project hanging stunt can be a good idea, since there might be a qWarning issued in there somewhere...



  • @hskoglund
    The culprit is the "Welcome" plugin (of "QT Creator" section)
    On disabling that, I am now able to do "File->Open file/project" :-)

    Now the starting QT UI seems a lot similar like the QT SDK 1.2.1 (maintained by Nokia), which I was using before upgradation to QT 5+ version.

    Thanks a lot!!!
    I can finally start coding in C++ now :)

    One last question: Is there any alternate way to enable the functionality of that "Welcome" plugin ?



  • Hmm don't know any alternate way, you'll have no "Welcome" icon on the left sidebar, but you can use the File menu to create new projects and load existing ones. And browse the Qt Examples manually using File Explorer.

    And F1 context help still works in the editor etc so you'll survive I think :-)

    Edit: just realized, you're not using a recent Qt Creator (version right now is 4.12.3)?
    Some years ago, the Welcome plugin in those old Qt Creator versions relied on OpenGL functionality, so it was a common cure to disable it like you did today (just google for "Qt Creator Welcome plugin problem")
    The Welcome plugin was rewritten to not rely on OpenGL, maybe 3 years ago? So you could try update your Qt Creator and re-enable the Welcome plugin...



  • @hskoglund
    Okay, would try that.

    I had actually downloaded a single all-in-one installation package qt-opensource-windows-x86-mingw492-5.6.1-1.exe

    I had not edited any QTCreator version in that. The QT Creator 4.0.1 is bundled with v 5.6.1, so may be the latest Creator v4.12.3 is bundled with v5.15. Would check that also

    Thanks a lot!
    Have marked your answer as the solution :)


  • Lifetime Qt Champion

    Hi
    Holy crap it was the welcome screen that did it ?
    That used to stop Creator from running at all if OpenGL support was to weak.
    I had never imagined it would affect the file open.
    As @hskoglund says, it used to be a common issue.


  • Qt Champions 2019

    @mrjj Looks like the Welcome plug-in becomes smarter :-D


  • Lifetime Qt Champion

    @jsulm
    Hehe yes, thats is clever. Start up and then make native dialog not work. True ninja :)


Log in to reply