QtCreator crashed and now will not start due to segfault



  • Hello everyone, I'm having a bit of a struggle liking Qt-Creator ever since it crashed while I was working on it. I've re-installed Qt several times, but nothing is changing. Are there some hidden config files I should be removing? Does anyone else have this problem?


  • Qt Champions 2017

    Hi and welcome to the forums
    What version of Creator and what Os ?

    I have not have it crash for a long time (years)
    so most likely something else wrong.

    What are you doing when it crashes ?

    Also could you try upgrading your gfx driver ?



  • Qt-Creator 4.7.0 on Windows 10
    I think I overloaded it clicking on settings(not exactly sure though)
    I don't think the gfx driver's an issue because it was running fine yesterday, and I haven't had anything change on my machine.


  • Qt Champions 2017

    @TMcSquared

    Ok, if it was working yesterday. then cant be the gfx is no windows update
    or anything.

    Can you still reproduce it ?



  • Yes, Qt-Creator just won't open at all, even after I re-install the entire thing.


  • Qt Champions 2017

    @TMcSquared

    Ok, that is odd.

    there is
    C:\Users\username\AppData\Local\QtProject
    C:\Users\username\AppData\Roaming\QtProject
    which can be left over even if reinstall.

    It should be pretty safe to delete, but Creator will forget anything then.



  • I've deleted those already between installs


  • Qt Champions 2017

    @TMcSquared
    and it still crashes ? wow. thats new.
    Do you have sessions enabled ?
    also , have you tried starting it from a shell (cmd)
    to see if anything is written ?

    also when starting in cmd.
    try adding
    -noload Welcome



  • I get a segmentation fault when I run it from the cmdline both without and with arguments.



  • @TMcSquared
    There's, oohh, a 1% chance that if you try running Qt Creator from within a debugger like Visual Studio (if you have that...), when it faults you'll get enough information from the stack trace to hazard a guess as to where it's going wrong...



  • I just debugged it and got this: Exception thrown at 0x670E5DA7 (Qt5Core.dll) in qtcreator.exe: 0xC0000005: Access violation reading location 0x7E5B8721.


  • Qt Champions 2017

    @TMcSquared

    Is it possible that the wrong Qt DLLs are loaded? Have you changed the PATH environment variable, for example?



  • Hmm I'll try adding it to the PATH xD

    EDIT: that didn't work


  • Qt Champions 2017

    @TMcSquared

    No, that's not what I meant! I meant, have you done before? Or have you installed some program that did?



  • Take a look at qt.conf in the creator/bin directory. If it's corrupted then plugins wont load.



  • It's not corrupted because it's a clean install



  • The try wiping out the creator files under AppData\Roaming\Qtproject



  • already did that.


  • Qt Champions 2017

    @TMcSquared
    Best guess is that it gets wrong QtDLLs maybe via
    path.



  • My PATH variable has zero Qt paths in it. even after a clean install.


  • Qt Champions 2017

    @TMcSquared
    I have no idea then.
    last test
    can you start with
    qtcreator -noload Welcome -noload QmlDesigner -noload QmlProfiler
    from shell and see if still crash ?



  • :O It opened with qtcreator -noload Welcome -noload QmlDesigner -noload QmlProfiler


  • Lifetime Qt Champion

    Hi,

    Then it sounds like a graphic driver issue then. Are you sure there wasn't any modification in that regard on your machine ?



  • @TMcSquared
    You could check whether Windows Update snuck in and did anything since it last worked... :)



  • That's completely possible, thanks for your guy's help!
    @SGaist I have no idea, it quit working while I was logged in.



  • Hi all. Sorry to revive this topic but this problem has occurred to me as well but on an application I wrote for a client. The application was running fine. Then it crashed (just like @TMcSquared ) and hasn't opened since.
    My access violation is in the QtWidgets.dll module.

    Any clues? (i don't have the welcome/QmlDesigner/etc modules to disable on load as does qtcreatorI)


  • Qt Champions 2017

    @nwoki
    Hi
    Do you use QML?
    if yes, could be a driver issue.

    Do you have data files?
    if yes, it could be damaged data files crashing app on load.

    It could be client installed other app using Qt dlls and now your app finds the wrong version of Qt dll.

    Buts its nearly impossible to guess on without far more concrete information :)



  • @mrjj said in QtCreator crashed and now will not start due to segfault:

    @nwoki
    Hi
    Do you use QML?
    if yes, could be a driver issue.

    This is reproducable only on the client pc. Any way I can debug this?

    Do you have data files?
    if yes, it could be damaged data files crashing app on load.

    Cleaned and still no dice

    It could be client installed other app using Qt dlls and now your app finds the wrong version of Qt dll.

    No other Qt applications are installed

    Buts its nearly impossible to guess on without far more concrete information :)

    Any idea on how I can help gather more info for furthur debugging?


  • Qt Champions 2017

    Hi

    This is reproducible only on the client pc. Any way I can debug this?
    Not really. you can ask him to update drivers and also
    collect information about opengl version supported.
    I take it, the project does use QML?

    Any idea on how I can help gather more info for furthur debugging?

    Well, i would add some logging to the app.
    So you can see if dies before main.
    That will give a hint if its related to actual user code or a DLL issue.



  • @mrjj doesn't even start, so adding any logging is futile. Double click on app -> immediate crash. I can see the crash errors in the windows EventViewer


  • Qt Champions 2017

    @nwoki
    Hi
    and there is no code in main.cpp that could crash it ?
    that is 100% for sure ?

    Then it really sounds like DLL issue.

    Do you know what happens to client pc between app working and crashing ?
    Windows update or anything like that ?



  • @mrjj said in QtCreator crashed and now will not start due to segfault:

    @nwoki
    Hi
    and there is no code in main.cpp that could crash it ?
    that is 100% for sure ?

    This is the main.cpp

    int main(int argc, char *argv[])
    {
        QLocale::setDefault(QLocale::c());
    
        // Test fix
    #ifdef Q_OS_WIN
    //    QApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
    //    QApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
    //    QApplication::setAttribute(Qt::AA_UseOpenGLES);
    #endif
        // ----------
    
        QApplication a(argc, argv);
    
        QApplication::setOrganizationName("Organization");
        QApplication::setOrganizationDomain("organization.com/");
        QApplication::setApplicationName("MyAppName");
    
        // Setup QML
        qmlRegisterType<CommunicationCenter>("com.organization.myappname", 1, 0, "CommunicationCenter");
    
        PasswordRequestDialog pwdReqDialog;
        MainWindow w(&a);
    
        // is a password set?
        if (PasswordManager::isPasswordSet()) {
            pwdReqDialog.show();
    
            QObject::connect(&pwdReqDialog, &PasswordRequestDialog::passwordAccepted, [&w] () {
                w.show();
            });
        } else {
            w.show();
        }
    
        // don't need to do anything on the "rejected" signal. We just exit the application
    
        return a.exec();
    

    Then it really sounds like DLL issue.

    Do you know what happens to client pc between app working and crashing ?
    Windows update or anything like that ?

    Don't know. The client said "I didn't do anything. It just stopped working..". What dlls are problematic? I find it strange that the app is working one day and just stops the next.


  • Qt Champions 2017

    @nwoki
    well, i would first check if his openGL is (still) working.
    Normally crash like this can happen if any other Qt dll are present in the system path
    and it loads that instead of the one
    in app folder.
    It can also be unexpected version of mingw/ visual studio runtime or
    any DLL that has unexpected version.

    If possible, i would send him a test exe that is just an empty QT GUI app.
    If that doesn't crashes, it means its not one of the Qt dlls.

    And yes, i agree taht normally apps just dont stop, so something has happens to his windows.



  • @mrjj said in QtCreator crashed and now will not start due to segfault:

    @nwoki
    well, i would first check if his openGL is (still) working.
    Normally crash like this can happen if any other Qt dll are present in the system path
    and it loads that instead of the one
    in app folder.
    It can also be unexpected version of mingw/ visual studio runtime or
    any DLL that has unexpected version.

    If possible, i would send him a test exe that is just an empty QT GUI app.
    If that doesn't crashes, it means its not one of the Qt dlls.

    And yes, i agree taht normally apps just dont stop, so something has happens to his windows.

    Sorry about the delay, had some problems with the visual studio compiler and libs. I created a test app (simple empty gui as suggested) and launched it from the same folder of the application that won't run. It works. So now what does this mean?


  • Qt Champions 2017

    @nwoki
    Hi
    It means even it reports thats its QtWidgets that crashes, its likely not that DLL
    if a plain empty GUI project works. ( for exact same folder , same pc)
    I would next add some openGL to the test project see if it still runs.
    As it seems might be direclt related to Qt ( like wrong Qt dll loaded)
    so it could be the openGL for clients gfx card.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.