question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exception when editing code.

See original GitHub issue

I wasn’t even doing much of noteworthy. I created a new file, as was manually moving some code around. If you have any more questions, I’d be happy to answer if I can.

parentByStub must not be null
java.lang.IllegalStateException: parentByStub must not be null
    at org.rust.lang.core.psi.impl.RustStubbedElementImpl.getParent(RustStubbedElementImpl.kt:18)
    at com.intellij.psi.impl.PsiElementBase.isValid(PsiElementBase.java:254)
    at com.intellij.extapi.psi.StubBasedPsiElementBase.isValid(StubBasedPsiElementBase.java:278)
    at com.intellij.psi.impl.PsiElementBase.isValid(PsiElementBase.java:258)
    at com.intellij.psi.impl.PsiElementBase.isValid(PsiElementBase.java:258)
    at com.intellij.extapi.psi.StubBasedPsiElementBase.isValid(StubBasedPsiElementBase.java:278)
    at com.intellij.psi.impl.PsiElementBase.isValid(PsiElementBase.java:258)
    at com.intellij.psi.impl.PsiElementBase.isValid(PsiElementBase.java:258)
    at com.intellij.psi.impl.PsiElementBase.isValid(PsiElementBase.java:258)
    at com.intellij.psi.impl.PsiElementBase.isValid(PsiElementBase.java:258)
    at com.intellij.psi.impl.PsiElementBase.isValid(PsiElementBase.java:258)
    at com.intellij.psi.impl.PsiElementBase.isValid(PsiElementBase.java:258)
    at com.intellij.psi.impl.PsiElementBase.isValid(PsiElementBase.java:258)
    at com.intellij.psi.impl.PsiElementBase.isValid(PsiElementBase.java:258)
    at com.intellij.psi.impl.PsiElementBase.isValid(PsiElementBase.java:258)
    at com.intellij.psi.impl.smartPointers.SmartPointerManagerImpl.updatePointerTarget(SmartPointerManagerImpl.java:260)
    at com.intellij.psi.impl.smartPointers.SmartPointerManagerImpl.updatePointerTargetsAfterReparse(SmartPointerManagerImpl.java:251)
    at com.intellij.psi.impl.PsiDocumentManagerBase.finishCommitInWriteAction(PsiDocumentManagerBase.java:344)
    at com.intellij.psi.impl.PsiDocumentManagerImpl.finishCommitInWriteAction(PsiDocumentManagerImpl.java:143)
    at com.intellij.psi.impl.PsiDocumentManagerBase$3.run(PsiDocumentManagerBase.java:298)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1010)
    at com.intellij.psi.impl.PsiDocumentManagerBase.finishCommit(PsiDocumentManagerBase.java:295)
    at com.intellij.psi.impl.DocumentCommitThread$5.run(DocumentCommitThread.java:528)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:337)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:321)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
    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$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:866)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:654)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:381)
    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)



java.lang.IllegalStateException: parentByStub must not be null
    at org.rust.lang.core.psi.impl.RustStubbedElementImpl.getParent(RustStubbedElementImpl.kt:18)
    at com.intellij.psi.impl.PsiElementBase.isValid(PsiElementBase.java:254)
    at com.intellij.extapi.psi.StubBasedPsiElementBase.isValid(StubBasedPsiElementBase.java:278)
    at com.intellij.psi.impl.PsiElementBase.isValid(PsiElementBase.java:258)
    at com.intellij.psi.impl.PsiElementBase.isValid(PsiElementBase.java:258)
    at com.intellij.extapi.psi.StubBasedPsiElementBase.isValid(StubBasedPsiElementBase.java:278)
    at com.intellij.psi.impl.PsiElementBase.isValid(PsiElementBase.java:258)
    at com.intellij.psi.impl.PsiElementBase.isValid(PsiElementBase.java:258)
    at com.intellij.psi.impl.PsiElementBase.isValid(PsiElementBase.java:258)
    at com.intellij.psi.impl.PsiElementBase.isValid(PsiElementBase.java:258)
    at com.intellij.psi.impl.PsiElementBase.isValid(PsiElementBase.java:258)
    at com.intellij.psi.impl.PsiElementBase.isValid(PsiElementBase.java:258)
    at com.intellij.psi.impl.PsiElementBase.isValid(PsiElementBase.java:258)
    at com.intellij.psi.impl.PsiElementBase.isValid(PsiElementBase.java:258)
    at com.intellij.psi.impl.PsiElementBase.isValid(PsiElementBase.java:258)
    at com.intellij.psi.impl.smartPointers.SmartPointerManagerImpl.updatePointerTarget(SmartPointerManagerImpl.java:260)
    at com.intellij.psi.impl.smartPointers.SmartPointerManagerImpl.updatePointerTargetsAfterReparse(SmartPointerManagerImpl.java:251)
    at com.intellij.psi.impl.PsiDocumentManagerBase.finishCommitInWriteAction(PsiDocumentManagerBase.java:344)
    at com.intellij.psi.impl.PsiDocumentManagerImpl.finishCommitInWriteAction(PsiDocumentManagerImpl.java:143)
    at com.intellij.psi.impl.PsiDocumentManagerBase$3.run(PsiDocumentManagerBase.java:298)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1010)
    at com.intellij.psi.impl.PsiDocumentManagerBase.finishCommit(PsiDocumentManagerBase.java:295)
    at com.intellij.psi.impl.DocumentCommitThread$5.run(DocumentCommitThread.java:528)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:337)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:321)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
    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$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:866)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:654)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:381)
    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)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
matkladcommented, Aug 24, 2016

I failed to reproduce this issue exactly, but parentByStub was definitely broken (#613). It is now fixed, so I hope this issue is also resolved. The fix is included in the latest nightly.

I’ll close this, but please reopen if you still see the issue after the update!

0reactions
zummenixcommented, Aug 27, 2016

@matklad, no, I haven’t.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Manage exceptions with the debugger in Visual Studio
Visual Studio Code. An exception is an indication of an error state that occurs while a program is being executed. You can tell...
Read more >
Unhandled exception breaks the editing in VS Code #3566
When unhandled Flutter Exception happens, it breaks the editing capabilities e.g. you cannot delete text, use some shortcuts, and you can only ...
Read more >
Enable editing after an unhandled exception in Visual Studio ...
In VS2017 the old "Enable Editing" is hidden and triggered automatically. While debugging, I'm able to edit the code / variables after unhandled ......
Read more >
Invalid cast exception whilst editing code
I keep receiving an invalid cast exception whilst editing code. ... InvalidCastException: Unable to cast COM object of type System.__ComObject to interface ...
Read more >
What is Exception Handling? - SearchSoftwareQuality
Exceptions occur for numerous reasons, including invalid user input, code errors, device failure, the loss of a network connection, insufficient memory to run ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found