Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Solved The program has unexpectedly finished?

    General and Desktop
    unexpectedly fi
    3
    7
    3226
    Loading More Posts
    • 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.
    • stackprogramer
      stackprogramer last edited by 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 1 Reply Last reply Reply Quote 0
      • mrjj
        mrjj Lifetime Qt Champion last edited by

        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.

        stackprogramer 1 Reply Last reply Reply Quote 1
        • stackprogramer
          stackprogramer @mrjj last edited by stackprogramer

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

          mrjj 1 Reply Last reply Reply Quote 0
          • mrjj
            mrjj Lifetime Qt Champion @stackprogramer last edited by

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

            stackprogramer 1 Reply Last reply Reply Quote 1
            • stackprogramer
              stackprogramer @mrjj last edited by stackprogramer

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

              1 Reply Last reply Reply Quote 2
              • K
                KeithS @stackprogramer last edited by

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

                stackprogramer 1 Reply Last reply Reply Quote 1
                • stackprogramer
                  stackprogramer @KeithS last edited by stackprogramer

                  @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 Reply Quote 0
                  • First post
                    Last post