Ongoing issues with accessing the StubIndex

I have been figting an issue where when I modify a document (type some text), This can cause an error in the StubIndex.I have never been able to pinpoint the cause of the error. I must be breaking a basic rule about accessing the index. There are a other strange symptoms. For example, the change markers on the left gutter will track my changes as I type, and indicate which lines have changed. However, I can press keys in such a manner that the change gutters become out of sync with the actual changed lines. (This is typically one of the placees where I experience my errrors)

I will have to start docuementing this, and hope that someone can give me some insight as to what I could be doing.

This is one of the most common exceptions that occurs (Prior to release of IDEA 12)

http://sylvanaar.myjetbrains.com/youtrack/issue/IDLua-771

In IDEA 12, it appears that something has changed. I get a different error now.

java.lang.IndexOutOfBoundsException: Index: 75, Size: 26      at java.util.ArrayList.RangeCheck(ArrayList.java:547)      at java.util.ArrayList.get(ArrayList.java:322)      at com.intellij.psi.stubs.StubSerializationHelper$FileLocalStringEnumerator.valueOf(StubSerializationHelper.java:212)      at com.intellij.util.io.StringRef.getString(StringRef.java:51)      at com.intellij.util.xml.stubs.FileStub.<init>(FileStub.java:36)      at com.intellij.util.xml.stubs.FileStubSerializer.deserialize(FileStubSerializer.java:47)      at com.intellij.util.xml.stubs.FileStubSerializer.deserialize(FileStubSerializer.java:27)      at com.intellij.psi.stubs.StubSerializationHelper.deserialize(StubSerializationHelper.java:181)      at com.intellij.psi.stubs.StubSerializationHelper.deserialize(StubSerializationHelper.java:184)      at com.intellij.psi.stubs.StubSerializationHelper.deserialize(StubSerializationHelper.java:184)      at com.intellij.psi.stubs.StubSerializationHelper.deserialize(StubSerializationHelper.java:171)      at com.intellij.psi.stubs.SerializationManagerImpl.deserialize(SerializationManagerImpl.java:165)      at com.intellij.psi.stubs.SerializedStubTree.getStub(SerializedStubTree.java:59)      at com.intellij.psi.stubs.StubTreeLoaderImpl.readFromVFile(StubTreeLoaderImpl.java:102)      at com.intellij.psi.stubs.StubTreeLoaderImpl.readOrBuild(StubTreeLoaderImpl.java:44)      at com.intellij.psi.impl.source.PsiFileImpl.getStubTree(PsiFileImpl.java:672)      at com.intellij.psi.stubs.StubIndexImpl$1.perform(StubIndexImpl.java:239)      at com.intellij.psi.stubs.StubIndexImpl$1.perform(StubIndexImpl.java:223)      at com.intellij.util.indexing.ValueContainer.forEach(ValueContainer.java:60)      at com.intellij.psi.stubs.StubIndexImpl.process(StubIndexImpl.java:223)      at com.intellij.psi.stubs.StubIndexImpl.get(StubIndexImpl.java:196)      at com.intellij.psi.stubs.StubIndexImpl.safeGet(StubIndexImpl.java:508)      at com.sylvanaar.idea.Lua.lang.psi.stubs.index.LuaGlobalDeclarationIndex.get(LuaGlobalDeclarationIndex.java:47)      at com.sylvanaar.idea.Lua.lang.psi.resolve.LuaResolver._resolve(LuaResolver.java:62)      at com.sylvanaar.idea.Lua.lang.psi.resolve.LuaResolver.resolve(LuaResolver.java:24)      at com.sylvanaar.idea.Lua.lang.psi.resolve.LuaResolver.resolve(LuaResolver.java:18)      at com.intellij.psi.impl.source.resolve.ResolveCache$2.compute(ResolveCache.java:114)      at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)      at com.intellij.psi.impl.source.resolve.ResolveCache.a(ResolveCache.java:119)      at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:134)      at com.sylvanaar.idea.Lua.lang.psi.impl.symbols.LuaReferenceElementImpl.multiResolve(LuaReferenceElementImpl.java:130)      at com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference.a(PsiMultiReference.java:60)      at com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference.access$000(PsiMultiReference.java:36)      at com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference$1.compare(PsiMultiReference.java:43)      at com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference$1.compare(PsiMultiReference.java:37)      at java.util.Arrays.mergeSort(Arrays.java:1270)      at java.util.Arrays.sort(Arrays.java:1210)      at com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference.a(PsiMultiReference.java:79)      at com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference.resolve(PsiMultiReference.java:105)      at com.intellij.codeInsight.TargetElementUtilBase.getReferenceOrReferencedElement(TargetElementUtilBase.java:313)      at com.intellij.codeInsight.TargetElementUtil.getReferenceOrReferencedElement(TargetElementUtil.java:96)      at com.intellij.codeInsight.TargetElementUtilBase.findTargetElement(TargetElementUtilBase.java:201)      at com.intellij.codeInsight.TargetElementUtil.findTargetElement(TargetElementUtil.java:61)      at com.intellij.codeInsight.TargetElementUtilBase.findTargetElement(TargetElementUtilBase.java:156)      at com.intellij.openapi.fileEditor.impl.text.TextEditorPsiDataProvider.a(TextEditorPsiDataProvider.java:155)      at com.intellij.openapi.fileEditor.impl.text.TextEditorPsiDataProvider.getData(TextEditorPsiDataProvider.java:59)      at com.intellij.openapi.fileEditor.ex.FileEditorManagerEx.getData(FileEditorManagerEx.java:157)      at com.intellij.openapi.fileEditor.impl.text.TextEditorComponent.getData(TextEditorComponent.java:277)      at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl$PsiAwareTextEditorComponent.getData(PsiAwareTextEditorImpl.java:89)      at com.intellij.ide.impl.DataManagerImpl.a(DataManagerImpl.java:83)      at com.intellij.ide.impl.DataManagerImpl.a(DataManagerImpl.java:73)      at com.intellij.ide.impl.DataManagerImpl.access$300(DataManagerImpl.java:51)      at com.intellij.ide.impl.DataManagerImpl$MyDataContext.b(DataManagerImpl.java:379)      at com.intellij.ide.impl.DataManagerImpl$MyDataContext.getData(DataManagerImpl.java:356)      at com.intellij.openapi.actionSystem.DataKey.getData(DataKey.java:75)      at com.intellij.codeEditor.printing.ExportToHTMLAction.update(ExportToHTMLAction.java:49)      at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:98)      at com.intellij.openapi.actionSystem.impl.Utils.a(Utils.java:165)      at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:124)      at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:84)      at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:144)      at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:84)      at com.intellij.openapi.actionSystem.impl.Utils.fillMenu(Utils.java:238)      at com.intellij.openapi.actionSystem.impl.ActionMenu.g(ActionMenu.java:264)      at com.intellij.openapi.actionSystem.impl.ActionMenu.access$400(ActionMenu.java:42)      at com.intellij.openapi.actionSystem.impl.ActionMenu$MenuListenerImpl.menuSelected(ActionMenu.java:227)      at javax.swing.JMenu.fireMenuSelected(JMenu.java:1028)      at javax.swing.JMenu$MenuChangeListener.stateChanged(JMenu.java:1107)      at javax.swing.DefaultButtonModel.fireStateChanged(DefaultButtonModel.java:333)      at javax.swing.DefaultButtonModel.setSelected(DefaultButtonModel.java:215)      at javax.swing.JMenu.setSelected(JMenu.java:294)      at javax.swing.JMenu.menuSelectionChanged(JMenu.java:1175)      at com.intellij.openapi.actionSystem.impl.ActionMenu.menuSelectionChanged(ActionMenu.java:201)      at javax.swing.MenuSelectionManager.setSelectedPath(MenuSelectionManager.java:100)      at javax.swing.plaf.basic.BasicMenuUI$Handler.mousePressed(BasicMenuUI.java:434)      at java.awt.Component.processMouseEvent(Component.java:6294)      at javax.swing.JComponent.processMouseEvent(JComponent.java:3275)      at java.awt.Component.processEvent(Component.java:6062)      at java.awt.Container.processEvent(Container.java:2039)      at java.awt.Component.dispatchEventImpl(Component.java:4660)      at java.awt.Container.dispatchEventImpl(Container.java:2097)      at java.awt.Component.dispatchEvent(Component.java:4488)      at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)      at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4233)      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)      at java.awt.Container.dispatchEventImpl(Container.java:2083)      at java.awt.Window.dispatchEventImpl(Window.java:2489)      at java.awt.Component.dispatchEvent(Component.java:4488)      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:668)      at java.awt.EventQueue.access$400(EventQueue.java:81)      at java.awt.EventQueue$2.run(EventQueue.java:627)      at java.awt.EventQueue$2.run(EventQueue.java:625)      at java.security.AccessController.doPrivileged(Native Method)      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)      at java.awt.EventQueue$3.run(EventQueue.java:641)      at java.awt.EventQueue$3.run(EventQueue.java:639)      at java.security.AccessController.doPrivileged(Native Method)      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)      at java.awt.EventQueue.dispatchEvent(EventQueue.java:638)      at com.intellij.ide.IdeEventQueue.d(IdeEventQueue.java:673)      at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:494)      at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:333)      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)      at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)



java.lang.IndexOutOfBoundsException: Index: 75, Size: 26      at java.util.ArrayList.RangeCheck(ArrayList.java:547)      at java.util.ArrayList.get(ArrayList.java:322)      at com.intellij.psi.stubs.StubSerializationHelper$FileLocalStringEnumerator.valueOf(StubSerializationHelper.java:212)      at com.intellij.util.io.StringRef.getString(StringRef.java:51)      at com.intellij.util.xml.stubs.FileStub.<init>(FileStub.java:36)      at com.intellij.util.xml.stubs.FileStubSerializer.deserialize(FileStubSerializer.java:47)      at com.intellij.util.xml.stubs.FileStubSerializer.deserialize(FileStubSerializer.java:27)      at com.intellij.psi.stubs.StubSerializationHelper.deserialize(StubSerializationHelper.java:181)      at com.intellij.psi.stubs.StubSerializationHelper.deserialize(StubSerializationHelper.java:184)      at com.intellij.psi.stubs.StubSerializationHelper.deserialize(StubSerializationHelper.java:184)      at com.intellij.psi.stubs.StubSerializationHelper.deserialize(StubSerializationHelper.java:171)      at com.intellij.psi.stubs.SerializationManagerImpl.deserialize(SerializationManagerImpl.java:165)      at com.intellij.psi.stubs.SerializedStubTree.getStub(SerializedStubTree.java:59)      at com.intellij.psi.stubs.StubTreeLoaderImpl.readFromVFile(StubTreeLoaderImpl.java:102)      at com.intellij.psi.stubs.StubTreeLoaderImpl.readOrBuild(StubTreeLoaderImpl.java:44)      at com.intellij.psi.impl.source.PsiFileImpl.getStubTree(PsiFileImpl.java:672)      at com.intellij.psi.stubs.StubIndexImpl$1.perform(StubIndexImpl.java:239)      at com.intellij.psi.stubs.StubIndexImpl$1.perform(StubIndexImpl.java:223)      at com.intellij.util.indexing.ValueContainer.forEach(ValueContainer.java:60)      at com.intellij.psi.stubs.StubIndexImpl.process(StubIndexImpl.java:223)      at com.intellij.psi.stubs.StubIndexImpl.get(StubIndexImpl.java:196)      at com.intellij.psi.stubs.StubIndexImpl.safeGet(StubIndexImpl.java:508)      at com.sylvanaar.idea.Lua.lang.psi.stubs.index.LuaGlobalDeclarationIndex.get(LuaGlobalDeclarationIndex.java:47)      at com.sylvanaar.idea.Lua.lang.psi.resolve.LuaResolver._resolve(LuaResolver.java:62)      at com.sylvanaar.idea.Lua.lang.psi.resolve.LuaResolver.resolve(LuaResolver.java:24)      at com.sylvanaar.idea.Lua.lang.psi.resolve.LuaResolver.resolve(LuaResolver.java:18)      at com.intellij.psi.impl.source.resolve.ResolveCache$2.compute(ResolveCache.java:114)      at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)      at com.intellij.psi.impl.source.resolve.ResolveCache.a(ResolveCache.java:119)      at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:134)      at com.sylvanaar.idea.Lua.lang.psi.impl.symbols.LuaReferenceElementImpl.multiResolve(LuaReferenceElementImpl.java:130)      at com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference.a(PsiMultiReference.java:60)      at com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference.access$000(PsiMultiReference.java:36)      at com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference$1.compare(PsiMultiReference.java:43)      at com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference$1.compare(PsiMultiReference.java:37)      at java.util.Arrays.mergeSort(Arrays.java:1270)      at java.util.Arrays.sort(Arrays.java:1210)      at com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference.a(PsiMultiReference.java:79)      at com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference.resolve(PsiMultiReference.java:105)      at com.intellij.codeInsight.TargetElementUtilBase.getReferenceOrReferencedElement(TargetElementUtilBase.java:313)      at com.intellij.codeInsight.TargetElementUtil.getReferenceOrReferencedElement(TargetElementUtil.java:96)      at com.intellij.codeInsight.TargetElementUtilBase.findTargetElement(TargetElementUtilBase.java:201)      at com.intellij.codeInsight.TargetElementUtil.findTargetElement(TargetElementUtil.java:61)      at com.intellij.codeInsight.TargetElementUtilBase.findTargetElement(TargetElementUtilBase.java:156)      at com.intellij.openapi.fileEditor.impl.text.TextEditorPsiDataProvider.a(TextEditorPsiDataProvider.java:155)      at com.intellij.openapi.fileEditor.impl.text.TextEditorPsiDataProvider.getData(TextEditorPsiDataProvider.java:59)      at com.intellij.openapi.fileEditor.ex.FileEditorManagerEx.getData(FileEditorManagerEx.java:157)      at com.intellij.openapi.fileEditor.impl.text.TextEditorComponent.getData(TextEditorComponent.java:277)      at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl$PsiAwareTextEditorComponent.getData(PsiAwareTextEditorImpl.java:89)      at com.intellij.ide.impl.DataManagerImpl.a(DataManagerImpl.java:83)      at com.intellij.ide.impl.DataManagerImpl.a(DataManagerImpl.java:73)      at com.intellij.ide.impl.DataManagerImpl.access$300(DataManagerImpl.java:51)      at com.intellij.ide.impl.DataManagerImpl$MyDataContext.b(DataManagerImpl.java:379)      at com.intellij.ide.impl.DataManagerImpl$MyDataContext.getData(DataManagerImpl.java:356)      at com.intellij.openapi.actionSystem.DataKey.getData(DataKey.java:75)      at com.intellij.ide.favoritesTreeView.PsiClassFavoriteNodeProvider.getFavoriteNodes(PsiClassFavoriteNodeProvider.java:55)      at com.intellij.ide.favoritesTreeView.actions.AddToFavoritesAction.getNodesToAdd(AddToFavoritesAction.java:79)      at com.intellij.ide.favoritesTreeView.actions.AddToFavoritesAction.canCreateNodes(AddToFavoritesAction.java:110)      at com.intellij.ide.favoritesTreeView.actions.AddToFavoritesAction.update(AddToFavoritesAction.java:101)      at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:98)      at com.intellij.openapi.actionSystem.impl.Utils.a(Utils.java:165)      at com.intellij.openapi.actionSystem.impl.Utils.updateGroupChild(Utils.java:224)      at com.intellij.openapi.actionSystem.impl.Utils.a(Utils.java:198)      at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:134)      at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:84)      at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:144)      at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:84)      at com.intellij.openapi.actionSystem.impl.Utils.fillMenu(Utils.java:238)      at com.intellij.openapi.actionSystem.impl.ActionMenu.g(ActionMenu.java:264)      at com.intellij.openapi.actionSystem.impl.ActionMenu.access$400(ActionMenu.java:42)      at com.intellij.openapi.actionSystem.impl.ActionMenu$MenuListenerImpl.menuSelected(ActionMenu.java:227)      at javax.swing.JMenu.fireMenuSelected(JMenu.java:1028)      at javax.swing.JMenu$MenuChangeListener.stateChanged(JMenu.java:1107)      at javax.swing.DefaultButtonModel.fireStateChanged(DefaultButtonModel.java:333)      at javax.swing.DefaultButtonModel.setSelected(DefaultButtonModel.java:215)      at javax.swing.JMenu.setSelected(JMenu.java:294)      at javax.swing.JMenu.menuSelectionChanged(JMenu.java:1175)      at com.intellij.openapi.actionSystem.impl.ActionMenu.menuSelectionChanged(ActionMenu.java:201)      at javax.swing.MenuSelectionManager.setSelectedPath(MenuSelectionManager.java:100)      at javax.swing.plaf.basic.BasicMenuUI$Handler.mousePressed(BasicMenuUI.java:434)      at java.awt.Component.processMouseEvent(Component.java:6294)      at javax.swing.JComponent.processMouseEvent(JComponent.java:3275)      at java.awt.Component.processEvent(Component.java:6062)      at java.awt.Container.processEvent(Container.java:2039)      at java.awt.Component.dispatchEventImpl(Component.java:4660)      at java.awt.Container.dispatchEventImpl(Container.java:2097)      at java.awt.Component.dispatchEvent(Component.java:4488)      at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)      at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4233)      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)      at java.awt.Container.dispatchEventImpl(Container.java:2083)      at java.awt.Window.dispatchEventImpl(Window.java:2489)      at java.awt.Component.dispatchEvent(Component.java:4488)      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:668)      at java.awt.EventQueue.access$400(EventQueue.java:81)      at java.awt.EventQueue$2.run(EventQueue.java:627)      at java.awt.EventQueue$2.run(EventQueue.java:625)      at java.security.AccessController.doPrivileged(Native Method)      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)      at java.awt.EventQueue$3.run(EventQueue.java:641)      at java.awt.EventQueue$3.run(EventQueue.java:639)      at java.security.AccessController.doPrivileged(Native Method)      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)      at java.awt.EventQueue.dispatchEvent(EventQueue.java:638)      at com.intellij.ide.IdeEventQueue.d(IdeEventQueue.java:673)      at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:494)      at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:333)      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)      at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)



I don't know why it is happening, but there are the 2 observations I have made. 1) The document commit is running to  commit unsaved changes. This leads to recreation of the stub tree for the current file which is created, serialized out, and then back in..At the same time the code analysis deamon is running, my annotators and inspections run, and then the commit of the document change operation completes sometime during all of this.

I would really lke to put an update to my plugin for IDEA 12. I have been working on it for months - but I am stuck now. I have to come up with some fix for this. In the past I have made a mistake with the stub serialization and with some help from the Jetbrains guys, that got fixed - but the problem never really went away.

Anyhow. If anyone knows anything - or this rings any bells. Please let me know.

Jon S Akhtar (Sylvanaar)
12 comments
Comment actions Permalink

It looks like another problem with custom nodes serializing (similar to
http://youtrack.jetbrains.com/issue/IDEA-91880)
Do stand alone tests for serializing / deserializing your psi work ?

On 12/16/2012 4:42 AM, Jon Akhtar wrote:

  I have been figting an issue where when I modify a document (type some text), This can cause an error in the StubIndex.I have never been able to pinpoint the cause of the error. I must be breaking a basic rule about accessing the index. There are a other strange symptoms. For example, the change markers on the left gutter will track my changes as I type, and indicate which lines have changed. However, I can press keys in such a manner that the change gutters become out of sync with the actual changed lines. (This is typically one of the placees where I experience my errrors)

>

I will have to start docuementing this, and hope that someone can give me some insight as to what I could be doing.

>

This is one of the most common exceptions that occurs (Prior to release of IDEA 12)

>

http://sylvanaar.myjetbrains.com/youtrack/issue/IDLua-771

>

In IDEA 12, it appears that something has changed. I get a different error now.

>

      at java.util.ArrayList.RangeCheck(ArrayList.java:547)
>      at java.util.ArrayList.get(ArrayList.java:322)
>      at com.intellij.psi.stubs.StubSerializationHelper$FileLocalStringEnumerator.valueOf(StubSerializationHelper.java:212)
>      at com.intellij.util.io.StringRef.getString(StringRef.java:51)
>      at com.intellij.util.xml.stubs.FileStub.(FileStub.java:36)
>      at com.intellij.util.xml.stubs.FileStubSerializer.deserialize(FileStubSerializer.java:47)
>      at com.intellij.util.xml.stubs.FileStubSerializer.deserialize(FileStubSerializer.java:27)
>      at com.intellij.psi.stubs.StubSerializationHelper.deserialize(StubSerializationHelper.java:181)
>      at com.intellij.psi.stubs.StubSerializationHelper.deserialize(StubSerializationHelper.java:184)
>      at com.intellij.psi.stubs.StubSerializationHelper.deserialize(StubSerializationHelper.java:184)
>      at com.intellij.psi.stubs.StubSerializationHelper.deserialize(StubSerializationHelper.java:171)
>      at com.intellij.psi.stubs.SerializationManagerImpl.deserialize(SerializationManagerImpl.java:165)
>      at com.intellij.psi.stubs.SerializedStubTree.getStub(SerializedStubTree.java:59)
>      at com.intellij.psi.stubs.StubTreeLoaderImpl.readFromVFile(StubTreeLoaderImpl.java:102)
>      at com.intellij.psi.stubs.StubTreeLoaderImpl.readOrBuild(StubTreeLoaderImpl.java:44)
>      at com.intellij.psi.impl.source.PsiFileImpl.getStubTree(PsiFileImpl.java:672)
>      at com.intellij.psi.stubs.StubIndexImpl$1.perform(StubIndexImpl.java:239)
>      at com.intellij.psi.stubs.StubIndexImpl$1.perform(StubIndexImpl.java:223)
>      at com.intellij.util.indexing.ValueContainer.forEach(ValueContainer.java:60)
>      at com.intellij.psi.stubs.StubIndexImpl.process(StubIndexImpl.java:223)
>      at com.intellij.psi.stubs.StubIndexImpl.get(StubIndexImpl.java:196)
>      at com.intellij.psi.stubs.StubIndexImpl.safeGet(StubIndexImpl.java:508)
>      at com.sylvanaar.idea.Lua.lang.psi.stubs.index.LuaGlobalDeclarationIndex.get(LuaGlobalDeclarationIndex.java:47)
>      at com.sylvanaar.idea.Lua.lang.psi.resolve.LuaResolver._resolve(LuaResolver.java:62)
>      at com.sylvanaar.idea.Lua.lang.psi.resolve.LuaResolver.resolve(LuaResolver.java:24)
>      at com.sylvanaar.idea.Lua.lang.psi.resolve.LuaResolver.resolve(LuaResolver.java:18)
>      at com.intellij.psi.impl.source.resolve.ResolveCache$2.compute(ResolveCache.java:114)
>      at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
>      at com.intellij.psi.impl.source.resolve.ResolveCache.a(ResolveCache.java:119)
>      at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:134)
>      at com.sylvanaar.idea.Lua.lang.psi.impl.symbols.LuaReferenceElementImpl.multiResolve(LuaReferenceElementImpl.java:130)
>      at com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference.a(PsiMultiReference.java:60)
>      at com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference.access$000(PsiMultiReference.java:36)
>      at com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference$1.compare(PsiMultiReference.java:43)
>      at com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference$1.compare(PsiMultiReference.java:37)
>      at java.util.Arrays.mergeSort(Arrays.java:1270)
>      at java.util.Arrays.sort(Arrays.java:1210)
>      at com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference.a(PsiMultiReference.java:79)
>      at com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference.resolve(PsiMultiReference.java:105)
>      at com.intellij.codeInsight.TargetElementUtilBase.getReferenceOrReferencedElement(TargetElementUtilBase.java:313)
>      at com.intellij.codeInsight.TargetElementUtil.getReferenceOrReferencedElement(TargetElementUtil.java:96)
>      at com.intellij.codeInsight.TargetElementUtilBase.findTargetElement(TargetElementUtilBase.java:201)
>      at com.intellij.codeInsight.TargetElementUtil.findTargetElement(TargetElementUtil.java:61)
>      at com.intellij.codeInsight.TargetElementUtilBase.findTargetElement(TargetElementUtilBase.java:156)
>      at com.intellij.openapi.fileEditor.impl.text.TextEditorPsiDataProvider.a(TextEditorPsiDataProvider.java:155)
>      at com.intellij.openapi.fileEditor.impl.text.TextEditorPsiDataProvider.getData(TextEditorPsiDataProvider.java:59)
>      at com.intellij.openapi.fileEditor.ex.FileEditorManagerEx.getData(FileEditorManagerEx.java:157)
>      at com.intellij.openapi.fileEditor.impl.text.TextEditorComponent.getData(TextEditorComponent.java:277)
>      at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl$PsiAwareTextEditorComponent.getData(PsiAwareTextEditorImpl.java:89)
>      at com.intellij.ide.impl.DataManagerImpl.a(DataManagerImpl.java:83)
>      at com.intellij.ide.impl.DataManagerImpl.a(DataManagerImpl.java:73)
>      at com.intellij.ide.impl.DataManagerImpl.access$300(DataManagerImpl.java:51)
>      at com.intellij.ide.impl.DataManagerImpl$MyDataContext.b(DataManagerImpl.java:379)
>      at com.intellij.ide.impl.DataManagerImpl$MyDataContext.getData(DataManagerImpl.java:356)
>      at com.intellij.openapi.actionSystem.DataKey.getData(DataKey.java:75)
>      at com.intellij.codeEditor.printing.ExportToHTMLAction.update(ExportToHTMLAction.java:49)
>      at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:98)
>      at com.intellij.openapi.actionSystem.impl.Utils.a(Utils.java:165)
>      at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:124)
>      at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:84)
>      at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:144)
>      at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:84)
>      at com.intellij.openapi.actionSystem.impl.Utils.fillMenu(Utils.java:238)
>      at com.intellij.openapi.actionSystem.impl.ActionMenu.g(ActionMenu.java:264)
>      at com.intellij.openapi.actionSystem.impl.ActionMenu.access$400(ActionMenu.java:42)
>      at com.intellij.openapi.actionSystem.impl.ActionMenu$MenuListenerImpl.menuSelected(ActionMenu.java:227)
>      at javax.swing.JMenu.fireMenuSelected(JMenu.java:1028)
>      at javax.swing.JMenu$MenuChangeListener.stateChanged(JMenu.java:1107)
>      at javax.swing.DefaultButtonModel.fireStateChanged(DefaultButtonModel.java:333)
>      at javax.swing.DefaultButtonModel.setSelected(DefaultButtonModel.java:215)
>      at javax.swing.JMenu.setSelected(JMenu.java:294)
>      at javax.swing.JMenu.menuSelectionChanged(JMenu.java:1175)
>      at com.intellij.openapi.actionSystem.impl.ActionMenu.menuSelectionChanged(ActionMenu.java:201)
>      at javax.swing.MenuSelectionManager.setSelectedPath(MenuSelectionManager.java:100)
>      at javax.swing.plaf.basic.BasicMenuUI$Handler.mousePressed(BasicMenuUI.java:434)
>      at java.awt.Component.processMouseEvent(Component.java:6294)
>      at javax.swing.JComponent.processMouseEvent(JComponent.java:3275)
>      at java.awt.Component.processEvent(Component.java:6062)
>      at java.awt.Container.processEvent(Container.java:2039)
>      at java.awt.Component.dispatchEventImpl(Component.java:4660)
>      at java.awt.Container.dispatchEventImpl(Container.java:2097)
>      at java.awt.Component.dispatchEvent(Component.java:4488)
>      at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
>      at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4233)
>      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
>      at java.awt.Container.dispatchEventImpl(Container.java:2083)
>      at java.awt.Window.dispatchEventImpl(Window.java:2489)
>      at java.awt.Component.dispatchEvent(Component.java:4488)
>      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:668)
>      at java.awt.EventQueue.access$400(EventQueue.java:81)
>      at java.awt.EventQueue$2.run(EventQueue.java:627)
>      at java.awt.EventQueue$2.run(EventQueue.java:625)
>      at java.security.AccessController.doPrivileged(Native Method)
>      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
>      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
>      at java.awt.EventQueue$3.run(EventQueue.java:641)
>      at java.awt.EventQueue$3.run(EventQueue.java:639)
>      at java.security.AccessController.doPrivileged(Native Method)
>      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
>      at java.awt.EventQueue.dispatchEvent(EventQueue.java:638)
>      at com.intellij.ide.IdeEventQueue.d(IdeEventQueue.java:673)
>      at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:494)
>      at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:333)
>      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
>      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
>      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
>      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
>      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
>      at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)]]>

