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. Catch seg fault from DLL linked to EXE
Forum Updated to NodeBB v4.3 + New Features

Catch seg fault from DLL linked to EXE

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 197 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.
  • A Offline
    A Offline
    Ali.Goodarz
    wrote on last edited by
    #1

    Hello everybody,
    I have my main Qt application and we have another application that is built and linked to the main application as a dynamic library.

    This other application sometimes produces seg faults and I would like to be able to catch these (at least to stop the main program from crashing), since this causes the main program to lose data.

    I know the best course of action is solving the bugs in the dll, and we do that, but I also don't want any unsolved seg faults to crash our main application.

    What would be the best way of doing this?

    C 1 Reply Last reply
    0
    • A Ali.Goodarz

      Hello everybody,
      I have my main Qt application and we have another application that is built and linked to the main application as a dynamic library.

      This other application sometimes produces seg faults and I would like to be able to catch these (at least to stop the main program from crashing), since this causes the main program to lose data.

      I know the best course of action is solving the bugs in the dll, and we do that, but I also don't want any unsolved seg faults to crash our main application.

      What would be the best way of doing this?

      C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      @Ali-Goodarz said in Catch seg fault from DLL linked to EXE:

      I know the best course of action is solving the bugs in the dll, and we do that, but I also don't want any unsolved seg faults to crash our main application.

      I do not think you can safely do this. Whatever failed in the DLL has left your program in an unknown state. It is hard to recover and keep running if you do not know where you are starting from. I suspect that the best you could hope for is that data already written to disk is flushed before you let the main program die.

      What would be the best way of doing this?

      Structured Exception Handling might provide some options, including SetUnhandledExceptionFilter().

      1 Reply Last reply
      4
      • A Ali.Goodarz has marked this topic as solved on

      • Login

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