Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. [Solved] The program has unexpectedly finished
Forum Updated to NodeBB v4.3 + New Features

[Solved] The program has unexpectedly finished

Scheduled Pinned Locked Moved Qt Creator and other tools
12 Posts 3 Posters 67.7k 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.
  • I Offline
    I Offline
    isaacEnrique
    wrote on 3 Aug 2012, 14:32 last edited by
    #1

    Greetings to all

    I am newcomer to this forum and I'm starting to learn Qt. I'm using the book "C + + GUI Programming with Qt 4 'as a text guide ... excellent book.

    I am testing a sample application that appears in the book (The spreadsheet described that shows up between chapters 3 and 4). I'm using QtCreator and although there is no error in the code (the application is built perfectly), when starting the execution, nothing happens, then the IDE puts the following message:

    The program has unexpectedly finished.
    C:\Users\PROYECTO\Desktop\mainwindow\debug\mainwindow.exe exited with code -1073741819

    In what is the error code -1073741819?...Is QtCreator error, an error of the operating system or application code?. I searched the internet and I could not find any description.

    If anyone knows of any possible reason or explanation of what might be happening would greatly appreciate it.

    Isaac Pérez
    Programming is understanding.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on 3 Aug 2012, 14:54 last edited by
      #2

      That is no error code from Qt creator. It is actually the return code from the application you have built.
      The error code can be found for quite a number of different threads by google. See for instance "this":http://www.qtcentre.org/threads/45777-exited-with-code-1073741819
      Without knowing the example it will be hard to help you. However, apparently, you might have a pointer problem (accessing non-allocated memory). Probably the best is to step with the debugger through the application and find the spot where the problem occurs.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • F Offline
        F Offline
        franku
        wrote on 3 Aug 2012, 15:23 last edited by
        #3

        In most cases I remember this as a problem with the application not finding a dll that has bin linked into. Have a look at the libs, this will probably solve the problem.

        This, Jen, is the internet.

        1 Reply Last reply
        0
        • I Offline
          I Offline
          isaacEnrique
          wrote on 3 Aug 2012, 16:02 last edited by
          #4

          Excuse my ignorance, but not sure I understand ... You mean the libraries included in the source files or libraries of Qt?

          If it is the latter case it is not exactly what I look for and / or do ... I have no idea

          Isaac Pérez
          Programming is understanding.

          1 Reply Last reply
          0
          • K Offline
            K Offline
            koahnig
            wrote on 3 Aug 2012, 16:09 last edited by
            #5

            Do you get an additional error message?

            Vote the answer(s) that helped you to solve your issue(s)

            1 Reply Last reply
            0
            • I Offline
              I Offline
              isaacEnrique
              wrote on 3 Aug 2012, 16:26 last edited by
              #6

              This is exactly what appears on the bottom panel of QtCreator when I run the program:

              Starting C:\Users\PROYECTO\Desktop\mainwindow\debug\mainwindow.exe...

              The program has unexpectedly finished.

              C:\Users\PROYECTO\Desktop\mainwindow\debug\mainwindow.exe exited with code -1073741819

              Isaac Pérez
              Programming is understanding.

              1 Reply Last reply
              0
              • K Offline
                K Offline
                koahnig
                wrote on 3 Aug 2012, 16:36 last edited by
                #7

                franku suggested that there might be a problem with the libraries and dlls. I am not sure if this might be the case. I am rarely using Qt creator on windows.

                Did you compile another and run another small examples successfully before?

                If yes, it should be most likely in the current application. Probably best when you are posting the code.

                If no, try to create a small example first and see, if it is the environment.

                Vote the answer(s) that helped you to solve your issue(s)

                1 Reply Last reply
                0
                • I Offline
                  I Offline
                  isaacEnrique
                  wrote on 3 Aug 2012, 16:51 last edited by
                  #8

                  I've run several sample applications before it. Run the examples that appear within the chapters 1 and 2 of the book (C + + GUI Programming with Qt 4) and several modifications that I did the same ... always work correctly either from QtCreator or building and running directly from the console using qmake

                  Isaac Pérez
                  Programming is understanding.

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    koahnig
                    wrote on 3 Aug 2012, 17:14 last edited by
                    #9

                    You need to compile your application in debug mode and run in debug mode. It will allow you to step through the code see where it is crashing.

                    Did you debug already? If not, try to get familiar with the steps and what you can do. Some information for "debugging with tthe creator.":http://qt-project.org/wiki/QtCreatorWhitepaper#da7d763aac39b294c7453c77c10d8239

                    Vote the answer(s) that helped you to solve your issue(s)

                    1 Reply Last reply
                    0
                    • I Offline
                      I Offline
                      isaacEnrique
                      wrote on 3 Aug 2012, 17:32 last edited by
                      #10

                      thanks ... I will try that

                      Isaac Pérez
                      Programming is understanding.

                      1 Reply Last reply
                      0
                      • I Offline
                        I Offline
                        isaacEnrique
                        wrote on 27 Aug 2012, 23:06 last edited by
                        #11

                        I recently resumed working with Qt and started to get familiar with using the debugger. I managed to find the problem in my application, certainly a problem of pointers (a variable of type 'QAction *' uninitialized). I corrected it and now the application works perfectly.

                        Thank you all for your comments, support and suggestions.

                        Isaac Pérez
                        Programming is understanding.

                        1 Reply Last reply
                        0
                        • I Offline
                          I Offline
                          isaacEnrique
                          wrote on 27 Aug 2012, 23:13 last edited by
                          #12

                          Please could someone explain how to label this thread / discussion as 'solved'.

                          Thanks again

                          Isaac Pérez
                          Programming is understanding.

                          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