Issue 126360

Summary: Possible exception/segfault in jurt jpipe.dll under Windows with pipe connection
Product: General Reporter: Steffen.Boersig
Component: codeAssignee: AOO issues mailing list <issues>
Status: RESOLVED FIXED QA Contact:
Severity: Normal    
Priority: P5 (lowest) CC: damjan, Juergen.Funk_ml, oliver.brinzing
Version: 4.1.1Keywords: crash
Target Milestone: 4.2.0   
Hardware: All   
OS: Windows, all   
Issue Type: DEFECT Latest Confirmation in: 4.2.0-dev
Developer Difficulty: ---
Attachments:
Description Flags
Patch from LibreOffice to solve the Problem none

Description Steffen.Boersig 2015-06-11 06:20:20 UTC
Since this issue is already reported on the LibreOffice project in full detail and even with the solution, I will link to it first:
https://bugs.freedesktop.org/show_bug.cgi?format=multiple&id=86745

I will copy the most important points from the linked issue in here, it's taken directly from the original post. You can download the relevant Java Classes to test this problem (if it occurs for you) from there.

The problem exists in AOO as well since it's pretty much the same Windows Library and we could reproduce it on two of our customers systems, with AOO 3.4.0 and 4.1.1 .

The problem:
On Windows when you start a java-uno-connection via pipe then on some machines you can get the following exception/segfault in the jpipe.dll. 

Detailed Description (sorry for the German UI language settings):
Problemereignisname:	APPCRASH
  Anwendungsname:	javaw.exe
  Anwendungsversion:	7.0.110.21
  Anwendungszeitstempel:	50f13a25
  Fehlermodulname:	jpipe.dll
  Fehlermodulversion:	4.2.5.2
  Fehlermodulzeitstempel:	53bc1d00
  Ausnahmecode:	c00000fd
  Ausnahmeoffset:	000011c7
  Betriebsystemversion:	6.1.7601.2.1.0.256.48
  Gebietsschema-ID:	1031
  Zusatzinformation 1:	022d
  Zusatzinformation 2:	022d20d2f136501747c7b284fa79af41
  Zusatzinformation 3:	171f
  Zusatzinformation 4:	171fb495ef00f99cffbb09f85224e710

The cause:
Analysis result / solution:

In the jpipe.dll DLLMain there's a call to the WinApi's LoadLibraryExW function and that is not allowed. Please see http://msdn.microsoft.com/en-us/library/windows/desktop/ms682583(v=vs.85).aspx in the Remarks section. It is clearly mentioned there, that the behaviour for such usage is not defined and risky.
Comment 1 Oliver Brinzing 2015-06-13 16:59:19 UTC
.
Comment 2 Juergen Funk (CIB) 2015-11-05 08:36:12 UTC
Created attachment 85106 [details]
Patch from LibreOffice to solve the Problem

Here is the patch, hope it is right

Details look into description
Comment 3 damjan 2015-11-05 17:25:40 UTC
Patch committed in revision 1712824, resolving fixed. A big thank you to Juergen Funk for the contribution!