Qt Forum

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

    Solved Silent crash

    General and Desktop
    5
    10
    1045
    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.
    • Slane
      Slane last edited by

      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-worx jsulm 2 Replies Last reply Reply Quote 0
      • raven-worx
        raven-worx Moderators @Slane last edited by

        @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

        Slane 1 Reply Last reply Reply Quote 1
        • jsulm
          jsulm Lifetime Qt Champion @Slane last edited by

          @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 Reply Quote 0
          • Slane
            Slane @raven-worx last edited by 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

            JonB raven-worx 2 Replies Last reply Reply Quote 0
            • JonB
              JonB @Slane last edited by

              @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 Reply Quote 0
              • J.Hilk
                J.Hilk Moderators last edited by J.Hilk

                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

                Qt Needs YOUR vote: https://bugreports.qt.io/browse/QTQAINFRA-4121


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

                1 Reply Last reply Reply Quote 2
                • raven-worx
                  raven-worx Moderators @Slane last edited by

                  @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

                  JonB 1 Reply Last reply Reply Quote 3
                  • JonB
                    JonB @raven-worx last edited by

                    @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-worx 1 Reply Last reply Reply Quote 0
                    • raven-worx
                      raven-worx Moderators @JonB last edited by

                      @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 Reply Quote 0
                      • Slane
                        Slane last edited by Slane

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