>
>

      at java.util.ArrayList.RangeCheck(ArrayList.java:547)
>      at java.util.ArrayList.get(ArrayList.java:322)
>      at com.intellij.psi.stubs.StubSerializationHelper$FileLocalStringEnumerator.valueOf(StubSerializationHelper.java:212)
>      at com.intellij.util.io.StringRef.getString(StringRef.java:51)
>      at com.intellij.util.xml.stubs.FileStub.(FileStub.java:36)
>      at com.intellij.util.xml.stubs.FileStubSerializer.deserialize(FileStubSerializer.java:47)
>      at com.intellij.util.xml.stubs.FileStubSerializer.deserialize(FileStubSerializer.java:27)
>      at com.intellij.psi.stubs.StubSerializationHelper.deserialize(StubSerializationHelper.java:181)
>      at com.intellij.psi.stubs.StubSerializationHelper.deserialize(StubSerializationHelper.java:184)
>      at com.intellij.psi.stubs.StubSerializationHelper.deserialize(StubSerializationHelper.java:184)
>      at com.intellij.psi.stubs.StubSerializationHelper.deserialize(StubSerializationHelper.java:171)
>      at com.intellij.psi.stubs.SerializationManagerImpl.deserialize(SerializationManagerImpl.java:165)
>      at com.intellij.psi.stubs.SerializedStubTree.getStub(SerializedStubTree.java:59)
>      at com.intellij.psi.stubs.StubTreeLoaderImpl.readFromVFile(StubTreeLoaderImpl.java:102)
>      at com.intellij.psi.stubs.StubTreeLoaderImpl.readOrBuild(StubTreeLoaderImpl.java:44)
>      at com.intellij.psi.impl.source.PsiFileImpl.getStubTree(PsiFileImpl.java:672)
>      at com.intellij.psi.stubs.StubIndexImpl$1.perform(StubIndexImpl.java:239)
>      at com.intellij.psi.stubs.StubIndexImpl$1.perform(StubIndexImpl.java:223)
>      at com.intellij.util.indexing.ValueContainer.forEach(ValueContainer.java:60)
>      at com.intellij.psi.stubs.StubIndexImpl.process(StubIndexImpl.java:223)
>      at com.intellij.psi.stubs.StubIndexImpl.get(StubIndexImpl.java:196)
>      at com.intellij.psi.stubs.StubIndexImpl.safeGet(StubIndexImpl.java:508)
>      at com.sylvanaar.idea.Lua.lang.psi.stubs.index.LuaGlobalDeclarationIndex.get(LuaGlobalDeclarationIndex.java:47)
>      at com.sylvanaar.idea.Lua.lang.psi.resolve.LuaResolver._resolve(LuaResolver.java:62)
>      at com.sylvanaar.idea.Lua.lang.psi.resolve.LuaResolver.resolve(LuaResolver.java:24)
>      at com.sylvanaar.idea.Lua.lang.psi.resolve.LuaResolver.resolve(LuaResolver.java:18)
>      at com.intellij.psi.impl.source.resolve.ResolveCache$2.compute(ResolveCache.java:114)
>      at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
>      at com.intellij.psi.impl.source.resolve.ResolveCache.a(ResolveCache.java:119)
>      at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:134)
>      at com.sylvanaar.idea.Lua.lang.psi.impl.symbols.LuaReferenceElementImpl.multiResolve(LuaReferenceElementImpl.java:130)
>      at com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference.a(PsiMultiReference.java:60)
>      at com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference.access$000(PsiMultiReference.java:36)
>      at com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference$1.compare(PsiMultiReference.java:43)
>      at com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference$1.compare(PsiMultiReference.java:37)
>      at java.util.Arrays.mergeSort(Arrays.java:1270)
>      at java.util.Arrays.sort(Arrays.java:1210)
>      at com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference.a(PsiMultiReference.java:79)
>      at com.intellij.psi.impl.source.resolve.reference.impl.PsiMultiReference.resolve(PsiMultiReference.java:105)
>      at com.intellij.codeInsight.TargetElementUtilBase.getReferenceOrReferencedElement(TargetElementUtilBase.java:313)
>      at com.intellij.codeInsight.TargetElementUtil.getReferenceOrReferencedElement(TargetElementUtil.java:96)
>      at com.intellij.codeInsight.TargetElementUtilBase.findTargetElement(TargetElementUtilBase.java:201)
>      at com.intellij.codeInsight.TargetElementUtil.findTargetElement(TargetElementUtil.java:61)
>      at com.intellij.codeInsight.TargetElementUtilBase.findTargetElement(TargetElementUtilBase.java:156)
>      at com.intellij.openapi.fileEditor.impl.text.TextEditorPsiDataProvider.a(TextEditorPsiDataProvider.java:155)
>      at com.intellij.openapi.fileEditor.impl.text.TextEditorPsiDataProvider.getData(TextEditorPsiDataProvider.java:59)
>      at com.intellij.openapi.fileEditor.ex.FileEditorManagerEx.getData(FileEditorManagerEx.java:157)
>      at com.intellij.openapi.fileEditor.impl.text.TextEditorComponent.getData(TextEditorComponent.java:277)
>      at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl$PsiAwareTextEditorComponent.getData(PsiAwareTextEditorImpl.java:89)
>      at com.intellij.ide.impl.DataManagerImpl.a(DataManagerImpl.java:83)
>      at com.intellij.ide.impl.DataManagerImpl.a(DataManagerImpl.java:73)
>      at com.intellij.ide.impl.DataManagerImpl.access$300(DataManagerImpl.java:51)
>      at com.intellij.ide.impl.DataManagerImpl$MyDataContext.b(DataManagerImpl.java:379)
>      at com.intellij.ide.impl.DataManagerImpl$MyDataContext.getData(DataManagerImpl.java:356)
>      at com.intellij.openapi.actionSystem.DataKey.getData(DataKey.java:75)
>      at com.intellij.ide.favoritesTreeView.PsiClassFavoriteNodeProvider.getFavoriteNodes(PsiClassFavoriteNodeProvider.java:55)
>      at com.intellij.ide.favoritesTreeView.actions.AddToFavoritesAction.getNodesToAdd(AddToFavoritesAction.java:79)
>      at com.intellij.ide.favoritesTreeView.actions.AddToFavoritesAction.canCreateNodes(AddToFavoritesAction.java:110)
>      at com.intellij.ide.favoritesTreeView.actions.AddToFavoritesAction.update(AddToFavoritesAction.java:101)
>      at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:98)
>      at com.intellij.openapi.actionSystem.impl.Utils.a(Utils.java:165)
>      at com.intellij.openapi.actionSystem.impl.Utils.updateGroupChild(Utils.java:224)
>      at com.intellij.openapi.actionSystem.impl.Utils.a(Utils.java:198)
>      at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:134)
>      at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:84)
>      at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:144)
>      at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:84)
>      at com.intellij.openapi.actionSystem.impl.Utils.fillMenu(Utils.java:238)
>      at com.intellij.openapi.actionSystem.impl.ActionMenu.g(ActionMenu.java:264)
>      at com.intellij.openapi.actionSystem.impl.ActionMenu.access$400(ActionMenu.java:42)
>      at com.intellij.openapi.actionSystem.impl.ActionMenu$MenuListenerImpl.menuSelected(ActionMenu.java:227)
>      at javax.swing.JMenu.fireMenuSelected(JMenu.java:1028)
>      at javax.swing.JMenu$MenuChangeListener.stateChanged(JMenu.java:1107)
>      at javax.swing.DefaultButtonModel.fireStateChanged(DefaultButtonModel.java:333)
>      at javax.swing.DefaultButtonModel.setSelected(DefaultButtonModel.java:215)
>      at javax.swing.JMenu.setSelected(JMenu.java:294)
>      at javax.swing.JMenu.menuSelectionChanged(JMenu.java:1175)
>      at com.intellij.openapi.actionSystem.impl.ActionMenu.menuSelectionChanged(ActionMenu.java:201)
>      at javax.swing.MenuSelectionManager.setSelectedPath(MenuSelectionManager.java:100)
>      at javax.swing.plaf.basic.BasicMenuUI$Handler.mousePressed(BasicMenuUI.java:434)
>      at java.awt.Component.processMouseEvent(Component.java:6294)
>      at javax.swing.JComponent.processMouseEvent(JComponent.java:3275)
>      at java.awt.Component.processEvent(Component.java:6062)
>      at java.awt.Container.processEvent(Container.java:2039)
>      at java.awt.Component.dispatchEventImpl(Component.java:4660)
>      at java.awt.Container.dispatchEventImpl(Container.java:2097)
>      at java.awt.Component.dispatchEvent(Component.java:4488)
>      at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
>      at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4233)
>      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
>      at java.awt.Container.dispatchEventImpl(Container.java:2083)
>      at java.awt.Window.dispatchEventImpl(Window.java:2489)
>      at java.awt.Component.dispatchEvent(Component.java:4488)
>      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:668)
>      at java.awt.EventQueue.access$400(EventQueue.java:81)
>      at java.awt.EventQueue$2.run(EventQueue.java:627)
>      at java.awt.EventQueue$2.run(EventQueue.java:625)
>      at java.security.AccessController.doPrivileged(Native Method)
>      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
>      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
>      at java.awt.EventQueue$3.run(EventQueue.java:641)
>      at java.awt.EventQueue$3.run(EventQueue.java:639)
>      at java.security.AccessController.doPrivileged(Native Method)
>      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
>      at java.awt.EventQueue.dispatchEvent(EventQueue.java:638)
>      at com.intellij.ide.IdeEventQueue.d(IdeEventQueue.java:673)
>      at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:494)
>      at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:333)
>      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
>      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
>      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
>      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
>      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
>      at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)]]>

