getgauge / Intellij-Plugin

Gauge IntelliJ IDEA plugin
Apache License 2.0
43 stars 28 forks source link

Getting the following exception on opening a file with utf-8 chars #209

Closed sswaroopgupta closed 7 years ago

sswaroopgupta commented 7 years ago

The project I used https://github.com/getgauge/gauge-test-apps/tree/master/basic-java.

The spec that I opened is specs/continueOnFailure/utf8.spec

329608
java.lang.ArrayIndexOutOfBoundsException: 329608
    at sun.font.ExtendedTextSourceLabel.createCharinfo(ExtendedTextSourceLabel.java:814)
    at sun.font.ExtendedTextSourceLabel.getCharinfo(ExtendedTextSourceLabel.java:548)
    at sun.font.ExtendedTextSourceLabel.getLineBreakIndex(ExtendedTextSourceLabel.java:480)
    at java.awt.font.TextMeasurer.calcLineBreak(TextMeasurer.java:330)
    at java.awt.font.TextMeasurer.getLineBreakIndex(TextMeasurer.java:566)
    at java.awt.font.LineBreakMeasurer.nextOffset(LineBreakMeasurer.java:359)
    at java.awt.font.LineBreakMeasurer.nextLayout(LineBreakMeasurer.java:440)
    at javax.swing.text.TextLayoutStrategy.sync(TextLayoutStrategy.java:324)
    at javax.swing.text.TextLayoutStrategy.insertUpdate(TextLayoutStrategy.java:70)
    at javax.swing.text.FlowView.loadChildren(FlowView.java:143)
    at javax.swing.text.CompositeView.setParent(CompositeView.java:139)
    at javax.swing.text.FlowView.setParent(FlowView.java:289)
    at javax.swing.text.html.ParagraphView.setParent(ParagraphView.java:75)
    at javax.swing.text.CompositeView.replace(CompositeView.java:217)
    at javax.swing.text.BoxView.replace(BoxView.java:181)
    at javax.swing.text.CompositeView.loadChildren(CompositeView.java:114)
    at javax.swing.text.CompositeView.setParent(CompositeView.java:139)
    at javax.swing.text.html.BlockView.setParent(BlockView.java:72)
    at javax.swing.text.html.HTMLEditorKit$HTMLFactory$BodyBlockView.setParent(HTMLEditorKit.java:1327)
    at javax.swing.text.CompositeView.replace(CompositeView.java:217)
    at javax.swing.text.BoxView.replace(BoxView.java:181)
    at javax.swing.text.CompositeView.loadChildren(CompositeView.java:114)
    at javax.swing.text.CompositeView.setParent(CompositeView.java:139)
    at javax.swing.text.html.BlockView.setParent(BlockView.java:72)
    at javax.swing.plaf.basic.BasicTextUI$RootView.setView(BasicTextUI.java:1328)
    at javax.swing.plaf.basic.BasicTextUI.setView(BasicTextUI.java:693)
    at javax.swing.plaf.basic.BasicTextUI.modelChanged(BasicTextUI.java:682)
    at javax.swing.plaf.basic.BasicTextUI$UpdateHandler.insertUpdate(BasicTextUI.java:1862)
    at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:201)
    at javax.swing.text.DefaultStyledDocument.create(DefaultStyledDocument.java:156)
    at javax.swing.text.html.HTMLDocument.create(HTMLDocument.java:469)
    at javax.swing.text.html.HTMLDocument$HTMLReader.flushBuffer(HTMLDocument.java:3736)
    at javax.swing.text.html.HTMLDocument$HTMLReader.flush(HTMLDocument.java:2538)
    at javax.swing.text.html.HTMLEditorKit.read(HTMLEditorKit.java:262)
    at javax.swing.JEditorPane.setText(JEditorPane.java:1415)
    at com.thoughtworks.gauge.markdownPreview.MarkdownPreviewEditor.<init>(MarkdownPreviewEditor.java:58)
    at com.thoughtworks.gauge.markdownPreview.MarkdownPreviewEditorProvider.createEditor(MarkdownPreviewEditorProvider.java:33)
    at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl$14.run(FileEditorManagerImpl.java:894)
    at com.intellij.util.ui.UIUtil.invokeAndWaitIfNeeded(UIUtil.java:2426)
    at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl4(FileEditorManagerImpl.java:876)
    at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl3(FileEditorManagerImpl.java:810)
    at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl$11.run(FileEditorManagerImpl.java:790)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:124)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:99)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:85)
    at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl2(FileEditorManagerImpl.java:787)
    at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileWithProviders(FileEditorManagerImpl.java:728)
    at com.intellij.openapi.fileEditor.ex.FileEditorManagerEx.openFile(FileEditorManagerEx.java:151)
    at com.intellij.codeInsight.navigation.NavigationUtil.activatePsiElementIfOpen(NavigationUtil.java:200)
    at com.intellij.codeInsight.navigation.NavigationUtil.openFileWithPsiElement(NavigationUtil.java:176)
    at com.intellij.ide.projectView.impl.nodes.AbstractPsiBasedNode.navigate(AbstractPsiBasedNode.java:238)
    at com.intellij.ide.projectView.impl.nodes.AbstractPsiBasedNode.navigate(AbstractPsiBasedNode.java:248)
    at com.intellij.ide.projectView.impl.nodes.PsiFileNode.navigate(PsiFileNode.java:133)
    at com.intellij.util.OpenSourceUtil.navigate(OpenSourceUtil.java:53)
    at com.intellij.util.OpenSourceUtil.openSourcesFrom(OpenSourceUtil.java:31)
    at com.intellij.util.EditSourceOnDoubleClickHandler$TreeMouseListener.processDoubleClick(EditSourceOnDoubleClickHandler.java:130)
    at com.intellij.util.EditSourceOnDoubleClickHandler$TreeMouseListener.onDoubleClick(EditSourceOnDoubleClickHandler.java:122)
    at com.intellij.ui.DoubleClickListener.onClick(DoubleClickListener.java:30)
    at com.intellij.ui.ClickListener$1.mouseReleased(ClickListener.java:73)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
    at java.awt.Component.processMouseEvent(Component.java:6533)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    at com.intellij.ui.treeStructure.Tree.processMouseEvent(Tree.java:410)
    at com.intellij.ide.dnd.aware.DnDAwareTree.processMouseEvent(DnDAwareTree.java:58)
    at java.awt.Component.processEvent(Component.java:6298)
    at java.awt.Container.processEvent(Container.java:2236)
    at java.awt.Component.dispatchEventImpl(Component.java:4889)
    at java.awt.Container.dispatchEventImpl(Container.java:2294)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
    at java.awt.Container.dispatchEventImpl(Container.java:2280)
    at java.awt.Window.dispatchEventImpl(Window.java:2746)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.awt.EventQueue$4.run(EventQueue.java:729)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:857)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:654)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:386)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Version

Gauge version: 0.6.3.nightly-2016-10-27

Plugins
-------
csharp (0.9.2.nightly-2016-09-14)
html-report (2.2.0.nightly-2016-10-27)
java (0.5.1.nightly-2016-10-26)
ruby (0.3.2.nightly-2016-08-22)
spectacle (0.0.1)
xml-report (0.1.4.nightly-2016-07-25)
kashishm commented 7 years ago

Cannot reproduce the exception with the latest nightly. @sguptatw can you confirm and close the issue?

sswaroopgupta commented 7 years ago

This is still replicable on Gauge 0.2.6.nightly-2017-01-09

kashishm commented 7 years ago

This is not replicable on the latest version of IntelliJ Idea. @sguptatw can you confirm and close the issue?

kashishm commented 7 years ago

@sguptatw Did you test this on latest IntelliJ Idea version(2016.3.4)?