On 02/29/2012 03:29 PM, Michael Meeks wrote:
So - it took me a while to get around to this, but luckily while I was
chasing:
https://bugs.freedesktop.org/show_bug.cgi?id=46340
I hit this. Interestingly on Linux we do get some (not particularly
helpful) console debug:
$ ./soffice /tmp/foo.odp
terminate called after throwing an instance of
'com::sun::star::lang::DisposedException'
$
And of course, no auto-save, no contents of the exception etc. etc. And
I imagine the same is true for all un-caught exceptions, including
(incidentally ::std::bad_alloc() ;-). I imagine that at the moment
actively discards document data left& right in the vast majority of
cases where it is not caught.
Strange. At least for my (--enable-dbgutil) master build, following the
instructions of fdo#46340 *does* lead to a restart with crash dialog and
document recovery.
Also, experimenting with the attached crash.patch (see also
<https://issues.apache.org/ooo/show_bug.cgi?id=108411> "let SID_CRASH
really crash") does lead to the crash dialog in all four variations of
the code (std::abort() vs. throw std::bad_alloc() and directly from main
thread vs. pthread_create).
Stephan
diff --git a/framework/uiconfig/startmodule/menubar/menubar.xml b/framework/uiconfig/startmodule/menubar/menubar.xml
index 055810b..8bebe1c 100755
--- a/framework/uiconfig/startmodule/menubar/menubar.xml
+++ b/framework/uiconfig/startmodule/menubar/menubar.xml
@@ -2,6 +2,7 @@
<menu:menubar xmlns:menu="http://openoffice.org/2001/menu" menu:id="menubar">
<menu:menu menu:id=".uno:PickList">
<menu:menupopup>
+ <menu:menuitem menu:id=".uno:Crash"/>
<menu:menuitem menu:id=".uno:AddDirect"/>
<menu:menuitem menu:id=".uno:Open"/>
<menu:menuitem menu:id=".uno:RecentFileList"/>
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 8070b51..e870eef 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -180,6 +180,7 @@ static void showDocument( const char* pBaseName )
}
}
+/*SB*/extern"C"{static void*SBFail(void*){/*SB std::abort(); */throw std::bad_alloc();}}
void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
{
bool bDone = false;
@@ -543,8 +544,9 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
case SID_CRASH :
{
// Provoke a crash:
- char * crash = 0;
- *crash = 0;
+//SB char * crash = 0;
+//SB *crash = 0;
+/*SB SBFail(0); */pthread_t SBt;pthread_create(&SBt,0,SBFail,0);
break;
}
diff --git a/solenv/gbuild/platform/linux.mk b/solenv/gbuild/platform/linux.mk
index 71508f2..e274830 100644
--- a/solenv/gbuild/platform/linux.mk
+++ b/solenv/gbuild/platform/linux.mk
@@ -27,7 +27,11 @@
gb_LinkTarget_LDFLAGS += \
-Wl,-z,defs \
+ -pthread
include $(GBUILDDIR)/platform/unxgcc.mk
+gb_LinkTarget_CFLAGS += -pthread
+gb_LinkTarget_CXXFLAGS += -pthread
+
# vim: set noet sw=4 ts=4:
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice