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

Uncaught Exception #70

Closed
Aaronmacaron opened this issue Nov 26, 2018 · 6 comments
Closed

Uncaught Exception #70

Aaronmacaron opened this issue Nov 26, 2018 · 6 comments
Assignees

Comments

@Aaronmacaron
Copy link

Hi

The CSV plugin throws an Exception in Version v2.0.0.

Plugin Version

v2.0.0

IDE Environment

PhpStorm 2018.2.2
Build #PS-182.4129.45, built on August 22, 2018
Licensed to XXX
Subscription is active until XXX
For educational use only.
JRE: 1.8.0_152-release-1248-b8 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

Details

This has happened multiple times since I updated to v2.0.0 of your plugin.

Stacktrace

java.lang.ClassCastException: com.intellij.psi.impl.source.PsiPlainTextFileImpl cannot be cast to net.seesharpsoft.intellij.plugins.csv.psi.CsvFile
	at net.seesharpsoft.intellij.plugins.csv.editor.table.CsvTableEditor.<init>(CsvTableEditor.java:57)
	at net.seesharpsoft.intellij.plugins.csv.editor.table.swing.CsvTableEditorSwing.<init>(CsvTableEditorSwing.java:61)
	at net.seesharpsoft.intellij.plugins.csv.editor.table.CsvTableEditorProvider$1.build(CsvTableEditorProvider.java:71)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.a(FileEditorManagerImpl.java:857)
	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:315)
	at com.intellij.openapi.application.impl.LaterInvocator$1.run(LaterInvocator.java:156)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.a(LaterInvocator.java:447)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.a(LaterInvocator.java:431)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:415)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
	at java.awt.EventQueue.access$500(EventQueue.java:98)
	at java.awt.EventQueue$3.run(EventQueue.java:715)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
	at com.intellij.ide.IdeEventQueue.c(IdeEventQueue.java:781)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:722)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382)
	at com.intellij.ide.IdeEventQueue.pumpEventsForHierarchy(IdeEventQueue.java:864)
	at com.intellij.openapi.progress.util.ProgressWindow.startBlocking(ProgressWindow.java:205)
	at com.intellij.openapi.progress.util.ProgressWindow.startBlocking(ProgressWindow.java:191)
	at com.intellij.openapi.application.impl.ApplicationImpl.runProcessWithProgressSynchronously(ApplicationImpl.java:588)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcessWithProgressSynchronously(CoreProgressManager.java:446)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcessWithProgressSynchronously(ProgressManagerImpl.java:109)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcessWithProgressSynchronously(CoreProgressManager.java:250)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcessWithProgressSynchronously(CoreProgressManager.java:203)
	at com.intellij.openapi.project.impl.ProjectManagerImpl.a(ProjectManagerImpl.java:439)
	at com.intellij.openapi.project.impl.ProjectManagerImpl.openProject(ProjectManagerImpl.java:414)
	at com.intellij.platform.PlatformProjectOpenProcessor.doOpenProject(PlatformProjectOpenProcessor.java:245)
	at com.intellij.ide.RecentProjectsManagerBase.doOpenProject(RecentProjectsManagerBase.java:579)
	at com.intellij.ide.RecentProjectsManagerBase.doReopenLastProject(RecentProjectsManagerBase.java:706)
	at com.intellij.ide.RecentProjectsManagerBase$MyAppLifecycleListener.appStarting(RecentProjectsManagerBase.java:748)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:117)
	at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:426)
	at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:387)
	at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:376)
	at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:357)
	at com.intellij.util.messages.impl.MessageBusImpl.access$200(MessageBusImpl.java:43)
	at com.intellij.util.messages.impl.MessageBusImpl$2.invoke(MessageBusImpl.java:208)
	at com.sun.proxy.$Proxy50.appStarting(Unknown Source)
	at com.intellij.idea.IdeaApplication$IdeStarter.a(IdeaApplication.java:374)
	at com.intellij.openapi.application.TransactionGuardImpl.a(TransactionGuardImpl.java:88)
	at com.intellij.openapi.application.TransactionGuardImpl.a(TransactionGuardImpl.java:111)
	at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:120)
	at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:122)
	at com.intellij.idea.IdeaApplication$IdeStarter.main(IdeaApplication.java:372)
	at com.intellij.idea.IdeaApplication.a(IdeaApplication.java:212)
	at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:195)
	at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:212)
	at com.intellij.idea.IdeaApplication.a(IdeaApplication.java:75)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
	at java.awt.EventQueue.access$500(EventQueue.java:98)
	at java.awt.EventQueue$3.run(EventQueue.java:715)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:361)
	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)
SeeSharpSoft added a commit that referenced this issue Nov 26, 2018
@SeeSharpSoft
Copy link
Owner

