Bug 117438 - LO x64 - Remote Connection crashes with Exception in "mscx_uno.dll"
Summary: LO x64 - Remote Connection crashes with Exception in "mscx_uno.dll"
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: framework (show other bugs)
Version:
(earliest affected)
5.4.6.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-05 08:45 UTC by Oliver Brinzing
Modified: 2018-06-08 15:06 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Brinzing 2018-05-05 08:45:24 UTC
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);
}
Comment 1 Buovjaga 2018-06-07 18:21:15 UTC
Does it also crash with latest master? https://dev-builds.libreoffice.org/daily/master/Win-x86_64@42/current/?C=M&O=D
Comment 2 Oliver Brinzing 2018-06-08 15:06:06 UTC
i just checked with LO 5.4.7.2 x64 and it does not crash any more.
so it seems to be fixed.