obiscr / ExcelEditor

This plugin is an Enhanced Edition of ExcelReader. Has all the features of ExcelReader.
https://plugins.jetbrains.com/plugin/18663-exceleditor
0 stars 0 forks source link

Cannot read field "parent" because "comp" is null #10

Open marisveide opened 1 month ago

marisveide commented 1 month ago

When trying to compare the Excel file with its version from the master branch, getting error: Cannot read field "parent" because "comp" is null.

Fails to compare the file with the error:

java.lang.NullPointerException: Cannot read field "parent" because "comp" is null at java.desktop/java.awt.Container.addImpl(Container.java:1121) at java.desktop/java.awt.Container.add(Container.java:1001) at com.github.obiscr.exceleditor.ui.b.a.a.(a.java:76) at com.github.obiscr.exceleditor.ui.b.a.ExcelDiffTool.createViewer(ExcelDiffTool.java:30) at com.github.obiscr.exceleditor.ui.b.a.ExcelDiffTool.createComponent(ExcelDiffTool.java:24) at com.intellij.diff.impl.DiffRequestProcessor.createState(DiffRequestProcessor.java:362) at com.intellij.diff.impl.DiffRequestProcessor.lambda$doApplyRequest$5(DiffRequestProcessor.java:441) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeNonCancelableSection$3(CoreProgressManager.java:269) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:735) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:691) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$computeInNonCancelableSection$4(CoreProgressManager.java:277) at com.intellij.openapi.progress.Cancellation.computeInNonCancelableSection(Cancellation.java:62) at com.intellij.openapi.progress.impl.CoreProgressManager.computeInNonCancelableSection(CoreProgressManager.java:277) at com.intellij.openapi.progress.impl.CoreProgressManager.executeNonCancelableSection(CoreProgressManager.java:268) at com.intellij.diff.impl.DiffRequestProcessor.lambda$doApplyRequest$6(DiffRequestProcessor.java:433) at com.intellij.diff.util.DiffUtil.runPreservingFocus(DiffUtil.java:833) at com.intellij.diff.impl.DiffRequestProcessor.doApplyRequest(DiffRequestProcessor.java:421) at com.intellij.diff.impl.DiffRequestProcessor.lambda$applyRequest$4(DiffRequestProcessor.java:403) at com.intellij.openapi.application.WriteIntentReadAction.lambda$run$0(WriteIntentReadAction.java:24) at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:84) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteIntentReadAction(ApplicationImpl.java:910) at com.intellij.openapi.application.WriteIntentReadAction.compute(WriteIntentReadAction.java:55) at com.intellij.openapi.application.WriteIntentReadAction.run(WriteIntentReadAction.java:23) at com.intellij.openapi.wm.impl.FocusManagerImpl.lambda$doWhenFocusSettlesDown$4(FocusManagerImpl.java:178) at com.intellij.util.ui.EdtInvocationManager.invokeLaterIfNeeded(EdtInvocationManager.java:33) at com.intellij.ide.IdeEventQueue.executeWhenAllFocusEventsLeftTheQueue(IdeEventQueue.kt:1281) at com.intellij.openapi.wm.impl.FocusManagerImpl.doWhenFocusSettlesDown(FocusManagerImpl.java:173) at com.intellij.diff.impl.DiffRequestProcessor.applyRequest(DiffRequestProcessor.java:411) at com.intellij.diff.impl.DiffRequestProcessor.applyRequest(DiffRequestProcessor.java:390) at com.intellij.diff.impl.CacheDiffRequestProcessor.finishUpdate(CacheDiffRequestProcessor.java:156) at com.intellij.diff.impl.CacheDiffRequestProcessor.updateRequest(CacheDiffRequestProcessor.java:113) at com.intellij.diff.impl.CacheDiffRequestProcessor.updateRequest(CacheDiffRequestProcessor.java:95) at com.intellij.diff.impl.DiffRequestProcessor.updateRequest(DiffRequestProcessor.java:264) at com.intellij.diff.impl.DiffRequestProcessor.switchToDiffTool(DiffRequestProcessor.java:340) at com.intellij.diff.impl.DiffRequestProcessor$DiffToolToggleAction.actionPerformed(DiffRequestProcessor.java:996) at com.intellij.openapi.actionSystem.ex.ActionUtil.doPerformActionOrShowPopup(ActionUtil.kt:342) at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks$lambda$4(ActionUtil.kt:313) at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.performWithActionCallbacks(ActionManagerImpl.kt:1172) at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks(ActionUtil.kt:312) at com.intellij.ui.popup.ActionPopupStep.performActionItem(ActionPopupStep.java:294) at com.intellij.ui.popup.ActionPopupStep.lambda$onChosen$3(ActionPopupStep.java:260) at com.intellij.ui.popup.AbstractPopup.lambda$dispose$18(AbstractPopup.java:1793) at com.intellij.openapi.application.WriteIntentReadAction.lambda$run$0(WriteIntentReadAction.java:24) at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:84) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteIntentReadAction(ApplicationImpl.java:910) at com.intellij.openapi.application.WriteIntentReadAction.compute(WriteIntentReadAction.java:55) at com.intellij.openapi.application.WriteIntentReadAction.run(WriteIntentReadAction.java:23) at com.intellij.openapi.wm.impl.FocusManagerImpl.lambda$doWhenFocusSettlesDown$4(FocusManagerImpl.java:178) at com.intellij.util.ui.EdtInvocationManager.invokeLaterIfNeeded(EdtInvocationManager.java:33) at com.intellij.ide.IdeEventQueue.executeWhenAllFocusEventsLeftTheQueue(IdeEventQueue.kt:1281) at com.intellij.openapi.wm.impl.FocusManagerImpl.doWhenFocusSettlesDown(FocusManagerImpl.java:173) at com.intellij.openapi.wm.impl.FocusManagerImpl.doWhenFocusSettlesDown(FocusManagerImpl.java:165) at com.intellij.ui.popup.AbstractPopup.dispose(AbstractPopup.java:1791) at com.intellij.ui.popup.WizardPopup.dispose(WizardPopup.java:178) at com.intellij.ui.popup.list.ListPopupImpl.dispose(ListPopupImpl.java:406) at com.intellij.ui.popup.PopupFactoryImpl$ActionGroupPopup.dispose(PopupFactoryImpl.java:308) at com.intellij.openapi.util.ObjectTree.runWithTrace(ObjectTree.java:131) at com.intellij.openapi.util.ObjectTree.executeAll(ObjectTree.java:163) at com.intellij.openapi.util.Disposer.dispose(Disposer.java:205) at com.intellij.openapi.util.Disposer.dispose(Disposer.java:193) at com.intellij.ui.popup.WizardPopup.disposeAllParents(WizardPopup.java:286) at com.intellij.ui.popup.list.ListPopupImpl.disposePopup(ListPopupImpl.java:532) at com.intellij.ui.popup.list.ListPopupImpl.handleNextStep(ListPopupImpl.java:556) at com.intellij.ui.popup.list.ListPopupImpl._handleSelect(ListPopupImpl.java:517) at com.intellij.ui.popup.list.ListPopupImpl.handleSelect(ListPopupImpl.java:448) at com.intellij.ui.popup.PopupFactoryImpl$ActionGroupPopup.handleSelect(PopupFactoryImpl.java:321) at com.intellij.ui.popup.list.ListPopupImpl$MyMouseListener.mouseReleased(ListPopupImpl.java:774) at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:298) at java.desktop/java.awt.Component.processMouseEvent(Component.java:6662) at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3394) at com.intellij.ui.popup.list.ListPopupImpl$MyList.processMouseEvent(ListPopupImpl.java:839) at java.desktop/java.awt.Component.processEvent(Component.java:6427) at java.desktop/java.awt.Container.processEvent(Container.java:2266) at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5032) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4860) at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4963) at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4577) at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4518) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310) at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2810) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4860) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:783) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:728) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722) at java.base/java.security.AccessController.doPrivileged(AccessController.java:400) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:98) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:755) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:753) at java.base/java.security.AccessController.doPrivileged(AccessController.java:400) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:752) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:696) at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.kt:635) at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$14(IdeEventQueue.kt:581) at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:84) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:581) at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:73) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1$1.compute(IdeEventQueue.kt:357) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1$1.compute(IdeEventQueue.kt:356) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:843) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.invoke(IdeEventQueue.kt:356) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.invoke(IdeEventQueue.kt:351) at com.intellij.ide.IdeEventQueueKt$performActivity$runnableWithWIL$1.invoke$lambda$0(IdeEventQueue.kt:1035) at com.intellij.openapi.application.WriteIntentReadAction.lambda$run$0(WriteIntentReadAction.java:24) at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:84) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteIntentReadAction(ApplicationImpl.java:910) at com.intellij.openapi.application.WriteIntentReadAction.compute(WriteIntentReadAction.java:55) at com.intellij.openapi.application.WriteIntentReadAction.run(WriteIntentReadAction.java:23) at com.intellij.ide.IdeEventQueueKt$performActivity$runnableWithWIL$1.invoke(IdeEventQueue.kt:1035) at com.intellij.ide.IdeEventQueueKt$performActivity$runnableWithWIL$1.invoke(IdeEventQueue.kt:1035) at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:1036) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:114) at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1036) at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$10(IdeEventQueue.kt:351) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:397) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

