Lars Gullik Bjønnes wrote:
// Close the socket and remove the address of the filesystem.
75: LyXServerSocket::~LyXServerSocket()
76: {
77: if (fd_ != -1) {
78: theApp->unregisterSocketCallback(fd_);
79: if (::close(fd_) != 0)
80: lyxerr << "lyx: Server socket " << fd_
81: << " IO error on closing: " <<
strerror(errno);
82: }
83: lyx::support::unlink(address_);
84: lyxerr[Debug::LYXSERVER] << "lyx: Server socket quitting" << endl;
85: }
It seems that theApp has already been destroyed or something.
Indeed, I forgot to transfer the destruction of lyx_server_ and
lyx_socket_ when I transferred them from Application. I am going to
commit this patch which should solve your crash.
Abdel.
Index: lyx_main.C
===================================================================
--- lyx_main.C (revision 15390)
+++ lyx_main.C (working copy)
@@ -384,6 +384,9 @@
lyx::from_utf8(package().temp_dir()));
Alert::warning(_("Unable to remove temporary directory"), msg);
}
+
+ pimpl_->lyx_server_.reset();
+ pimpl_->lyx_server_.reset();
}
@@ -855,8 +858,11 @@
// a crash
pimpl_->buffer_list_.emergencyWriteAll();
- if (lyx::use_gui)
+ if (lyx::use_gui) {
pimpl_->lyx_server_->emergencyCleanup();
+ pimpl_->lyx_server_.reset();
+ pimpl_->lyx_server_.reset();
+ }
}