>

I don't know why it is happening, but there are the 2 observations I have made. 1) The document commit is running to  commit unsaved changes. This leads to recreation of the stub tree for the current file which is created, serialized out, and then back in..At the same time the code analysis deamon is running, my annotators and inspections run, and then the commit of the document change operation completes sometime during all of this.

>

I would really lke to put an update to my plugin for IDEA 12. I have been working on it for months - but I am stuck now. I have to come up with some fix for this. In the past I have made a mistake with the stub serialization and with some help from the Jetbrains guys, that got fixed - but the problem never really went away.

>

Anyhow. If anyone knows anything - or this rings any bells. Please let me know.

>

Jon S Akhtar (Sylvanaar)

>

---
Original message URL: http://devnet.jetbrains.net/message/5474130#5474130

>

0
Comment actions Permalink

Maxim,

The tests I have don't show any serialization issues stand-alone. It seems only to happen during runtime, and basically it reads past the end of the serialized stub tree, and every time it thinks there is an XML file stub there. It could be that I just haven't figured out how to recreate the serialization failure stand-alone yet.

Do you have any suggestions on how to debug issues like these? If you think it is still likely a serialization issue. I will go back and run additional tests. I have almost completely rewritten my serialization code since we last looked into this, and I don't want to take up your time until I am completely positive that the issue lies elsewhere.