obiscr commented 1 month ago

Hi @marisveide, thank for report this bug, I'll fix this ASAP.

obiscr commented 1 month ago

It looks like you are encountering this error in the Excel diff viewer on the vcs system, unfortunately I can't reproduce the issue, can you provide the desensitized file, or the complete steps to reproduce it?

marisveide commented 1 month ago

Hello! When trying to reproduce the issue, I try to open the Excel file, and getting this kind of message - so now cannot even get this far: Screenshot 2024-08-21 at 16 00 23

marisveide commented 1 month ago

OK, so here are the steps to reproduce this with the ExcelReader plugin (free version of the ExcelEditor):

  1. Take this sample file: Blog_Posts_Filtered_By_API_Handle_Blog_Handle.xlsx

  2. Locate this file in the RubyMine with Cmd+Shift+O.

  3. Press Enter - to open the file. Screenshot 2024-08-21 at 17 28 59

  4. See the following IDE errors: Screenshot 2024-08-21 at 17 28 45

Screenshot 2024-08-21 at 17 28 35

The full error message:

Unhandled exception in [ComponentManager(ProjectImpl@1530605404), CoroutineName(SearchEverywhereContributorCoroutineScopeHolder), Dispatchers.Default]

com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: Access is allowed from Event Dispatch Thread (EDT) only; see https://jb.gg/ij-platform-threading for details
Current thread: Thread[#229,DefaultDispatcher-worker-73,5,main] 1134161866 (EventQueue.isDispatchThread()=false)
SystemEventQueueThread: Thread[#57,AWT-EventQueue-0,6,main] 384101474
    at com.intellij.util.concurrency.ThreadingAssertions.createThreadAccessException(ThreadingAssertions.java:177)
    at com.intellij.util.concurrency.ThreadingAssertions.throwThreadAccessException(ThreadingAssertions.java:172)
    at com.intellij.util.concurrency.ThreadingAssertions.assertEventDispatchThread(ThreadingAssertions.java:63)
    at com.intellij.ui.content.impl.ContentManagerImpl.doRemoveContent(ContentManagerImpl.java:231)
    at com.intellij.ui.content.impl.ContentManagerImpl.removeContent(ContentManagerImpl.java:211)
    at com.intellij.ui.content.impl.ContentManagerImpl.removeContent(ContentManagerImpl.java:205)
    at com.intellij.ui.content.impl.ContentManagerImpl.removeAllContents(ContentManagerImpl.java:313)
    at com.github.obiscr.excelreader.ui.ExcelReaderView.refreshData(ExcelReaderView.java:53)
    at com.github.obiscr.excelreader.excel.DataLoader.load(DataLoader.java:72)
    at com.github.obiscr.excelreader.file.MyExcelNativeFileType.openFileInAssociatedApplication(MyExcelNativeFileType.java:30)
    at com.intellij.platform.ide.navigation.impl.IdeNavigationServiceKt$navigateToSource$3.invoke(IdeNavigationService.kt:197)
    at com.intellij.platform.ide.navigation.impl.IdeNavigationServiceKt$navigateToSource$3.invoke(IdeNavigationService.kt:197)
    at com.intellij.openapi.progress.CoroutinesKt.blockingContextInner(coroutines.kt:339)
    at com.intellij.openapi.progress.CoroutinesKt$blockingContext$2.invokeSuspend(coroutines.kt:232)
    at com.intellij.openapi.progress.CoroutinesKt$blockingContext$2.invoke(coroutines.kt)
    at com.intellij.openapi.progress.CoroutinesKt$blockingContext$2.invoke(coroutines.kt)
    at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:62)
    at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:261)
    at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:231)
    at com.intellij.platform.ide.navigation.impl.IdeNavigationServiceKt.navigateToSource(IdeNavigationService.kt:197)
    at com.intellij.platform.ide.navigation.impl.IdeNavigationServiceKt.access$navigateToSource(IdeNavigationService.kt:1)
    at com.intellij.platform.ide.navigation.impl.IdeNavigationService.navigate(IdeNavigationService.kt:92)
    at com.intellij.ide.actions.searcheverywhere.AbstractGotoSEContributor$processSelectedItem$1$command$1$1.invokeSuspend(AbstractGotoSEContributor.kt:414)
    at com.intellij.ide.actions.searcheverywhere.AbstractGotoSEContributor$processSelectedItem$1$command$1$1.invoke(AbstractGotoSEContributor.kt)
    at com.intellij.ide.actions.searcheverywhere.AbstractGotoSEContributor$processSelectedItem$1$command$1$1.invoke(AbstractGotoSEContributor.kt)
    at com.intellij.ide.actions.searcheverywhere.AbstractGotoSEContributor$processSelectedItem$1.invokeSuspend(AbstractGotoSEContributor.kt:425)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:608)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:873)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:763)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:750)
    Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [ComponentManager(ProjectImpl@1530605404), CoroutineName(SearchEverywhereContributorCoroutineScopeHolder), StandaloneCoroutine{Cancelled}@473d79b1, Dispatchers.Default]

