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

ClassCastException from RawCaptures.getCaptures #754

Open
zulus opened this issue May 21, 2024 · 3 comments
Open

ClassCastException from RawCaptures.getCaptures #754

zulus opened this issue May 21, 2024 · 3 comments

Comments

@zulus
Copy link

zulus commented May 21, 2024

Looks like tm4e have trouble with parsing own built-in language_pack. There is a ClassCastException in logs, that prevents syntax coloring for vue files.

Problem appear during initial loading (startup) org.eclipse.tm4e.language_pack/syntaxes/go/go.tmLanguage.json, and loading patterns for keyword.function.go

@sebthom
Copy link
Member

sebthom commented May 21, 2024

I cannot reproduce this. Please provide a reproducible example and a stacktrace.

@zulus
Copy link
Author

zulus commented May 21, 2024

I had to modify RawCaptures a little bit to catch stacktrace:


java.lang.ClassCastException: class org.eclipse.tm4e.core.internal.parser.PropertySettable$ArrayList cannot be cast to class org.eclipse.tm4e.core.internal.grammar.raw.IRawRule (org.eclipse.tm4e.core.internal.parser.PropertySettable$ArrayList and org.eclipse.tm4e.core.internal.grammar.raw.IRawRule are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @759cdfc8)
	at org.eclipse.tm4e.core.internal.grammar.raw.RawCaptures.getCapture(RawCaptures.java:23)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory._compileCaptures(RuleFactory.java:129)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory.lambda$1(RuleFactory.java:96)
	at org.eclipse.tm4e.core.internal.grammar.Grammar.registerRule(Grammar.java:207)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory.getCompiledRuleId(RuleFactory.java:51)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory._compilePatterns(RuleFactory.java:171)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory.lambda$1(RuleFactory.java:76)
	at org.eclipse.tm4e.core.internal.grammar.Grammar.registerRule(Grammar.java:207)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory.getCompiledRuleId(RuleFactory.java:51)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory._compilePatterns(RuleFactory.java:171)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory.lambda$1(RuleFactory.java:76)
	at org.eclipse.tm4e.core.internal.grammar.Grammar.registerRule(Grammar.java:207)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory.getCompiledRuleId(RuleFactory.java:51)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory._compilePatterns(RuleFactory.java:171)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory.lambda$1(RuleFactory.java:76)
	at org.eclipse.tm4e.core.internal.grammar.Grammar.registerRule(Grammar.java:207)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory.getCompiledRuleId(RuleFactory.java:51)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory._compilePatterns(RuleFactory.java:199)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory.lambda$1(RuleFactory.java:89)
	at org.eclipse.tm4e.core.internal.grammar.Grammar.registerRule(Grammar.java:207)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory.getCompiledRuleId(RuleFactory.java:51)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory._compilePatterns(RuleFactory.java:208)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory.lambda$1(RuleFactory.java:99)
	at org.eclipse.tm4e.core.internal.grammar.Grammar.registerRule(Grammar.java:207)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory.getCompiledRuleId(RuleFactory.java:51)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory._compilePatterns(RuleFactory.java:171)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory.lambda$1(RuleFactory.java:76)
	at org.eclipse.tm4e.core.internal.grammar.Grammar.registerRule(Grammar.java:207)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory.getCompiledRuleId(RuleFactory.java:51)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory._compilePatterns(RuleFactory.java:171)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory.lambda$1(RuleFactory.java:76)
	at org.eclipse.tm4e.core.internal.grammar.Grammar.registerRule(Grammar.java:207)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory.getCompiledRuleId(RuleFactory.java:51)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory._compilePatterns(RuleFactory.java:171)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory.lambda$1(RuleFactory.java:76)
	at org.eclipse.tm4e.core.internal.grammar.Grammar.registerRule(Grammar.java:207)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory.getCompiledRuleId(RuleFactory.java:51)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory._compilePatterns(RuleFactory.java:199)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory.lambda$1(RuleFactory.java:99)
	at org.eclipse.tm4e.core.internal.grammar.Grammar.registerRule(Grammar.java:207)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory.getCompiledRuleId(RuleFactory.java:51)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory._compilePatterns(RuleFactory.java:208)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory.lambda$1(RuleFactory.java:99)
	at org.eclipse.tm4e.core.internal.grammar.Grammar.registerRule(Grammar.java:207)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory.getCompiledRuleId(RuleFactory.java:51)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory._compilePatterns(RuleFactory.java:208)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory.lambda$1(RuleFactory.java:99)
	at org.eclipse.tm4e.core.internal.grammar.Grammar.registerRule(Grammar.java:207)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory.getCompiledRuleId(RuleFactory.java:51)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory._compilePatterns(RuleFactory.java:208)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory.lambda$1(RuleFactory.java:76)
	at org.eclipse.tm4e.core.internal.grammar.Grammar.registerRule(Grammar.java:207)
	at org.eclipse.tm4e.core.internal.rule.RuleFactory.getCompiledRuleId(RuleFactory.java:51)
	at org.eclipse.tm4e.core.internal.grammar.Grammar._tokenize(Grammar.java:281)
	at org.eclipse.tm4e.core.internal.grammar.Grammar.tokenizeLine(Grammar.java:259)
	at org.eclipse.tm4e.core.model.TMTokenizationSupport.tokenize(TMTokenizationSupport.java:81)
	at org.eclipse.tm4e.core.model.TMModel$TokenizerThread.revalidateTokens(TMModel.java:250)
	at org.eclipse.tm4e.core.model.TMModel$TokenizerThread.run(TMModel.java:173)

@zulus
Copy link
Author

zulus commented May 21, 2024

I cannot reproduce this. Please provide a reproducible example and a stacktrace.

It depends to disk load order, once I'll find correct scenario I'll put here. ClassCastException normally is hidden

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants