<Swing Dev> JDK-8189938: Proposed patch
Prasanta Sadhukhan
prasanta.sadhukhan at oracle.com
Fri Feb 9 05:54:30 UTC 2018
Hi,
On 2/9/2018 4:12 AM, Semyon Sadetsky wrote:
> On 02/08/2018 01:19 PM, Matthias Bläsing wrote:
>
>> Hi,
>>
>> Am Donnerstag, den 08.02.2018, 12:06 -0800 schrieb Semyon Sadetsky:
>>> Yet another question. Do you know what might call CoInitialize in a
>>> different mode? It looks like we use STA everywhere in JDK.
>> I tried to find some documentation how the FullTrustProcessLauncher of
>> an UWP application works, but while the MSDN full of documentation
>> about UWP, the lifecycle of a native application seems not to be
>> covered. But my suspicion is this: The launching of an APPX package
>> involves the runtime system creating an environment for the application
>> and that seems to rely heavily on COM.
> It looks like there is an internal reason. Probably for UWP apps only
> MTA is allowed because of their life-cycle (the app may be suspended).
>> So I assume, that COM is initialized outside the java core and the java
>> process get this inherited. (But this is speculation!).
>>
>> I base this on the fact, that CoInitializeEx succeeds and multi
>> threaded, but fails appartment threaded and the JDK code holds exactly
>> three files calling CoInitialize (D2DPipelineManager.cpp,
>> ShellFolder2.cpp, PLATFORM_API_WinOS_DirectSound.cpp).
>>
>>> On 02/08/2018 11:55 AM, Semyon Sadetsky wrote:
>>>> I meant the case when MTA COM service is actually used, it might cause
>>>> issues since the JDK code invokes an another API which assumes
>>>> synchronization. At least performance may be affected.
>>>>
>>>> We don't do separate testing of JDK in MTA mode especially on the
>>>> regular base. That is why I wouldn't consider MTA mode as supported.
>>>>
>>>> So, before push the change I would make sure of the regression test
>>>> suite run in MTA mode hasn't brought any surprises.
>> Aggreed and I'd like to help you, but in fact I was happy, that I
>> managed to compile the JDK on windows and I have zero experience
>> working on the JDK sources.
> Prasanta,
>
> since the bug is assigned to you can you test the suggested fix in MTA
> mode and sponsor it if there are no issues?
>
I am still not able to reproduce in our WIndows 10 Pro
(EN-W10P64-10.0.01.0). "Developer Mode" and "execute powershell script"
is enabled. This is what I am getting
$ ant clean appx install
Buildfile: D:\prasanta\8189938\JDK-8189938-master\build.xml
clean:
[delete] Deleting directory D:\prasanta\8189938\JDK-8189938-master\bin
[delete] Deleting directory
D:\prasanta\8189938\JDK-8189938-master\dist\appx
[mkdir] Created dir: D:\prasanta\8189938\JDK-8189938-master\bin
[mkdir] Created dir: D:\prasanta\8189938\JDK-8189938-master\dist\appx
build:
[javac] Compiling 1 source file to
D:\prasanta\8189938\JDK-8189938-master\bin
[javac] warning: [options] bootstrap class path not set in
conjunction with -source 9
[javac] 1 warning
[jar] Building jar:
D:\prasanta\8189938\JDK-8189938-master\dist\appx\main.jar
appx:
[copy] Copying 5 files to
D:\prasanta\8189938\JDK-8189938-master\dist\appx
[exec] Expected SHA256 checksum:
ffcd6d774cfba78d88a1af253eecad0ec3639bdeabdfb3345e61d1c2355267a4
[exec] Actual SHA256 checksum:
ffcd6d774cfba78d88a1af253eecad0ec3639bdeabdfb3345e61d1c2355267a4
[exec] Download complete: jre-9.0.4_windows-x64_bin.tar.gz
[untar] Expanding:
D:\prasanta\8189938\JDK-8189938-master\jre-9.0.4_windows-x64_bin.tar.gz
into D:\prasanta\8189938\JDK-8189938-master\dist\appx\jre
install:
[exec] Add-AppxPackage : Deployment failed with HRESULT:
0x80070005, Access is denied.
[exec] Deployment Register operation with target volume C: on
Package JDK8189938_1.0.0.0_x64__hz258y3tkez3a from:
[exec] (AppxManifest.xml) failed with error 0x80070005. See
http://go.microsoft.com/fwlink/?LinkId=235160 for help
[exec] diagnosing app deployment issues.
[exec] NOTE: For additional information, look for [ActivityId]
02867602-9e78-0006-8ffb-8802789ed301 in the Event Log or use
[exec] the command line Get-AppxLog -ActivityID
02867602-9e78-0006-8ffb-8802789ed301
[exec] At line:1 char:1
[exec] + Add-AppxPackage -Register dist/appx/AppxManifest.xml
[exec] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[exec] + CategoryInfo : SecurityError:
(D:\prasanta\818...ppxManifest.xml:String) [Add-AppxPackage], PSSecurityE
[exec] xception
[exec] + FullyQualifiedErrorId :
DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddAppxPackageCommand
[exec]
[exec] Result: 1
BUILD SUCCESSFUL
Total time: 6 seconds
ARAPTE-PC+client at ARAPTE-PC /cygdrive/d/prasanta/8189938/JDK-8189938-master
$ ls
appx bin build.xml dist get-java.ps1
jre-9.0.4_windows-x64_bin.tar.gz LICENSE README.md screenshot.png src
ARAPTE-PC+client at ARAPTE-PC /cygdrive/d/prasanta/8189938/JDK-8189938-master
$ JDK8189938
bash: JDK8189938: command not found
Regards
Prasanta
> --Semyon
>>
>> As an observation: The COM initialization and usage looked pretty tight
>> together in the sources and at least initialization happens only in the
>> three files mentioned above. The DirectSound part is even limit to a
>> small thread. The ShellFolder2 code looks to be the biggest direct
>> user.
>>
>> Greetings,
>> Matthias
>
More information about the swing-dev
mailing list