Bug 46682 - loading component library failed: binaryurp.uno.dll
Summary: loading component library failed: binaryurp.uno.dll
Status: RESOLVED DUPLICATE of bug 46832
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
3.5.1 RC1
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-27 07:38 UTC by Lafriks
Modified: 2012-03-08 05:58 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
C# test application profiling with depends.exe (33.55 KB, text/plain)
2012-02-28 00:37 UTC, Lafriks
Details
soffice.bin profiling info (28.02 KB, text/plain)
2012-02-28 00:37 UTC, Lafriks
Details
soffice.exe profiling info (6.61 KB, text/plain)
2012-02-28 00:38 UTC, Lafriks
Details
Screenshot showing that binaryurp.uno.dll (3.4.502.500) has an embedded manifest (49.25 KB, image/png)
2012-03-08 03:33 UTC, pckiller2002
Details
Screenshot showing that binaryurp.uno.dll (3.5.0.101) apparently has no embedded manifest (45.56 KB, image/png)
2012-03-08 03:36 UTC, pckiller2002
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lafriks 2012-02-27 07:38:16 UTC
When calling LibreOffice 3.5 from C# application using URE. There is exception thrown that with code that was working just fine with Libreoffice 3.4.4.

Exception stack:

{unoidl.com.sun.star.loader.CannotActivateFactoryException: loading component library failed: file:///C:/Program%20Files%20(x86)/LibreOffice%203.5/URE/bin/binaryurp.uno.dll

Server stack trace: 


Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at unoidl.com.sun.star.bridge.XUnoUrlResolver.resolve(String sUnoUrl)


C# code raising exception:

xContext = (XComponentContext)xUrlResolver.resolve("uno:pipe,name=lopipe1;urp;StarOffice.ComponentContext");
Comment 1 Lafriks 2012-02-27 08:06:16 UTC
Just tried with 3.5.1 RC1 and got the same error.
Comment 2 Stephan Bergmann 2012-02-27 08:19:02 UTC
Lafriks:  Can you run your C# application from within depends.exe (enabling the check-box to also trace spawned processes, in case the exception is originating from soffice) to find out why exactly loading binaryurp.uno.dll fails?
Comment 3 Lafriks 2012-02-27 13:23:24 UTC
depends.exe seems to hang when I run it.. maybe because of many threads started. I will try to make simple console application to reproduce issue and try with it. I don't know if it does changes anything but I did only now notice that I have reported wrong platform. I'm using 64-bit windows but application is running in 32-bit mode.
Comment 4 Stephan Bergmann 2012-02-27 23:29:03 UTC
(In reply to comment #3)
> I'm using 64-bit windows but application is running in 32-bit mode.

As long as the same instance of the C# application works fine with LO 3.4.4 (and the process that tries to load binaryurp.uno.dll is 32 bit), 64 bit Windows should not make a difference here.  Both LO 3.4.4 and LO 3.5 are only available in 32 bit.
Comment 5 Lafriks 2012-02-28 00:37:12 UTC
Created attachment 57742 [details]
C# test application profiling with depends.exe
Comment 6 Lafriks 2012-02-28 00:37:56 UTC
Created attachment 57743 [details]
soffice.bin profiling info
Comment 7 Lafriks 2012-02-28 00:38:30 UTC
Created attachment 57744 [details]
soffice.exe profiling info
Comment 8 Lafriks 2012-02-28 00:41:22 UTC
I could not get depends.exe not to hang with enabled checkbox "Hook the process to gather more detailed dependency information" even when running on Windows 7 32-bit. Added profiling information I could get out without that checkbox. If it is not enough I can try to find Windows XP box to try on that...
Comment 9 Stephan Bergmann 2012-02-28 01:25:46 UTC
The log for the C# test application has

  Loaded "BINARYURP.UNO.DLL" at address 0x50F20000 by thread 1.
  Unloaded "BINARYURP.UNO.DLL" at address 0x50F20000 by thread 1.
  Loaded "BINARYURP.UNO.DLL" at address 0x50F20000 by thread 1.
  Unloaded "BINARYURP.UNO.DLL" at address 0x50F20000 by thread 1.

which looks bad, but does not give a clue.  Is there any checkboxes in that depends.exe profiling pane that relate to DLL loading which you could additionally check?  (I have no Windows, so this is all from memory.)  Also, since the problem is indeed with the C# application, no need to profile the spawned soffice.{bin,exe}.
Comment 10 Lafriks 2012-02-28 02:57:13 UTC
I can't seem to find way to get depends.exe to work with "Hook the process
to gather more detailed dependency information" enabled.. it just ends with
DllMain(0x08370000, DLL_PROCESS_ATTACH, 0x00000000) in "DEPENDS.DLL" called by thread 1.
DllMain(0x08370000, DLL_PROCESS_ATTACH, 0x00000000) in "DEPENDS.DLL" returned 1 (0x1) by thread 1.
GetProcAddress(0x76AE0000 [KERNEL32.DLL], "FlsAlloc") called from "MSCOREE.DLL" at address 0x6F776F3C and returned 0x76AF4EFB by thread 1.

STATUS_STACK_BUFFER_OVERRUN encountered
Entrypoint reached. All implicit modules have been loaded.
Exited "LO35_TEST.EXE" (process 0x1DB8) with code -1073740791 (0xC0000409) by thread 1.

that seems to be depends.exe issue as it does not even get to test application start. Maybe there is any other tool that could be usefull to get more info?
Comment 11 pckiller2002 2012-03-08 03:33:34 UTC
Created attachment 58173 [details]
Screenshot showing that binaryurp.uno.dll (3.4.502.500) has an embedded manifest
Comment 12 pckiller2002 2012-03-08 03:36:09 UTC
Created attachment 58175 [details]
Screenshot showing that binaryurp.uno.dll (3.5.0.101) apparently has no embedded manifest
Comment 13 pckiller2002 2012-03-08 03:41:07 UTC
I am also experiencing this exact issue.

It appears that loading of linked C runtime DLL's (MSVCP90.DLL and MSVCR90.DLL) fails when loading binaryurp.uno.dll (from LibreOffice 3.5+ versions)

(That's the way it appears in Process Monitor)


For LibreOffice 3.4.5: binaryurp.uno.dll had an embedded manifest (RT_MANIFEST)

For LibreOffice 3.5.0: binaryurp.uno.dll no longer appears to have an embedded manifest.

(I have attached screenshots showing both)


Maybe this causes the issue?
Comment 14 Stephan Bergmann 2012-03-08 04:02:05 UTC

*** This bug has been marked as a duplicate of bug 46832 ***
Comment 15 Michael Meeks 2012-03-08 04:10:12 UTC
Fridrich - manifestly odd ? :-) or expected ?
Comment 16 Fridrich Strba 2012-03-08 05:58:02 UTC
At certain point of the gbuildification we had problems with manifests, We solved them at least for the *.exe files but it is possible that we did not for *.dlls :(
Will look.