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.
  • stackprogramerS Offline
    stackprogramerS Offline
    stackprogramer
    wrote on 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
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on 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.

      stackprogramerS 1 Reply Last reply
      1
      • mrjjM mrjj

        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.

        stackprogramerS Offline
        stackprogramerS Offline
        stackprogramer
        wrote on last edited by stackprogramer
        #3

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

        mrjjM 1 Reply Last reply
        0
        • stackprogramerS stackprogramer

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

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on 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.

          stackprogramerS 1 Reply Last reply
          1
          • mrjjM mrjj

            @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.

            stackprogramerS Offline
            stackprogramerS Offline
            stackprogramer
            wrote on 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
            • stackprogramerS stackprogramer

              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 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.

              stackprogramerS 1 Reply Last reply
              1
              • K KeithS

                @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.

                stackprogramerS Offline
                stackprogramerS Offline
                stackprogramer
                wrote on 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

                • Login

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