Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Compiled and build with MinGW 20120426, Qt 4.8.2: QApplication crashes on Windows 7
Forum Updated to NodeBB v4.3 + New Features

Compiled and build with MinGW 20120426, Qt 4.8.2: QApplication crashes on Windows 7

Scheduled Pinned Locked Moved General and Desktop
10 Posts 6 Posters 6.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    System.dat-User.dat
    wrote on last edited by
    #1

    Hi to all,

    i have MinGW 20120426 and Qt 4.8.2.
    I managed to compile and build my project using this Qt and MinGW's gcc (4.7.1)

    After i collect all *.dll in same directory i try to start my executable and it crashes.

    A little of manual instrumentation of a source gives me place where it crashes: QApplication app( argc, argv );

    I ran under GDD. Here is the output.

    Program received signal SIGSEGV, Segmentation fault.
    0x6e1cc9a4 in ZN23QCoreApplicationPrivate27processCommandLineArgumentsEv ()
    from c:\Work\CUBE4\cube-4.1.1\vpath_nsis_install\bin\QtCore4.dll
    (gdb) backtrace
    #0 0x6e1cc9a4 in ZN23QCoreApplicationPrivate27processCommandLineArgumentsEv
    () from c:\Work\CUBE4\cube-4.1.1\vpath_nsis_install\bin\QtCore4.dll
    #1 0x6e1ccf44 in ZN16QCoreApplication4initEv ()
    from c:\Work\CUBE4\cube-4.1.1\vpath_nsis_install\bin\QtCore4.dll
    #2 0x6e1cd297 in ZN16QCoreApplicationC2ER23QCoreApplicationPrivate ()
    from c:\Work\CUBE4\cube-4.1.1\vpath_nsis_install\bin\QtCore4.dll
    #3 0x6771806f in ZN12QApplicationC1ERiPPci ()
    from c:\Work\CUBE4\cube-4.1.1\vpath_nsis_install\bin\QtGui4.dll
    #4 0x00535f9c in _fu966___ZSt4cout ()
    #5 0x0028ff30 in ?? ()
    #6 0x004010fd in __mingw_CRTStartup ()
    #7 0x00000000 in ?? ()

    My non GUI (hence non Qt ) programs run smoothless.
    I tried to run as an administrator: same result.

    Who knows solution? Why it crashes and what should i do? Under linux/mac project compiles, builds, and runs errorless.

    Thanx,
    System.dat-User.dat

    1 Reply Last reply
    0
    • H Offline
      H Offline
      Hostel
      wrote on last edited by
      #2

      Try check for missing dll by Dependency Walker.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        System.dat-User.dat
        wrote on last edited by
        #3

        Dependency Walker stated, that i need IEShims.dll -> copied from Interned Explorer Directory once, and from windows another time -> same result, it crashes.

        GDB reports same stack backtrace after crash. So, IEShims.dll doesn't matter.
        Besides of that -> all .dll are there.

        Dependency Walker reports as well, that "Module with different CPU were found" -> well, my non QT tools have same error (mixed CPU x64 and x86), but they run properly.


        Additionally: I check Event Reporter of Windows
        and have error code of the crash: 0xc00000005

        According to http://www.updatexp.com/0xC0000005.html, it is some Memory Access violation error. But why in QApplication and why seems that only me who has it, no another similar bug reports found...
        Some drivers?


        Additionlly: recompiled with --enable-auto-import according to: http://www.qtcentre.org/threads/44540-qt-4.7.4-linking-error-missing-enable-auto-import
        -> same result

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tony
          wrote on last edited by
          #4

          I've the same problem.

          Installed Qt 4.8.3, with MinGW GCC 4.6.2 everything is fine.

          If I upgrade GCC to 4.7.2, a simple program like this one

          @
          #include <QApplication>

          int main(int argc, char **argv)
          {
          QApplication app(argc,argv);

          return app.exec();
          }
          @

          causes a crash here:
          @
          QCoreApplicationPrivate::processCommandLineArguments (this=0x3c4278) at kernel/qcoreapplication.cpp:230

          if (argv[i] && *argv[i] != '-') {
          @

          The problem is argc. I don't know why, but it has a random value (my last run reports 3949040), and of course the loop containing the above code accesses out of memory boundaries.

          Is there anything in GCC 4.7.2 that can spoil the build? I know about issues regarding ABI GCC 4.7.0 and 4.7.1, but 4.7.2 should have been C++98 compatible.

          T.

          1 Reply Last reply
          0
          • JKSHJ Offline
            JKSHJ Offline
            JKSH
            Moderators
            wrote on last edited by
            #5

            Code produced by GCC 4.7 is binary-incompatible with code produced by GCC 4.4.

            The MinGW version of Qt 4.8.3 was built with GCC 4.4, so you can't link your programs to it if you build with GCC 4.7

            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

            1 Reply Last reply
            0
            • C Offline
              C Offline
              curVV
              wrote on last edited by
              #6

              Thank you. All is well after downgrading to gcc-4.4.

              (4.4 not even available anymore via mingw-get install "package-name=version-spec") :/

              1 Reply Last reply
              0
              • T Offline
                T Offline
                tony
                wrote on last edited by
                #7

                There's no need to move so back in version ... 4.6.2 is enough. And you can use also many (not all) C++11 features! :)

                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  curVV
                  wrote on last edited by
                  #8

                  oh, thanks. upgrading again... :D

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    tony
                    wrote on last edited by
                    #9

                    Anyway, if you need GCC 4.7.x series, you can also download Qt sources and build them. Also in this case everything is working fine.

                    1 Reply Last reply
                    0
                    • Chris KawaC Offline
                      Chris KawaC Offline
                      Chris Kawa
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      Problem solved but just to clarify the "Module with different CPU were found” output the DW gives - it's a long story but the short version is that this happens when you check your win32 app with x64 version of DW or x64 app with win32 DW or have e.g win32 Qt libs in PATH and use x64 DW.
                      Just keep them all in line to avoid it.
                      The IEShims.dll is a bogus warning, no neeed to include it with your app.

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved