sudo 4.6.4 Aborted
dirk at hohndel.org
Mon May 15 06:38:51 PDT 2017
On Sun, May 14, 2017 at 10:01:34PM -0700, Thiago Macieira wrote:
> On domingo, 14 de maio de 2017 21:52:56 PDT Dirk Hohndel wrote:
> > Ah, apparently this is a Qt bug that was declared not a bug at some point
> > (you can find quite a few threads about this), and the way to work around
> > it is to implement your own Logger class and exit() instead of abort()
> > when you get a "Could not connect to display error".
> > Not one of the more useful aspects of Qt, I'd like to add...
> Unfortunately, exit() is often harmful in C++ programs, since the global &
> atexit destructors are run, but the stack hasn't been unwound so objects in
> the main() function continue to exist. This breaks a number of assumptions
> about the order in which things are destroyed (namely, that it is the opposite
> in which they were constructed).
> Using _exit() might help, but it may bring its own set of problems. At least
> it's closer to the qFatal call that is there now.
I understand that. For us as a user of the library, though, having the app
crash on something as trivial as not being able to connect to the display,
that does seem a bit crude.
More information about the subsurface