redhat-developer / redhat-developer/vscode-xml
An infinite loop when loading xsi?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 328
- Forks
- 101
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 7
Description
Hi there! I am now trying coding AppxManifest.xml manually. My current xml is like:
<Package xmlns='http://schemas.microsoft.com/appx/manifest/foundation/windows10' xmlns:uap='http://schemas.microsoft.com/appx/manifest/uap/windows10' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='
http://schemas.microsoft.com/appx/2014/phone/manifest https://github.com/microsoft/msix-packaging/raw/master/resources/AppxPackaging/Manifest/Schema/2015/AppxPhoneManifestSchema2014.xsd
http://schemas.microsoft.com/appx/manifest/desktop/windows10/2 https://github.com/microsoft/msix-packaging/raw/master/resources/AppxPackaging/Manifest/Schema/2016/DesktopManifestSchema_v2.xsd
http://schemas.microsoft.com/appx/manifest/desktop/windows10/3 https://github.com/microsoft/msix-packaging/raw/master/resources/AppxPackaging/Manifest/Schema/2017/DesktopManifestSchema_v3.xsd
http://schemas.microsoft.com/appx/manifest/desktop/windows10/4 https://github.com/microsoft/msix-packaging/raw/master/resources/AppxPackaging/Manifest/Schema/2017/DesktopManifestSchema_v4.xsd
http://schemas.microsoft.com/appx/manifest/desktop/windows10/5 https://github.com/microsoft/msix-packaging/raw/master/resources/AppxPackaging/Manifest/Schema/2018/DesktopManifestSchema_v5.xsd
http://schemas.microsoft.com/appx/manifest/desktop/windows10/6 https://github.com/microsoft/msix-packaging/raw/master/resources/AppxPackaging/Manifest/Schema/2018/DesktopManifestSchema_v6.xsd
http://schemas.microsoft.com/appx/manifest/desktop/windows10/7 https://github.com/microsoft/msix-packaging/raw/master/resources/AppxPackaging/Manifest/Schema/2020/DesktopManifestSchema_v7.xsd
http://schemas.microsoft.com/appx/manifest/desktop/windows10/8 https://github.com/microsoft/msix-packaging/raw/master/resources/AppxPackaging/Manifest/Schema/2021/DesktopManifestSchema_v8.xsd
http://schemas.microsoft.com/appx/manifest/foundation/windows10 https://github.com/microsoft/msix-packaging/raw/master/resources/AppxPackaging/Manifest/Schema/2015/FoundationManifestSchema.xsd
http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities/3 https://github.com/microsoft/msix-packaging/raw/master/resources/AppxPackaging/Manifest/Schema/2016/RestrictedCapabilitiesManifestSchema_v3.xsd
http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities/6 https://github.com/microsoft/msix-packaging/raw/master/resources/AppxPackaging/Manifest/Schema/2018/RestrictedCapabilitiesManifestSchema_v6.xsd
http://schemas.microsoft.com/appx/manifest/foundation/windows10/windowscapabilities/3 https://github.com/microsoft/msix-packaging/raw/master/resources/AppxPackaging/Manifest/Schema/2016/WindowsCapabilitiesManifestSchema_v3.xsd
http://schemas.microsoft.com/appx/manifest/iot/windows10/2 https://github.com/microsoft/msix-packaging/raw/master/resources/AppxPackaging/Manifest/Schema/2017/IotManifestSchema_v2.xsd
http://schemas.microsoft.com/appx/manifest/preview/windows10/msixappcompatsupport https://github.com/microsoft/msix-packaging/raw/master/resources/AppxPackaging/Manifest/Schema/2019/PreviewManifestSchema_MsixAppCompatSupport.xsd
http://schemas.microsoft.com/appx/manifest/preview/windows10/msixappcompatsupport/3 https://github.com/microsoft/msix-packaging/raw/master/resources/AppxPackaging/Manifest/Schema/2020/PreviewManifestSchema_MsixAppCompatSupport_v3.xsd
http://schemas.microsoft.com/appx/manifest/types https://github.com/microsoft/msix-packaging/raw/master/resources/AppxPackaging/Manifest/Schema/2015/AppxManifestTypes.xsd
http://schemas.microsoft.com/appx/manifest/uap/windows10 https://github.com/microsoft/msix-packaging/raw/master/resources/AppxPackaging/Manifest/Schema/2015/UapManifestSchema.xsd
http://schemas.microsoft.com/appx/manifest/uap/windows10/2 https://github.com/microsoft/msix-packaging/raw/master/resources/AppxPackaging/Manifest/Schema/2015/UapManifestSchema_v2.xsd
http://schemas.microsoft.com/appx/manifest/uap/windows10/3 https://github.com/microsoft/msix-packaging/raw/master/resources/AppxPackaging/Manifest/Schema/2015/UapManifestSchema_v3.xsd
http://schemas.microsoft.com/appx/manifest/uap/windows10/4 https://github.com/microsoft/msix-packaging/raw/master/resources/AppxPackaging/Manifest/Schema/2016/UapManifestSchema_v4.xsd
http://schemas.microsoft.com/appx/manifest/uap/windows10/5 https://github.com/microsoft/msix-packaging/raw/master/resources/AppxPackaging/Manifest/Schema/2017/UapManifestSchema_v5.xsd
http://schemas.microsoft.com/appx/manifest/uap/windows10/6 https://github.com/microsoft/msix-packaging/raw/master/resources/AppxPackaging/Manifest/Schema/2017/UapManifestSchema_v6.xsd
http://schemas.microsoft.com/appx/manifest/uap/windows10/7 https://github.com/microsoft/msix-packaging/raw/master/resources/AppxPackaging/Manifest/Schema/2018/UapManifestSchema_v7.xsd
http://schemas.microsoft.com/appx/manifest/uap/windows10/8 https://github.com/microsoft/msix-packaging/raw/master/resources/AppxPackaging/Manifest/Schema/2018/UapManifestSchema_v8.xsd
http://schemas.microsoft.com/appx/manifest/uap/windows10/10 https://github.com/microsoft/msix-packaging/raw/master/resources/AppxPackaging/Manifest/Schema/2019/UapManifestSchema_v10.xsd
http://schemas.microsoft.com/appx/manifest/uap/windows10/11 https://github.com/microsoft/msix-packaging/raw/master/resources/AppxPackaging/Manifest/Schema/2019/UapManifestSchema_v11.xsd
http://schemas.microsoft.com/appx/manifest/uap/windows10/12 https://github.com/microsoft/msix-packaging/raw/master/resources/AppxPackaging/Manifest/Schema/2020/UapManifestSchema_v12.xsd
http://schemas.microsoft.com/appx/manifest/uap/windows10/13 https://github.com/microsoft/msix-packaging/raw/master/resources/AppxPackaging/Manifest/Schema/2021/UapManifestSchema_v13.xsd
http://schemas.microsoft.com/appx/manifest/virtualization/windows10 https://github.com/microsoft/msix-packaging/raw/master/resources/AppxPackaging/Manifest/Schema/2020/VirtualizationManifestSchema.xsd
'>
<Dependencies>
<TargetDeviceFamily MaxVersionTested='10.0.26100.0' MinVersion='10.0.0.0' Name='Windows.Universal' />
</Dependencies>
<Extensions></Extensions>
<Identity Name='ContextMenu.mklink' ProcessorArchitecture='x64' Publisher='CN=qwerty吃小庄' Version='0.0.0.0' />
<Properties>
<Description>Create symbolic link and hard link in context menu. (Windows 11 context menu supported)</Description>
<DisplayName>Context Menu mklink</DisplayName>
<PublisherDisplayName>qwerty吃小庄</PublisherDisplayName>
<Logo>Logo.png</Logo>
<uap:SupportedUsers>multiple</uap:SupportedUsers>
</Properties>
</Package>
And an error occurred in <Extensions>:
Current configuration of the parser doesn't allow the expansion of a content model for a complex type to contain more than 163,840,000 nodes.
I have set -Djdk.xml.maxOccur=163840000 -Xmx8G.
Although the above xml has an enormous xsi, I don't think it has more than one hundred million nodes. I guess that the LSP is in an infinite loop.
Anyone has any idea?
Note: There are two <Extensions> element sharing the same name. One is CT_ApplicationExtensions, the other one is CT_PackageExtensions. Maybe relative with this issue?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the report in VS Code with the supplied AppxManifest.xml, focusing on xsi:schemaLocation expansion and the two Extensions elements. Start at the XML language server's parser entry point and trace the complex-type content-model expansion until the node limit is reached. Done means the manifest no longer enters runaway expansion and valid diagnostics remain available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode, xml
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100