I hope this helps you to identify the issue.

marisveide commented 1 month ago

Similar issue is when I try to view the Diff of the modified file against the current version file (from the Commit tool window):

  1. I have the modified version of that same file (see this attachment as another version of that same file): Blog_Posts_Filtered_By_API_Handle_Blog_Handle.xlsx

  2. I go to the Commit tool - and choose to "Show Diff". Screenshot 2024-08-21 at 17 36 13

  3. I see the error: Screenshot 2024-08-21 at 17 28 45

Screenshot 2024-08-21 at 17 35 28

Error message:

Unhandled exception in [ComponentManager(ProjectImpl@1530605404), CoroutineName(SearchEverywhereContributorCoroutineScopeHolder), Dispatchers.Default]

com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: Access is allowed from Event Dispatch Thread (EDT) only; see https://jb.gg/ij-platform-threading for details
Current thread: Thread[#108,DefaultDispatcher-worker-27,5,main] 14508365 (EventQueue.isDispatchThread()=false)
SystemEventQueueThread: Thread[#57,AWT-EventQueue-0,6,main] 384101474
    at com.intellij.util.concurrency.ThreadingAssertions.createThreadAccessException(ThreadingAssertions.java:177)
    at com.intellij.util.concurrency.ThreadingAssertions.throwThreadAccessException(ThreadingAssertions.java:172)
    at com.intellij.util.concurrency.ThreadingAssertions.assertEventDispatchThread(ThreadingAssertions.java:63)
    at com.intellij.ui.content.impl.ContentManagerImpl.doRemoveContent(ContentManagerImpl.java:231)
    at com.intellij.ui.content.impl.ContentManagerImpl.removeContent(ContentManagerImpl.java:211)
    at com.intellij.ui.content.impl.ContentManagerImpl.removeContent(ContentManagerImpl.java:205)
    at com.intellij.ui.content.impl.ContentManagerImpl.removeAllContents(ContentManagerImpl.java:313)
    at com.github.obiscr.excelreader.ui.ExcelReaderView.refreshData(ExcelReaderView.java:53)
    at com.github.obiscr.excelreader.excel.DataLoader.load(DataLoader.java:72)
    at com.github.obiscr.excelreader.file.MyExcelNativeFileType.openFileInAssociatedApplication(MyExcelNativeFileType.java:30)
    at com.intellij.platform.ide.navigation.impl.IdeNavigationServiceKt$navigateToSource$3.invoke(IdeNavigationService.kt:197)
    at com.intellij.platform.ide.navigation.impl.IdeNavigationServiceKt$navigateToSource$3.invoke(IdeNavigationService.kt:197)
    at com.intellij.openapi.progress.CoroutinesKt.blockingContextInner(coroutines.kt:339)
    at com.intellij.openapi.progress.CoroutinesKt$blockingContext$2.invokeSuspend(coroutines.kt:232)
    at com.intellij.openapi.progress.CoroutinesKt$blockingContext$2.invoke(coroutines.kt)
    at com.intellij.openapi.progress.CoroutinesKt$blockingContext$2.invoke(coroutines.kt)
    at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:62)
    at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:261)
    at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:231)
    at com.intellij.platform.ide.navigation.impl.IdeNavigationServiceKt.navigateToSource(IdeNavigationService.kt:197)
    at com.intellij.platform.ide.navigation.impl.IdeNavigationServiceKt.access$navigateToSource(IdeNavigationService.kt:1)
    at com.intellij.platform.ide.navigation.impl.IdeNavigationService.navigate(IdeNavigationService.kt:92)
    at com.intellij.ide.actions.searcheverywhere.AbstractGotoSEContributor$processSelectedItem$1$command$1$1.invokeSuspend(AbstractGotoSEContributor.kt:414)
    at com.intellij.ide.actions.searcheverywhere.AbstractGotoSEContributor$processSelectedItem$1$command$1$1.invoke(AbstractGotoSEContributor.kt)
    at com.intellij.ide.actions.searcheverywhere.AbstractGotoSEContributor$processSelectedItem$1$command$1$1.invoke(AbstractGotoSEContributor.kt)
    at com.intellij.ide.actions.searcheverywhere.AbstractGotoSEContributor$processSelectedItem$1.invokeSuspend(AbstractGotoSEContributor.kt:425)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:608)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:873)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:763)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:750)
    Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [ComponentManager(ProjectImpl@1530605404), CoroutineName(SearchEverywhereContributorCoroutineScopeHolder), StandaloneCoroutine{Cancelled}@17e477dd, Dispatchers.Default]

I hope this helps additionally.

obiscr commented 1 month ago

Thanks for the update, these issues have been fixed and a new version has been released, expect to be able to download the new version in 1 to 2 days.

marisveide commented 1 month ago

Hi! I got an update - it seems to be showing in the git log view, but not in the "Commit" view that shows the diff of uncommitted changes.

Here's how it looks now: Screenshot 2024-08-22 at 10 12 42

obiscr commented 1 month ago

What you're experiencing appears to be a different issue, and in fact, the same file, on my end, is normal.

image
obiscr commented 1 month ago

Hi! I got an update - it seems to be showing in the git log view, but not in the "Commit" view that shows the diff of uncommitted changes.

Here's how it looks now: Screenshot 2024-08-22 at 10 12 42

I see Array index out of range:1

marisveide commented 1 month ago

So you managed to reproduce that issue on your end?

obiscr commented 1 month ago

No, I can't reproduce it. And I think this is another issue.

marisveide commented 1 month ago

Steps to reproduce:

  1. Take the file "Sample-1.xlsx" - commit into git as "Sample.xlsx" filename.
  2. Take the file "Sample-2.xlsx" - rename it to "Sample.xlsx" and copy over the existing committed "Sample.xlsx" - so that RubyMine shows that this file is edited.
  3. In the "Commit" side tool window - click on that file to see the changes.
  4. See that it will fail with the error Array index out of range: 1.

Sample-1.xlsx Sample-2.xlsx

Screenshot 2024-08-22 at 14 29 10

Stack trace:

