this problem seems to be x64 specific, cause "DocumentLoader.cxx" compiled with LO 5.4.6 x86 SDK will work with a listening LO 5.4.6 x86. steps to reproduce: - compile "SDK Example DocumentLoader.cxx" https://api.libreoffice.org/examples/cpp/DocumentLoader/ i used LO x64 SDK and VS 2015 (c/c++ options: /D "WIN32" /D "WNT" /D "CPPU_ENV=mscx"), link with: /MACHINE:X64 - start LO x64 in listening mode, e.g. "C:\Program Files\LibreOffice\program\soffice.exe" --accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager - start "DocumentLoader.exe" - it will connect but crash at: Reference < XDesktop2 > xComponentLoader = Desktop::create(xComponentContext); Ausnahme ausgelöst bei 0x00007FFFED91EA70 (mscx_uno.dll) in DocumentLoader.exe: 0xC0000005: Zugriffsverletzung beim Lesen an Position 0x0000000000000008. // Reference.hxx inline XInterface * BaseReference::iquery( XInterface * pInterface, const Type & rType ) { if (pInterface) { Any aRet( pInterface->queryInterface( rType ) ); // Exception if (typelib_TypeClass_INTERFACE == aRet.pType->eTypeClass) { XInterface * pRet = static_cast< XInterface * >( aRet.pReserved ); aRet.pReserved = NULL; return pRet; } } return NULL; } btw: i have another example, that will connect, load a document but crash with same exception as soon as i try to get XModel from xComponent = xComponentLoader->loadComponentFromURL(sAbsoluteDocUrl, OUString(RTL_CONSTASCII_USTRINGPARAM("_blank")), 0, props); if (xComponent.is()) { // Exception Reference < com::sun::star::frame::XModel > xModel(xComponent, UNO_QUERY); }
Does it also crash with latest master? https://dev-builds.libreoffice.org/daily/master/Win-x86_64@42/current/?C=M&O=D
i just checked with LO 5.4.7.2 x64 and it does not crash any more. so it seems to be fixed.