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. The program has unexpectedly finished?
QtWS25 Last Chance

The program has unexpectedly finished?

Scheduled Pinned Locked Moved Solved General and Desktop
unexpectedly fi
7 Posts 3 Posters 4.0k Views
  • 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
    stackprogramer
    wrote on 23 Feb 2016, 17:08 last edited by stackprogramer
    #1

    hi,my program has not errors.when i run it it return :

    The program has unexpectedly finished.
    
    

    if it has error ,for me is easy for fixing it,
    my question is how can fix and repair my source in this conditions:
    it is not any clue for fixing it!?
    my source has more than 5000 line source:(
    thanks for reply

    K 1 Reply Last reply 24 Feb 2016, 16:21
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 23 Feb 2016, 17:58 last edited by
      #2

      simply start in debug mode and single step. line by line.
      If it crashes before main function.
      You have a global / static object that cause the crash.

      S 1 Reply Last reply 23 Feb 2016, 17:59
      1
      • M mrjj
        23 Feb 2016, 17:58

        simply start in debug mode and single step. line by line.
        If it crashes before main function.
        You have a global / static object that cause the crash.

        S Offline
        S Offline
        stackprogramer
        wrote on 23 Feb 2016, 17:59 last edited by stackprogramer
        #3

        @mrjj
        i will test it soon and sharing result till tommorow
        thanks for reply

        M 1 Reply Last reply 23 Feb 2016, 18:01
        0
        • S stackprogramer
          23 Feb 2016, 17:59

          @mrjj
          i will test it soon and sharing result till tommorow
          thanks for reply

          M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 23 Feb 2016, 18:01 last edited by
          #4

          @stackprogramer
          Well good luck .
          such "drop dead" errors can be hard to find.

          If u can single step for looong time and no crash, then u can also
          insert
          QDebug() << "MARK X";
          in good locations (replace X with numbers)
          To give hint how far it goes before dying.
          So faster locate the area of the crash.

          S 1 Reply Last reply 23 Feb 2016, 18:06
          1
          • M mrjj
            23 Feb 2016, 18:01

            @stackprogramer
            Well good luck .
            such "drop dead" errors can be hard to find.

            If u can single step for looong time and no crash, then u can also
            insert
            QDebug() << "MARK X";
            in good locations (replace X with numbers)
            To give hint how far it goes before dying.
            So faster locate the area of the crash.

            S Offline
            S Offline
            stackprogramer
            wrote on 23 Feb 2016, 18:06 last edited by stackprogramer
            #5

            @mrjj
            thanks for reply. i like challenges :)
            error in programming is fun when is solved.

            1 Reply Last reply
            2
            • S stackprogramer
              23 Feb 2016, 17:08

              hi,my program has not errors.when i run it it return :

              The program has unexpectedly finished.
              
              

              if it has error ,for me is easy for fixing it,
              my question is how can fix and repair my source in this conditions:
              it is not any clue for fixing it!?
              my source has more than 5000 line source:(
              thanks for reply

              K Offline
              K Offline
              KeithS
              wrote on 24 Feb 2016, 16:21 last edited by
              #6

              @stackprogramer

              What OS? What compiler? Does the error message appear on exiting the app or before it's finished?

              As mentioned running a debug version of your app under a debugger may help. Or if it's a memory corruption issue, valgrind can help.

              S 1 Reply Last reply 24 Feb 2016, 16:28
              1
              • K KeithS
                24 Feb 2016, 16:21

                @stackprogramer

                What OS? What compiler? Does the error message appear on exiting the app or before it's finished?

                As mentioned running a debug version of your app under a debugger may help. Or if it's a memory corruption issue, valgrind can help.

                S Offline
                S Offline
                stackprogramer
                wrote on 24 Feb 2016, 16:28 last edited by stackprogramer
                #7

                @KeithS thanks for your attention:).
                my os windows 7,compiler mingw. my app in middle after i clicked a pushbutton is crashed.
                i tested Qdebug top offer.now my problem was solved.

                1 Reply Last reply
                0

                6/7

                24 Feb 2016, 16:21

                • Login

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