java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 1
    at java.base/java.util.Vector.get(Vector.java:750)
    at com.github.obiscr.excelreader.ui.vcs.DiffResult.resolve(DiffResult.java:68)
    at com.github.obiscr.excelreader.ui.vcs.VcsExcelDiffPanel.<init>(VcsExcelDiffPanel.java:42)
    at com.github.obiscr.excelreader.ui.vcs.ExcelDiffViewer.<init>(ExcelDiffViewer.java:75)
    at com.github.obiscr.excelreader.ui.vcs.ExcelDiffTool.createViewer(ExcelDiffTool.java:28)
    at com.github.obiscr.excelreader.ui.vcs.ExcelDiffTool.createComponent(ExcelDiffTool.java:22)
    at com.intellij.diff.impl.DiffRequestProcessor.createState(DiffRequestProcessor.java:362)
    at com.intellij.diff.impl.DiffRequestProcessor.lambda$doApplyRequest$5(DiffRequestProcessor.java:441)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeNonCancelableSection$3(CoreProgressManager.java:269)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:735)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:691)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$computeInNonCancelableSection$4(CoreProgressManager.java:277)
    at com.intellij.openapi.progress.Cancellation.computeInNonCancelableSection(Cancellation.java:62)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeInNonCancelableSection(CoreProgressManager.java:277)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeNonCancelableSection(CoreProgressManager.java:268)
    at com.intellij.diff.impl.DiffRequestProcessor.lambda$doApplyRequest$6(DiffRequestProcessor.java:433)
    at com.intellij.diff.util.DiffUtil.runPreservingFocus(DiffUtil.java:833)
    at com.intellij.diff.impl.DiffRequestProcessor.doApplyRequest(DiffRequestProcessor.java:421)
    at com.intellij.diff.impl.DiffRequestProcessor.lambda$applyRequest$4(DiffRequestProcessor.java:403)
    at com.intellij.openapi.application.WriteIntentReadAction.lambda$run$0(WriteIntentReadAction.java:24)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:84)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteIntentReadAction(ApplicationImpl.java:910)
    at com.intellij.openapi.application.WriteIntentReadAction.compute(WriteIntentReadAction.java:55)
    at com.intellij.openapi.application.WriteIntentReadAction.run(WriteIntentReadAction.java:23)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.lambda$doWhenFocusSettlesDown$4(FocusManagerImpl.java:178)
    at com.intellij.util.ui.EdtInvocationManager.invokeLaterIfNeeded(EdtInvocationManager.java:33)
    at com.intellij.ide.IdeEventQueue.executeWhenAllFocusEventsLeftTheQueue(IdeEventQueue.kt:1281)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.doWhenFocusSettlesDown(FocusManagerImpl.java:173)
    at com.intellij.diff.impl.DiffRequestProcessor.applyRequest(DiffRequestProcessor.java:411)
    at com.intellij.diff.impl.DiffRequestProcessor.applyRequest(DiffRequestProcessor.java:390)
    at com.intellij.diff.impl.CacheDiffRequestProcessor.finishUpdate(CacheDiffRequestProcessor.java:156)
    at com.intellij.diff.impl.CacheDiffRequestProcessor.finishRequestLoading(CacheDiffRequestProcessor.java:145)
    at com.intellij.diff.impl.CacheDiffRequestProcessor.lambda$updateRequest$0(CacheDiffRequestProcessor.java:130)
    at com.intellij.openapi.progress.util.BackgroundTaskUtil.finish(BackgroundTaskUtil.java:106)
    at com.intellij.openapi.progress.util.BackgroundTaskUtil.executeAndTryWait(BackgroundTaskUtil.java:94)
    at com.intellij.diff.util.DiffTaskQueue.executeAndTryWait(DiffTaskQueue.java:35)
    at com.intellij.diff.util.DiffTaskQueue.executeAndTryWait(DiffTaskQueue.java:26)
    at com.intellij.diff.impl.CacheDiffRequestProcessor.updateRequest(CacheDiffRequestProcessor.java:127)
    at com.intellij.diff.impl.CacheDiffRequestProcessor.updateRequest(CacheDiffRequestProcessor.java:95)
    at com.intellij.diff.impl.DiffRequestProcessor.updateRequest(DiffRequestProcessor.java:264)
    at com.intellij.diff.impl.DiffRequestProcessor.updateRequest(DiffRequestProcessor.java:259)
    at com.intellij.openapi.vcs.changes.ChangeViewDiffRequestProcessor.setCurrentChange(ChangeViewDiffRequestProcessor.java:242)
    at com.intellij.openapi.vcs.changes.ChangeViewDiffRequestProcessor.refresh(ChangeViewDiffRequestProcessor.java:223)
    at com.intellij.openapi.vcs.changes.ui.TreeHandlerChangesTreeTracker.refreshPreview(TreeHandlerDiffRequestProcessor.kt:138)
    at com.intellij.openapi.vcs.changes.ui.TreeHandlerChangesTreeTracker.updatePreview(TreeHandlerDiffRequestProcessor.kt:122)
    at com.intellij.openapi.vcs.changes.ui.TreeHandlerChangesTreeTracker.track(TreeHandlerDiffRequestProcessor.kt:111)
    at com.intellij.openapi.vcs.changes.ChangesViewDiffPreviewProcessor.<init>(ChangesViewDiffPreviewProcessor.kt:80)
    at com.intellij.openapi.vcs.changes.ChangesViewManager$ChangesViewToolWindowPanel$ChangesViewEditorDiffPreview.createViewer(ChangesViewManager.java:603)
    at com.intellij.openapi.vcs.changes.EditorTabDiffPreview$TabPreviewDiffVirtualFile.createViewer(EditorTabDiffPreview.kt:96)
    at com.jetbrains.rdserver.vcs.BackendDiffFileEditorProvider.createEditor(BackendServerDiffManager.kt:143)
    at com.intellij.openapi.fileEditor.impl.EditorCompositeModelManager$fileEditorWithProviderFlow$editorsWithProviders$1$1$1$editor$1.invokeSuspend(EditorCompositeModelManager.kt:129)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
    at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:214)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWithImplicitRead(AnyThreadWriteThreadingSupport.kt:122)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWithImplicitRead(ApplicationImpl.java:1162)
    at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:78)
    at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:119)
    at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:41)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:781)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:728)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:750)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:696)
    at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$16(IdeEventQueue.kt:590)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWithoutImplicitRead(AnyThreadWriteThreadingSupport.kt:117)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:590)
    at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:73)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1$1.compute(IdeEventQueue.kt:357)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1$1.compute(IdeEventQueue.kt:356)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:843)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.invoke(IdeEventQueue.kt:356)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.invoke(IdeEventQueue.kt:351)
    at com.intellij.ide.IdeEventQueueKt$performActivity$runnableWithWIL$1.invoke$lambda$0(IdeEventQueue.kt:1035)
    at com.intellij.openapi.application.WriteIntentReadAction.lambda$run$0(WriteIntentReadAction.java:24)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:84)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteIntentReadAction(ApplicationImpl.java:910)
    at com.intellij.openapi.application.WriteIntentReadAction.compute(WriteIntentReadAction.java:55)
    at com.intellij.openapi.application.WriteIntentReadAction.run(WriteIntentReadAction.java:23)
    at com.intellij.ide.IdeEventQueueKt$performActivity$runnableWithWIL$1.invoke(IdeEventQueue.kt:1035)
    at com.intellij.ide.IdeEventQueueKt$performActivity$runnableWithWIL$1.invoke(IdeEventQueue.kt:1035)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:1036)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:114)
    at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1036)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$10(IdeEventQueue.kt:351)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:397)
    at com.intellij.openapi.progress.impl.PlatformTaskSupportKt.pumpEventsForHierarchy(PlatformTaskSupport.kt:399)
    at com.intellij.openapi.progress.impl.PlatformTaskSupportKt.pumpEventsForHierarchy(PlatformTaskSupport.kt:407)
    at com.intellij.openapi.fileEditor.impl.FileEditorManagerImplKt$blockingWaitForCompositeFileOpen$2.invokeSuspend(FileEditorManagerImpl.kt:2437)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
    at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:277)
    at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:111)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$BuildersKt__BuildersKt(Builders.kt:84)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:52)
    at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:48)
    at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
    at com.intellij.openapi.fileEditor.impl.FileEditorManagerImplKt.blockingWaitForCompositeFileOpen(FileEditorManagerImpl.kt:2432)
    at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl$intellij_platform_ide_impl(FileEditorManagerImpl.kt:1143)
    at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFile(FileEditorManagerImpl.kt:904)
    at com.intellij.openapi.vcs.changes.VcsEditorTabFilesManager.openFile(VcsEditorTabFilesManager.kt:75)
    at com.intellij.openapi.vcs.changes.VcsEditorTabFilesManager.openFile(VcsEditorTabFilesManager.kt:64)
    at com.intellij.openapi.vcs.changes.EditorTabDiffPreviewManager.showDiffFile(EditorTabDiffPreviewManager.kt:25)
    at com.intellij.openapi.vcs.changes.EditorTabDiffPreview.openPreview(EditorTabDiffPreview.kt:51)
    at com.intellij.openapi.vcs.changes.EditorTabDiffPreview.performDiffAction(EditorTabDiffPreview.kt:73)
    at com.intellij.openapi.vcs.changes.ChangesTreeEditorDiffPreview.handleDoubleClick(ChangesTreeEditorDiffPreview.kt:37)
    at com.intellij.openapi.vcs.changes.ChangesViewManager$ChangesViewToolWindowPanel.lambda$new$3(ChangesViewManager.java:514)
    at com.intellij.openapi.vcs.changes.ui.ChangesTreeHandlers$MyDoubleClickListener.onDoubleClick(ChangesTreeHandlers.kt:43)
    at com.intellij.ui.DoubleClickListener.onClick(DoubleClickListener.java:16)
    at com.intellij.ui.ClickListener$1.mouseReleased(ClickListener.java:63)
    at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:298)
    at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
    at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
    at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
    at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
    at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
    at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
    at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
    at java.desktop/java.awt.Component.processMouseEvent(Component.java:6662)
    at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3394)
    at com.intellij.ui.treeStructure.Tree.processMouseEvent(Tree.java:466)
    at com.intellij.openapi.vcs.changes.ui.ChangesListView.processMouseEvent(ChangesListView.java:309)
    at java.desktop/java.awt.Component.processEvent(Component.java:6427)
    at java.desktop/java.awt.Container.processEvent(Container.java:2266)
    at com.intellij.openapi.vcs.changes.ui.ChangesTree.processEvent(ChangesTree.java:843)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5032)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4860)
    at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4963)
    at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4577)
    at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4518)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
    at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2810)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4860)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:783)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:728)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:98)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:755)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:753)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:752)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:696)
    at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.kt:635)
    at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$14(IdeEventQueue.kt:581)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:84)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:581)
    at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:73)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1$1.compute(IdeEventQueue.kt:357)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1$1.compute(IdeEventQueue.kt:356)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:843)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.invoke(IdeEventQueue.kt:356)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.invoke(IdeEventQueue.kt:351)
    at com.intellij.ide.IdeEventQueueKt$performActivity$runnableWithWIL$1.invoke$lambda$0(IdeEventQueue.kt:1035)
    at com.intellij.openapi.application.WriteIntentReadAction.lambda$run$0(WriteIntentReadAction.java:24)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:84)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteIntentReadAction(ApplicationImpl.java:910)
    at com.intellij.openapi.application.WriteIntentReadAction.compute(WriteIntentReadAction.java:55)
    at com.intellij.openapi.application.WriteIntentReadAction.run(WriteIntentReadAction.java:23)
    at com.intellij.ide.IdeEventQueueKt$performActivity$runnableWithWIL$1.invoke(IdeEventQueue.kt:1035)
    at com.intellij.ide.IdeEventQueueKt$performActivity$runnableWithWIL$1.invoke(IdeEventQueue.kt:1035)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:1036)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:114)
    at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1036)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$10(IdeEventQueue.kt:351)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:397)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
