当我的应用程序停止时,我面临崩溃。Gdb显示了以下堆栈(app是用-g -O0构建的):
(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x00007f254ea99700 in ?? ()
#2 0x0000000000000000 in ?? ()
简短的调查表明,崩溃发生在停止线程时,线程的启动方式与应用程序中其他许多线程的启动方式相同:
// mListener is std::thread and member of class UA
std::thread thr(&UA::run, this);
mListener = std