@Aaronmacaron Thanks for reporting! Unfortunately I can not reproduce the issue with PhpStorm 2018.3 - though I somewhat doubt that it is about the different version.

It seems that it happens on IDE startup, right? Does it only happen if you have a CSV file open? Does it happen with .csv or .tsv? Does the error occur every time you open the project/IDE? What happens afterwards: Can you open a CSV file? If yes, is the Table Editor tab available?

I just made the implementation more failsafe with regards to this concrete exception (see related PR). However, preventing this exception doesn't resolve the actual problem not having a net.seesharpsoft.intellij.plugins.csv.psi.CsvFile instance - which I have no clue about yet. Further tips, infos and hints are very welcome!

@SeeSharpSoft
Copy link
Owner

Update: I just had a quick look into JetBrains issue-tracker and stumbled across those two: https://youtrack.jetbrains.com/issue/KT-22669
https://youtrack.jetbrains.com/issue/GO-6144

It seems to be the very same issue (that exists at least since 2018.1.3) has been resolved with 2018.3 (or even 2018.2.4 if I saw it right). I will double check if the issue was resolved within Kotlin/GoLand plugins only or if its root cause is the IDE itself.

@Aaronmacaron
Copy link
Author

Aaronmacaron commented Nov 26, 2018

Thanks for investigating this issue.

I'll provide you with the requested information on thursday.

@SeeSharpSoft
Copy link
Owner

SeeSharpSoft commented Nov 26, 2018

@Aaronmacaron I got a very helpful answer to my comment to https://youtrack.jetbrains.com/issue/GO-6144 and could reproduce the issue, which occurs if the CSV file hits a certain size limit.

The fix will be available with the next release of the CSV plugin.

@SeeSharpSoft SeeSharpSoft self-assigned this Nov 26, 2018
@xgflorin
Copy link

xgflorin commented Nov 29, 2018

If it helps, I ran into the same issue with WebStorm on Mac.

CSV Plugin 2.0.0

WebStorm 2018.3
Build #WS-183.4284.130, built on November 19, 2018
JRE: 1.8.0_152-release-1343-b15 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.1

I want to add that BEFORE I UPDATED THE PLUGIN I already had opened a large file (over 6 MB) and WebStorm already complained about its size and warned me that Code Insight was disabled. I received the notification that a new version of the CSV plugin was available, so I did the update to 2.0.0, but after WebStorm restarted it failed to reopen my project and showed me the following error:

java.lang.ClassCastException: com.intellij.psi.impl.source.PsiPlainTextFileImpl cannot be cast to net.seesharpsoft.intellij.plugins.csv.psi.CsvFile
	at net.seesharpsoft.intellij.plugins.csv.editor.table.CsvTableEditor.<init>(CsvTableEditor.java:57)
	at net.seesharpsoft.intellij.plugins.csv.editor.table.swing.CsvTableEditorSwing.<init>(CsvTableEditorSwing.java:61)
	at net.seesharpsoft.intellij.plugins.csv.editor.table.CsvTableEditorProvider$1.build(CsvTableEditorProvider.java:71)
	at net.seesharpsoft.intellij.plugins.csv.editor.table.CsvTableEditorProvider.createEditor(CsvTableEditorProvider.java:48)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.dumbModeFinished(FileEditorManagerImpl.java:195)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.access$300(FileEditorManagerImpl.java:99)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl$2.lambda$exitDumbMode$0(FileEditorManagerImpl.java:157)
	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:315)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:435)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:419)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:403)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
	at java.awt.EventQueue.access$500(EventQueue.java:98)
	at java.awt.EventQueue$3.run(EventQueue.java:715)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:719)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:668)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:363)
	at com.intellij.cloudConfig.CloudConfigManager.waitDone(CloudConfigManager.java:1370)
	at com.intellij.cloudConfig.CloudConfigManager.getRepositoryPlugins(CloudConfigManager.java:1354)
	at com.intellij.cloudConfig.CloudConfigManager.getInstalledPlugins(CloudConfigManager.java:1329)
	at com.intellij.cloudConfig.CloudConfigManager.updatePlugins(CloudConfigManager.java:1425)
	at com.intellij.cloudConfig.CloudConfigManager.safeUpdatePlugins(CloudConfigManager.java:1379)
	at com.intellij.cloudConfig.CloudConfigManager.lambda$doConnection$11(CloudConfigManager.java:616)
	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:315)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:435)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:419)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:403)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
	at java.awt.EventQueue.access$500(EventQueue.java:98)
	at java.awt.EventQueue$3.run(EventQueue.java:715)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:719)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:668)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:363)
	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)

Edit: I disabled the plugin, restarted WebStorm and the project opened this time.

@SeeSharpSoft
Copy link
Owner

Fix included in upcoming release 2.0.1

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

No branches or pull requests

3 participants