It has always been made quite clear that calling cppu::getCaughtException will only work under tightly restricted circumstances (<http://udk.openoffice.org/source/browse/udk/cppuhelper/inc/cppuhelper/exc_hlp.hxx?rev=1.9&view=markup>). It appears that the combination of two recent changes (the switch to Microsoft .Net 2005/2008 compilers together with the Three-Layer Office) has killed this feature completely, however.

Debugging <http://www.openoffice.org/issues/show_bug.cgi?id=88671> (of which <http://www.openoffice.org/issues/show_bug.cgi?id=88460> is probably a duplicate) shows the following: On a Windows machine where the relevant compiler runtime libraries are not installed system wide (msvcr90.dll in the case of the .Net 2008 compiler, OOo code wntmsci12), msvcr90.dll is loaded multiple times into the process (it has to be present in both the URE\bin and Basis 3.0\program directories; otherwise soffice would not even start), and an exception thrown at desktop/source/deployment/registry/dp_registry.cxx:1.12 l. 486 causes a crash when it is caught one stack frame up at desktop/source/deployment/registry/package/dp_package.cxx:1.26 l. 1187 and cppu::getCaughtException is called. This appears to be due to the fact that cppuhelper3MSC.dll and/or msci_uno.dll (implementing cppu::getCaughtException) are located in the URE\bin layer and use the instance of msvcr90.dll loaded from there while deploymentmi.uno.dll (implementing the desktop/source/deployment code) is located in the Basis 3.0\program layer and uses the other (identical) instance of msvcr90.dll loaded from there.

I do not see any elegant solution for this problem. Potential but ugly solutions would include:

- Remove all calls of the---dangerous anyway---cppu::getCaughtException from the OOo code base (<http://lxr.go-oo.org/ident?i=getCaughtException> lists "245 references in 102 files").

- Make sure the relevant compiler runtime libraries will always be installed system wide when running OOo. (This had been discussed before, but dismissed.)

- Use only compilers for which runtime libraries need not be installed either syste wide or next to every DLL that uses them (e.g., older Microsoft compilers, or GCC).

- Turn the Three Layer Office back into a Two Layer Office, where the URE and Basis layers are united (and the above scenario would again only use one instance of msvcr90.dll loaded into the process, and everything would probably work fine; there is also an instance of msvcr90.dll in the Brand layer, but that should not interfere with any cppu::getCaughtException calls).

Have your pick, folks.  (Or, have a beer; its Friday after all...)

-Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to