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

SyntaxException by using openscad textmate grammar #5928

Open
Chris2011 opened this issue May 8, 2023 · 2 comments
Open

SyntaxException by using openscad textmate grammar #5928

Chris2011 opened this issue May 8, 2023 · 2 comments
Labels
kind:bug Bug report or fix needs:triage Requires attention from one of the committers

Comments

@Chris2011
Copy link
Contributor

Apache NetBeans version

Apache NetBeans 17

What happened

When I register this tmLanguage.json file via Options -> Editor -> Language Servers: /~https://github.com/Leathong/openscad-support-vscode/blob/master/syntaxes/scad.tmLanguage.json and I open a file, doesn't matter whether it is empty or not, I got this exception:

org.joni.exception.SyntaxException: invalid pattern in look-behind
	at org.joni.ScannerSupport.newSyntaxException(ScannerSupport.java:166)
	at org.joni.Analyser.setupLookBehind(Analyser.java:1369)
	at org.joni.Analyser.setupTree(Analyser.java:1950)
	at org.joni.Analyser.setupTree(Analyser.java:1791)
	at org.joni.Analyser.setupTree(Analyser.java:1902)
	at org.joni.Analyser.compile(Analyser.java:113)
	at org.joni.Regex.<init>(Regex.java:159)
	at org.joni.Regex.<init>(Regex.java:136)
	at org.eclipse.tm4e.core.internal.oniguruma.OnigRegExp.<init>(OnigRegExp.java:49)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
	at org.eclipse.tm4e.core.internal.oniguruma.OnigSearcher.<init>(OnigSearcher.java:29)
	at org.eclipse.tm4e.core.internal.oniguruma.OnigScanner.<init>(OnigScanner.java:25)
	at org.eclipse.tm4e.core.internal.rule.RegExpSourceList.createOnigScanner(RegExpSourceList.java:133)
	at org.eclipse.tm4e.core.internal.rule.RegExpSourceList.compile(RegExpSourceList.java:87)
	at org.eclipse.tm4e.core.internal.rule.IncludeOnlyRule.compile(IncludeOnlyRule.java:46)
	at org.eclipse.tm4e.core.internal.grammar.LineTokenizer.matchRule(LineTokenizer.java:261)
	at org.eclipse.tm4e.core.internal.grammar.LineTokenizer.matchRuleOrInjections(LineTokenizer.java:284)
	at org.eclipse.tm4e.core.internal.grammar.LineTokenizer.scanNext(LineTokenizer.java:109)
	at org.eclipse.tm4e.core.internal.grammar.LineTokenizer.scan(LineTokenizer.java:100)
	at org.eclipse.tm4e.core.internal.grammar.LineTokenizer.tokenizeString(LineTokenizer.java:521)
	at org.eclipse.tm4e.core.internal.grammar.Grammar.tokenize(Grammar.java:242)
	at org.eclipse.tm4e.core.internal.grammar.Grammar.tokenizeLine(Grammar.java:194)
	at org.netbeans.modules.textmate.lexer.TextmateLexer.nextToken(TextmateLexer.java:75)
	at org.netbeans.lib.lexer.LexerInputOperation.nextToken(LexerInputOperation.java:191)
	at org.netbeans.lib.lexer.inc.IncTokenList.tokenOrEmbeddingImpl(IncTokenList.java:170)
	at org.netbeans.lib.lexer.inc.IncTokenList.tokenOrEmbedding(IncTokenList.java:165)
	at org.netbeans.api.lexer.TokenSequence.moveNext(TokenSequence.java:463)
	at org.netbeans.modules.textmate.lexer.SyntaxHighlighting$TSInfo.moveNextToken(SyntaxHighlighting.java:785)
	at org.netbeans.modules.textmate.lexer.SyntaxHighlighting$HSImpl.moveTheSequence(SyntaxHighlighting.java:482)
	at org.netbeans.modules.textmate.lexer.SyntaxHighlighting$HSImpl.moveNext(SyntaxHighlighting.java:431)
	at org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$Wrapper.fetchNextHighlight(DirectMergeContainer.java:600)
	at org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$Wrapper.init(DirectMergeContainer.java:509)
	at org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$HlSequence.<init>(DirectMergeContainer.java:211)
	at org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer.getHighlights(DirectMergeContainer.java:96)
	at org.netbeans.modules.editor.lib2.highlighting.HighlightsReader.<init>(HighlightsReader.java:42)
	at org.netbeans.modules.editor.lib2.view.HighlightsViewFactory.restart(HighlightsViewFactory.java:167)
	at org.netbeans.modules.editor.lib2.view.ViewBuilder$FactoryState.init(ViewBuilder.java:1299)
	at org.netbeans.modules.editor.lib2.view.ViewBuilder.createViews(ViewBuilder.java:699)
	at org.netbeans.modules.editor.lib2.view.ViewBuilder.createReplaceRepaintViews(ViewBuilder.java:660)
	at org.netbeans.modules.editor.lib2.view.ViewUpdates.reinitAllViews(ViewUpdates.java:189)
	at org.netbeans.modules.editor.lib2.view.DocumentViewOp.checkViewsInited(DocumentViewOp.java:619)
	at org.netbeans.modules.editor.lib2.view.DocumentView.getPreferredSpan(DocumentView.java:226)
	at java.desktop/javax.swing.plaf.basic.BasicTextUI$RootView.getPreferredSpan(BasicTextUI.java:1449)
	at java.desktop/javax.swing.plaf.basic.BasicTextUI.getPreferredSize(BasicTextUI.java:955)
	at java.desktop/javax.swing.JComponent.getPreferredSize(JComponent.java:1680)
	at java.desktop/javax.swing.JEditorPane.getPreferredSize(JEditorPane.java:1345)
	at org.netbeans.modules.editor.NbEditorUI$LayeredEditorPane.getPreferredSize(NbEditorUI.java:454)
	at java.desktop/javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:795)
	at java.desktop/java.awt.Container.layout(Container.java:1537)
	at java.desktop/java.awt.Container.doLayout(Container.java:1526)
	at java.desktop/java.awt.Container.validateTree(Container.java:1722)
	at java.desktop/java.awt.Container.validate(Container.java:1657)
	at java.desktop/javax.swing.RepaintManager$3.run(RepaintManager.java:745)
	at java.desktop/javax.swing.RepaintManager$3.run(RepaintManager.java:743)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:742)
	at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1883)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:316)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136)
[catch] at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Also syntax highligthing is not working.

How to reproduce

Did this work correctly in an earlier version?

No / Don't know

Operating System

Windows 11 (64bit)

JDK

OpenJDK 14

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

No response

Are you willing to submit a pull request?

No

@Chris2011 Chris2011 added kind:bug Bug report or fix needs:triage Requires attention from one of the committers labels May 8, 2023
@matthiasblaesing
Copy link
Contributor

@Chris2011 please check if this helps: #7971

@Chris2011
Copy link
Contributor Author

@matthiasblaesing thx, will test it tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Bug report or fix needs:triage Requires attention from one of the committers
Projects
None yet
Development

No branches or pull requests

2 participants