Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite loop inside LSPMessageFormatter for some cases #856

Closed
angelozerr opened this issue Aug 27, 2020 · 0 comments · Fixed by #891
Closed

Infinite loop inside LSPMessageFormatter for some cases #856

angelozerr opened this issue Aug 27, 2020 · 0 comments · Fixed by #891
Assignees
Labels
bug Something isn't working validation XSD
Milestone

Comments

@angelozerr
Copy link
Contributor

angelozerr commented Aug 27, 2020

In some case https://github.com/eclipse/lemminx/blob/875d5b427f9db918857df9db2b0939282b048a12/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/extensions/xerces/LSPMessageFormatter.java#L153 don't exit from the loop.

Given this XSD:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
	targetNamespace="http://foo">
	<xs:element name="foo">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="bar" />
			</xs:sequence>
		</xs:complexType>
	</xs:element>
</xs:schema>

and this XML file:

<foo xmlns="http://foo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://foo foo.xsd">
	<bar />
</foo>

error are crazy:

image

@angelozerr angelozerr self-assigned this Aug 27, 2020
@angelozerr angelozerr added bug Something isn't working validation XSD labels Aug 27, 2020
@angelozerr angelozerr removed their assignment Aug 27, 2020
angelozerr added a commit to angelozerr/lemminx that referenced this issue Sep 25, 2020
angelozerr added a commit to angelozerr/lemminx that referenced this issue Sep 25, 2020
angelozerr added a commit to angelozerr/lemminx that referenced this issue Sep 25, 2020
angelozerr added a commit to angelozerr/lemminx that referenced this issue Sep 25, 2020
angelozerr added a commit to angelozerr/lemminx that referenced this issue Sep 25, 2020
angelozerr added a commit to angelozerr/lemminx that referenced this issue Sep 25, 2020
@angelozerr angelozerr added this to the 0.14.0 milestone Sep 25, 2020
angelozerr added a commit that referenced this issue Sep 25, 2020
Fixes #856

Signed-off-by: azerr <azerr@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working validation XSD
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant