|Summary:||editors/openoffice-devel: Does not end on Ctrl-Q or file menu if Quickstarter in systray is enabled|
|Product:||Ports & Packages||Reporter:||Matthias Apitz <guru>|
|Component:||Individual Port(s)||Assignee:||FreeBSD Office Team <office>|
|Severity:||Affects Only Me||CC:||guru, truckman|
Description Matthias Apitz 2016-02-18 10:11:15 UTC
Created attachment 167143 [details] patch-main_sal_osl_unx_pipe.c I have compiled the port editors/openoffice-devel (which brings openoffice-4.2.1712473) ... the socket.c change was already included in the source, but not the pipe.c change; I elaborated the attached two patch files for AOO and recompiled; but /usr/local/openoffice-4.2.1712473/openoffice4/program/soffice.bin hangs on Ctrl-Q in accept; a gdb bt of the hanging thread shows: (gdb) bt #0 0x00000008018a141a in _accept () from /lib/libc.so.7 #1 0x00000008015a6936 in __thr_accept (s=8, addr=0x0, addrlen=0x0) at /usr/local/r292778/src/lib/libthr/thread/thr_syscalls.c:106 #2 0x000000080085479e in osl_acceptPipe () from /usr/local/openoffice-4.2.1712473/openoffice4/program/libuno_sal.so.3 #3 0x000000080567f894 in vos::OPipe::accept () from /usr/local/openoffice-4.2.1712473/openoffice4/program/libvos3gcc3.so #4 0x0000000800c5e4cb in ?? () from /usr/local/openoffice-4.2.1712473/openoffice4/program/libsofficeapp.so #5 0x000000080567badf in vos::threadWorkerFunction_impl () from /usr/local/openoffice-4.2.1712473/openoffice4/program/libvos3gcc3.so #6 0x000000080084ecb5 in osl_setThreadTextEncoding () from /usr/local/openoffice-4.2.1712473/openoffice4/program/libuno_sal.so.3 #7 0x00000008015a4824 in thread_start (curthread=0x80cfee000) at /usr/local/r292778/src/lib/libthr/thread/thr_create.c:288 #8 0x0000000000000000 in ?? () i.e. the typical situation, as the pipe.c patch wasn't in effect; but it is; I think osl_closePipe() is not called for some reason... I went debugging through the frames (with printf) and can verify that the Ctrl-Q is still visible in work/aoo-4.2.0/main/vcl/source/window/winproc.cxx and we see on pressing 'Ctrl' the nEvent 0x0007 and on 'Q' the nEvent 0x005 (I grabbed the defines from work/aoo-4.2.0/main/vcl/inc/salwtype.hxx); I pressed only 'Ctrl' two times and on the second I pressed 'Q' while holding down 'Ctrl': returned from Application::Yield() pSVData->maAppData.mbAppQuit: 0 calling Application::Yield() for the 127 time ImplWindowFrameProc() nEvent: 0007 ImplWindowFrameProc() we have SALEVENT_KEYMODCHANGE and do ImplHandleSalKeyMod() returned from Application::Yield() pSVData->maAppData.mbAppQuit: 0 calling Application::Yield() for the 128 time ImplWindowFrameProc() nEvent: 0007 ImplWindowFrameProc() we have SALEVENT_KEYMODCHANGE and do ImplHandleSalKeyMod() returned from Application::Yield() pSVData->maAppData.mbAppQuit: 0 calling Application::Yield() for the 129 time returned from Application::Yield() pSVData->maAppData.mbAppQuit: 0 calling Application::Yield() for the 130 time ImplWindowFrameProc() nEvent: 0005 ImplWindowFrameProc() we have SALEVENT_KEYINPUT and do ImplHandleKey() returned from Application::Yield() pSVData->maAppData.mbAppQuit: 0 calling Application::Yield() for the 131 time ImplWindowFrameProc() nEvent: 0016
Comment 1 Matthias Apitz 2016-02-18 10:12:13 UTC
Created attachment 167144 [details] patch-main_sal_osl_unx_sockimpl.h
Comment 2 Don Lewis 2016-02-18 23:13:25 UTC
Have you disabled the Quickstarter? I see that behavior of the Quickstarter is enabled. If I start OpenOffice from the command line, the OpenOffice window disappears when I quit, but I don't get a command prompt because the process is still running as the Quickstarter, which I see as an icon in the toolbar. If I click on the icon and either exit or disable the Quickstarter, the process exits and I get the command prompt. If the Quickstarter is disabled, I get the command prompt back immediately when quitting OpenOffice. Quickstarter can be enabled or disabled by navigating to Tools->Options->OpenOffice->Memory->Enable systray Quickstarter. I think the LibreOffice problem was different because it is built by default with the QuickStarter disabled.
Comment 3 Matthias Apitz 2016-02-19 06:16:27 UTC
Wow! Yes, this solved the problem. Thank you. If you would know, how many hours I spent in debugging this, and I do not even use AOO, only LO. I only wanted to nail it down because I thought it was related to the problem I faced in LO... Is this "feature" (I would call it rather a bug) somewhere documented as "If you enable systray, a started AOO on command line will never end"? Never the less, the attached patches should be added to the port editors/openoffice-devel (...) as long as the pipe.c bug is not fixed upstream.
Comment 4 Don Lewis 2016-03-20 18:06:27 UTC
I'm in the process of updating openoffice-devel to upstream r1735544 which contains this change, but it still does not exit if I enable Quickstarter. It appears that the Quickstarter does no daemonize itself. If I start OpenOffice, enable Quickstarter, quit, kill the process, log out, and log in, then things work properly. Enabling Quickstarter also flags OpenOffice as a startup application, so a copy is started in the background and I see the toolbar icon pop up when I log in. If I then start OpenOffice from the command line I get my command prompt back right away. That is the way that OpenOffice has behaved when opening a second document from the command line.
Comment 5 commit-hook 2016-03-20 21:43:07 UTC
A commit references this bug: Author: truckman Date: Sun Mar 20 21:42:08 UTC 2016 New revision: 411522 URL: https://svnweb.freebsd.org/changeset/ports/411522 Log: Delay running gnome-post-install until the plist has been generated by post-install so that the icons are detected and gtk-update-icon-cache gets run when the package is installed.  Import upstream trunk commit r1728872 to add the CLOSESOCKET_DOESNT_WAKE_UP_ACCEPT up accept fix to the pipe code.  PR: 208026  PR: 207301  Changes: head/editors/openoffice-4/Makefile head/editors/openoffice-4/files/patch-r1728872
Comment 6 commit-hook 2016-03-21 05:53:52 UTC
A commit references this bug: Author: truckman Date: Mon Mar 21 05:53:01 UTC 2016 New revision: 411540 URL: https://svnweb.freebsd.org/changeset/ports/411540 Log: Upgrade to upstream svn revision r1735889. This contains the CLOSESOCKET_DOESNT_WAKE_UP_ACCEPT pipe fix . It also contains a slightly different fix for building with boost 1.60, so delete patch-sdext_source_pdfimport_makefile.mk, which is no longer needed. Delay running gnome-post-install until the plist has been generated by post-install so that the icons are detected and gtk-update-icon-cache gets run when the package is installed.  Add missing USES=shared-mime-info. PR: 207301  PR: 208026  Changes: head/editors/openoffice-devel/Makefile head/editors/openoffice-devel/distinfo head/editors/openoffice-devel/files/patch-sdext_source_pdfimport_makefile.mk