marisveide commented 1 month ago

Another way to reproduce it - simply put both files in the directory and press Cmd+D (Compare files) - and you will also get the same error.

obiscr commented 1 month ago

Unfortunately, I still can't reproduce it. I tried the two ways you mentioned: copying the file and submitting it, and comparing the files.

marisveide commented 1 month ago

By looking at the stack trace and the error message in that line that I gave - maybe you can see in the code some unsafe call that you make, and guard against “index out of range” there?

obiscr commented 1 month ago

I've tried to fix it and a new version 2024.8.4 will be released soon. Please try again with this version. Thank you!

marisveide commented 1 month ago

Great, thank you - now it works, and does not throw an exception anymore in this scenario when comparing those 2 files in the same directory. 👌👍

Now it just crashes in this scenario - when looking for the diff in the "Commit" toolbox, here, when showing the diff between previous version and current (uncommitted) version of the file:

Screenshot 2024-08-26 at 10 15 25

Stack trace:

java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
    at java.base/java.util.Vector.get(Vector.java:750)
    at com.github.obiscr.excelreader.ui.vcs.DiffResult.equals(DiffResult.java:100)
    at com.github.obiscr.excelreader.ui.vcs.DiffResult.resolve(DiffResult.java:69)
    at com.github.obiscr.excelreader.ui.vcs.VcsExcelDiffPanel.<init>(VcsExcelDiffPanel.java:42)
    at com.github.obiscr.excelreader.ui.vcs.ExcelDiffViewer.<init>(ExcelDiffViewer.java:75)
    at com.github.obiscr.excelreader.ui.vcs.ExcelDiffTool.createViewer(ExcelDiffTool.java:28)
    at com.github.obiscr.excelreader.ui.vcs.ExcelDiffTool.createComponent(ExcelDiffTool.java:22)
    at com.intellij.diff.impl.DiffRequestProcessor.createState(DiffRequestProcessor.java:362)
    at com.intellij.diff.impl.DiffRequestProcessor.lambda$doApplyRequest$5(DiffRequestProcessor.java:441)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeNonCancelableSection$3(CoreProgressManager.java:269)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:735)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:691)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$computeInNonCancelableSection$4(CoreProgressManager.java:277)
    at com.intellij.openapi.progress.Cancellation.computeInNonCancelableSection(Cancellation.java:62)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeInNonCancelableSection(CoreProgressManager.java:277)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeNonCancelableSection(CoreProgressManager.java:268)
    at com.intellij.diff.impl.DiffRequestProcessor.lambda$doApplyRequest$6(DiffRequestProcessor.java:433)
    at com.intellij.diff.util.DiffUtil.runPreservingFocus(DiffUtil.java:833)
    at com.intellij.diff.impl.DiffRequestProcessor.doApplyRequest(DiffRequestProcessor.java:421)
    at com.intellij.diff.impl.DiffRequestProcessor.lambda$applyRequest$4(DiffRequestProcessor.java:403)
    at com.intellij.openapi.application.WriteIntentReadAction.lambda$run$0(WriteIntentReadAction.java:24)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:84)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteIntentReadAction(ApplicationImpl.java:910)
    at com.intellij.openapi.application.WriteIntentReadAction.compute(WriteIntentReadAction.java:55)
    at com.intellij.openapi.application.WriteIntentReadAction.run(WriteIntentReadAction.java:23)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.lambda$doWhenFocusSettlesDown$4(FocusManagerImpl.java:178)
    at com.intellij.util.ui.EdtInvocationManager.invokeLaterIfNeeded(EdtInvocationManager.java:33)
    at com.intellij.ide.IdeEventQueue.executeWhenAllFocusEventsLeftTheQueue(IdeEventQueue.kt:1281)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.doWhenFocusSettlesDown(FocusManagerImpl.java:173)
    at com.intellij.diff.impl.DiffRequestProcessor.applyRequest(DiffRequestProcessor.java:411)
    at com.intellij.diff.impl.DiffRequestProcessor.applyRequest(DiffRequestProcessor.java:390)
    at com.intellij.diff.impl.CacheDiffRequestProcessor.finishUpdate(CacheDiffRequestProcessor.java:156)
    at com.intellij.diff.impl.CacheDiffRequestProcessor.finishRequestLoading(CacheDiffRequestProcessor.java:145)
    at com.intellij.diff.impl.CacheDiffRequestProcessor.lambda$updateRequest$0(CacheDiffRequestProcessor.java:130)
    at com.intellij.openapi.progress.util.BackgroundTaskUtil.finish(BackgroundTaskUtil.java:106)
    at com.intellij.openapi.progress.util.BackgroundTaskUtil.executeAndTryWait(BackgroundTaskUtil.java:94)
    at com.intellij.diff.util.DiffTaskQueue.executeAndTryWait(DiffTaskQueue.java:35)
    at com.intellij.diff.util.DiffTaskQueue.executeAndTryWait(DiffTaskQueue.java:26)
    at com.intellij.diff.impl.CacheDiffRequestProcessor.updateRequest(CacheDiffRequestProcessor.java:127)
    at com.intellij.diff.impl.CacheDiffRequestProcessor.updateRequest(CacheDiffRequestProcessor.java:95)
    at com.intellij.diff.impl.DiffRequestProcessor.updateRequest(DiffRequestProcessor.java:264)
    at com.intellij.diff.impl.DiffRequestProcessor.updateRequest(DiffRequestProcessor.java:259)
    at com.intellij.openapi.vcs.changes.ChangeViewDiffRequestProcessor.setCurrentChange(ChangeViewDiffRequestProcessor.java:242)
    at com.intellij.openapi.vcs.changes.ChangeViewDiffRequestProcessor.refresh(ChangeViewDiffRequestProcessor.java:223)
    at com.intellij.openapi.vcs.changes.ui.TreeHandlerChangesTreeTracker.refreshPreview(TreeHandlerDiffRequestProcessor.kt:138)
    at com.intellij.openapi.vcs.changes.ui.TreeHandlerChangesTreeTracker.updatePreview(TreeHandlerDiffRequestProcessor.kt:122)
    at com.intellij.openapi.vcs.changes.ui.TreeHandlerChangesTreeTracker.track(TreeHandlerDiffRequestProcessor.kt:111)
    at com.intellij.openapi.vcs.changes.ChangesViewDiffPreviewProcessor.<init>(ChangesViewDiffPreviewProcessor.kt:80)
    at com.intellij.openapi.vcs.changes.ChangesViewManager$ChangesViewToolWindowPanel$ChangesViewEditorDiffPreview.createViewer(ChangesViewManager.java:603)
    at com.intellij.openapi.vcs.changes.EditorTabDiffPreview$TabPreviewDiffVirtualFile.createViewer(EditorTabDiffPreview.kt:96)
    at com.jetbrains.rdserver.vcs.BackendDiffFileEditorProvider.createEditor(BackendServerDiffManager.kt:143)
    at com.intellij.openapi.fileEditor.impl.EditorCompositeModelManager$fileEditorWithProviderFlow$editorsWithProviders$1$1$1$editor$1.invokeSuspend(EditorCompositeModelManager.kt:129)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
    at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:214)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWithImplicitRead(AnyThreadWriteThreadingSupport.kt:122)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWithImplicitRead(ApplicationImpl.java:1162)
    at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:78)
    at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:119)
    at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:41)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:781)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:728)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:750)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:696)
    at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$16(IdeEventQueue.kt:590)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWithoutImplicitRead(AnyThreadWriteThreadingSupport.kt:117)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:590)
    at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:73)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1$1.compute(IdeEventQueue.kt:357)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1$1.compute(IdeEventQueue.kt:356)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:843)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.invoke(IdeEventQueue.kt:356)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.invoke(IdeEventQueue.kt:351)
    at com.intellij.ide.IdeEventQueueKt$performActivity$runnableWithWIL$1.invoke$lambda$0(IdeEventQueue.kt:1035)
    at com.intellij.openapi.application.WriteIntentReadAction.lambda$run$0(WriteIntentReadAction.java:24)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:84)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteIntentReadAction(ApplicationImpl.java:910)
    at com.intellij.openapi.application.WriteIntentReadAction.compute(WriteIntentReadAction.java:55)
    at com.intellij.openapi.application.WriteIntentReadAction.run(WriteIntentReadAction.java:23)
    at com.intellij.ide.IdeEventQueueKt$performActivity$runnableWithWIL$1.invoke(IdeEventQueue.kt:1035)
    at com.intellij.ide.IdeEventQueueKt$performActivity$runnableWithWIL$1.invoke(IdeEventQueue.kt:1035)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:1036)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:114)
    at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1036)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$10(IdeEventQueue.kt:351)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:397)
    at com.intellij.openapi.progress.impl.PlatformTaskSupportKt.pumpEventsForHierarchy(PlatformTaskSupport.kt:399)
    at com.intellij.openapi.progress.impl.PlatformTaskSupportKt.pumpEventsForHierarchy(PlatformTaskSupport.kt:407)
    at com.intellij.openapi.fileEditor.impl.FileEditorManagerImplKt$blockingWaitForCompositeFileOpen$2.invokeSuspend(FileEditorManagerImpl.kt:2437)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
    at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:277)
    at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:111)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$BuildersKt__BuildersKt(Builders.kt:84)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:52)
    at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:48)
    at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
    at com.intellij.openapi.fileEditor.impl.FileEditorManagerImplKt.blockingWaitForCompositeFileOpen(FileEditorManagerImpl.kt:2432)
    at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl$intellij_platform_ide_impl(FileEditorManagerImpl.kt:1143)
    at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFile(FileEditorManagerImpl.kt:904)
    at com.intellij.openapi.vcs.changes.VcsEditorTabFilesManager.openFile(VcsEditorTabFilesManager.kt:75)
    at com.intellij.openapi.vcs.changes.VcsEditorTabFilesManager.openFile(VcsEditorTabFilesManager.kt:64)
    at com.intellij.openapi.vcs.changes.EditorTabDiffPreviewManager.showDiffFile(EditorTabDiffPreviewManager.kt:25)
    at com.intellij.openapi.vcs.changes.EditorTabDiffPreview.openPreview(EditorTabDiffPreview.kt:51)
    at com.intellij.openapi.vcs.changes.EditorTabDiffPreview.performDiffAction(EditorTabDiffPreview.kt:73)
    at com.intellij.openapi.vcs.changes.ChangesTreeEditorDiffPreview.handleDoubleClick(ChangesTreeEditorDiffPreview.kt:37)
    at com.intellij.openapi.vcs.changes.ChangesViewManager$ChangesViewToolWindowPanel.lambda$new$3(ChangesViewManager.java:514)
    at com.intellij.openapi.vcs.changes.ui.ChangesTreeHandlers$MyDoubleClickListener.onDoubleClick(ChangesTreeHandlers.kt:43)
    at com.intellij.ui.DoubleClickListener.onClick(DoubleClickListener.java:16)
    at com.intellij.ui.ClickListener$1.mouseReleased(ClickListener.java:63)
    at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:298)
    at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
    at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
    at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
    at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
    at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
    at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
    at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
    at java.desktop/java.awt.Component.processMouseEvent(Component.java:6662)
    at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3394)
    at com.intellij.ui.treeStructure.Tree.processMouseEvent(Tree.java:466)
    at com.intellij.openapi.vcs.changes.ui.ChangesListView.processMouseEvent(ChangesListView.java:309)
    at java.desktop/java.awt.Component.processEvent(Component.java:6427)
    at java.desktop/java.awt.Container.processEvent(Container.java:2266)
    at com.intellij.openapi.vcs.changes.ui.ChangesTree.processEvent(ChangesTree.java:843)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5032)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4860)
    at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4963)
    at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4577)
    at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4518)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
    at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2810)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4860)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:783)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:728)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:98)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:755)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:753)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:752)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:696)
    at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.kt:635)
    at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$14(IdeEventQueue.kt:581)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:84)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:581)
    at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:73)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1$1.compute(IdeEventQueue.kt:357)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1$1.compute(IdeEventQueue.kt:356)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:843)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.invoke(IdeEventQueue.kt:356)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.invoke(IdeEventQueue.kt:351)
    at com.intellij.ide.IdeEventQueueKt$performActivity$runnableWithWIL$1.invoke$lambda$0(IdeEventQueue.kt:1035)
    at com.intellij.openapi.application.WriteIntentReadAction.lambda$run$0(WriteIntentReadAction.java:24)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:84)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteIntentReadAction(ApplicationImpl.java:910)
    at com.intellij.openapi.application.WriteIntentReadAction.compute(WriteIntentReadAction.java:55)
    at com.intellij.openapi.application.WriteIntentReadAction.run(WriteIntentReadAction.java:23)
    at com.intellij.ide.IdeEventQueueKt$performActivity$runnableWithWIL$1.invoke(IdeEventQueue.kt:1035)
    at com.intellij.ide.IdeEventQueueKt$performActivity$runnableWithWIL$1.invoke(IdeEventQueue.kt:1035)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:1036)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:114)
    at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1036)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$10(IdeEventQueue.kt:351)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:397)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
obiscr commented 1 month ago

I'm glad to hear that it's working. Regarding the issue you mentioned about array index out of index, can you use ExcelReader latest version to test if it works normally , as I am unable to reproduce it. thank you.

marisveide commented 1 month ago

I did exactly that with the very latest ExcelReader version. Can you try to look at the code and see from the error stack trace - maybe you will notice some unsafe place that you can fix/adjust in the code?

marisveide commented 1 month ago

Just now got the latest version update, and it looks to be fixed now - working great! 👍 Awesome job, @obiscr !

marisveide commented 1 month ago

Oh, got one more scenario where it fails! When I have an Excel file committed, and then I delete it.

Then looking at the Changes tab - it shows error like this: class com.intel.clii.contents.EmptyContent cannot be cast to class com.intel.cli.contents.Flecontentmpcom.ntem.clii.contents.emptyContent and com.ntel.clii.contenis.Flecontentmolare in unnamed module or loader com.intem.ut.ang...

Screenshot 2024-08-28 at 18 42 35

obiscr commented 1 month ago

Thank you. this is a low priority and, I think, can be fixed later.

marisveide commented 1 month ago

Your Plugin, your priority. 👌