0
Comment actions Permalink

Wish I had something better to report, but I have gotten nowhere with almost everything I have done.

I am about to thrown in the towel, because I am not sure how I am goiing to resurect my plugin which has become so broken due to this ongoing error, and my attempts to fix it.

If you feel like looking at it. https://github.com/sylvanaar/IDLua

0
Comment actions Permalink

Please bring more details on reproduction steps

On 1/13/2013 6:34 AM, Jon Akhtar wrote:

Wish I had something better to report, but I have gotten nowhere with almost everything I have done.

>

I am about to thrown in the towel, because I am not sure how I am goiing to resurect my plugin which has become so broken due to this ongoing error, and my attempts to fix it.

>

If you feel like looking at it. https://github.com/sylvanaar/IDLua

>

---
Original message URL: http://devnet.jetbrains.net/message/5476070#5476070

>

0
Comment actions Permalink

Sure thing. After work today I can get you reproduction steps...I really want to get this fixed.

0
Comment actions Permalink

Maxim,

John Lindquest engaged Dmitry Avdeev to help me on this. I supplied the details to him. Thanks so much for your guys helping me on this.

0
Comment actions Permalink

Hi
LuaStubModuleDeclarationType serialization (lines 75) uses
write(int len) where len is size of encoded type, in case when len is
greater than one byte limit (> 255) then deserializer can not read array
size back properly (line 85) and subsequent serialization fails reading
wrong data.

