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. Silent crash
QtWS25 Last Chance

Silent crash

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 5 Posters 1.5k 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.
  • SlaneS Offline
    SlaneS Offline
    Slane
    wrote on last edited by
    #1

    Hello

    I would like to know if it's possible, how to make application crash silently ?
    Without runtime lib and app.exe has stopped working

    raven-worxR jsulmJ 2 Replies Last reply
    0
    • SlaneS Slane

      Hello

      I would like to know if it's possible, how to make application crash silently ?
      Without runtime lib and app.exe has stopped working

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @Slane said in Silent crash:

      I would like to know if it's possible, how to make application crash silently ?

      you mean close it? :)
      why does it have to be a crash?!?!?!

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      SlaneS 1 Reply Last reply
      1
      • SlaneS Slane

        Hello

        I would like to know if it's possible, how to make application crash silently ?
        Without runtime lib and app.exe has stopped working

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @Slane Do you mean you want to avoid that Windows shows the user a dialog telling him/her that the app crashed? If so: what's the point? The app will disappear anyway. Or do you want to reastart it immediately?

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • raven-worxR raven-worx

          @Slane said in Silent crash:

          I would like to know if it's possible, how to make application crash silently ?

          you mean close it? :)
          why does it have to be a crash?!?!?!

          SlaneS Offline
          SlaneS Offline
          Slane
          wrote on last edited by Slane
          #4

          @raven-worx Because some user parameter may crash the application. For somme reason i never test it. And the application is started many time by an other.

          so if the user make lot of errors windows spam windows error. I want avoid it by send only one error message by the master app

          @jsulm I juste want get the return code of the application
          3 for segmentation fault. For example

          And no error interface of window error interface of windows

          JonBJ raven-worxR 2 Replies Last reply
          0
          • SlaneS Slane

            @raven-worx Because some user parameter may crash the application. For somme reason i never test it. And the application is started many time by an other.

            so if the user make lot of errors windows spam windows error. I want avoid it by send only one error message by the master app

            @jsulm I juste want get the return code of the application
            3 for segmentation fault. For example

            And no error interface of window error interface of windows

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by
            #5

            @Slane
            I doubt that this is possible. If it is however, it'll be some Windows-only way, and you'll have to find out what that is outside of Qt.

            1 Reply Last reply
            0
            • J.HilkJ Offline
              J.HilkJ Offline
              J.Hilk
              Moderators
              wrote on last edited by J.Hilk
              #6

              Based on what @JonB said, a quick google search resulted in this:

              https://stackoverflow.com/questions/3561545/how-to-terminate-a-program-when-it-crashes-which-should-just-fail-a-unit-test/3637710#3637710


              Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


              Q: What's that?
              A: It's blue light.
              Q: What does it do?
              A: It turns blue.

              1 Reply Last reply
              2
              • SlaneS Slane

                @raven-worx Because some user parameter may crash the application. For somme reason i never test it. And the application is started many time by an other.

                so if the user make lot of errors windows spam windows error. I want avoid it by send only one error message by the master app

                @jsulm I juste want get the return code of the application
                3 for segmentation fault. For example

                And no error interface of window error interface of windows

                raven-worxR Offline
                raven-worxR Offline
                raven-worx
                Moderators
                wrote on last edited by
                #7

                @Slane said in Silent crash:

                Because some user parameter may crash the application.

                thats bad application design then IMHO.

                --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                If you have a question please use the forum so others can benefit from the solution in the future

                JonBJ 1 Reply Last reply
                3
                • raven-worxR raven-worx

                  @Slane said in Silent crash:

                  Because some user parameter may crash the application.

                  thats bad application design then IMHO.

                  JonBJ Offline
                  JonBJ Offline
                  JonB
                  wrote on last edited by
                  #8

                  @raven-worx
                  I think we all agree! But I think the OP is saying he has to work with that application as-is (e.g. it's third-party).

                  raven-worxR 1 Reply Last reply
                  0
                  • JonBJ JonB

                    @raven-worx
                    I think we all agree! But I think the OP is saying he has to work with that application as-is (e.g. it's third-party).

                    raven-worxR Offline
                    raven-worxR Offline
                    raven-worx
                    Moderators
                    wrote on last edited by
                    #9

                    @Slane
                    @JonB said in Silent crash:

                    I think we all agree! But I think the OP is saying he has to work with that application as-is (e.g. it's third-party).

                    If thats the case you can try something like Breakpad to catch an exception.

                    --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                    If you have a question please use the forum so others can benefit from the solution in the future

                    1 Reply Last reply
                    0
                    • SlaneS Offline
                      SlaneS Offline
                      Slane
                      wrote on last edited by Slane
                      #10

                      So. Thanks for all your help

                      for now i gonna use :

                      SetErrorMode(SEM_NOGPFAULTERRORBOX);
                      _set_error_mode (_OUT_TO_STDERR);
                      

                      For disabling all error dialogue if there is a crash

                      1 Reply Last reply
                      1

                      • Login

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