Please use writeInt/readInt for storing / retrieving size of the array.

I suspect there are many cases when the error may be present.


Btw, your FileStubElementType is not registered for serialization in
LuaElementTypes

On 1/18/2013 4:51 PM, Jon Akhtar wrote:

Maxim,

>

John Lindquest engaged Dmitry Avdeev to help me on this. I supplied the details to him. Thanks so much for your guys helping me on this.

>

---
Original message URL: http://devnet.jetbrains.net/message/5476607#5476607

>

0
Comment actions Permalink

You are right. I don't use readINT and writeINT...oh wow! This will make my day if that is all it was.

0
Comment actions Permalink

Another thing to keep in mind: It's important that the stub contents must only depend on the contents of the file being indexed. I see that you're storing Lua types in your stubs. I wasn't able to understand whether you're using cross-file resolve to calculate the types, but if you do, that'll need to be changed, because otherwise you will have incorrect data in the stubs.

0
Comment actions Permalink

Thanks Maxim. I have been beating my head against this for months. Switching to writeVarInt and readVarInt cleared up the errors. Thank you so much.

0
Comment actions Permalink

Dmitry,

Thanks. I'll keep that in mind. I was still in the middle of writing the type inference code, so I am learning as I go. Most of the types are calculated in the file they are in. There may be some cross file resolve going on though - you are right. Now that I am past this serializer issue I can start cleaning things up a bit.

0
Comment actions Permalink

I just want to thank you guys again for the help. My plugin is now working (both the IDEA 11 and 12 versions). This bug had been plaguging me for almost 6 months, and without your help I don't think I would have had the tenacity to find it given the limited amount of free time I have available due to work commitments, and my trying to add features and keep up with your internal development at the same time.

I am very pleased that my plugin is again working (with new features!) and that the couple years I have spent developing it has not gone to waste. This is once again a reminder why I love working with your company so much.

Regards,

Jon

0

Please sign in to leave a comment.