exbin / bined-intellij-plugin

Hex viewer/editor plugin for JetBrains IntelliJ platform
https://bined.exbin.org/intellij-plugin
Apache License 2.0
59 stars 9 forks source link

Opening via dialog crashes intellij since 0.2.1 (mac) #22

Closed ZR8C closed 4 years ago

ZR8C commented 5 years ago

I'm on macOS version 10.14.6.

In prior versions I experienced buggy behaviour (hex viewer would open blank, and would need to be reopened), in this version however I can't use the plugin at all. I go to open a file and the IDE freezes up completely. I close the current window and get the below pasted errors. This happens with any type of file I try.

java.lang.NullPointerException at com.intellij.ide.ui.laf.intellij.MacIntelliJButtonUI.getDarculaButtonSize(MacIntelliJButtonUI.java:123) at com.intellij.ide.ui.laf.darcula.ui.DarculaButtonUI.getPreferredSize(DarculaButtonUI.java:258) at java.desktop/javax.swing.JComponent.getPreferredSize(JComponent.java:1680) at java.desktop/java.awt.FlowLayout.preferredLayoutSize(FlowLayout.java:414) at java.desktop/java.awt.Container.preferredSize(Container.java:1823) at java.desktop/java.awt.Container.getPreferredSize(Container.java:1807) at java.desktop/javax.swing.JComponent.getPreferredSize(JComponent.java:1682) at java.desktop/java.awt.BorderLayout.layoutContainer(BorderLayout.java:820) at java.desktop/java.awt.Container.layout(Container.java:1537) at java.desktop/java.awt.Container.doLayout(Container.java:1526) at java.desktop/java.awt.Container.validateTree(Container.java:1722) at java.desktop/java.awt.Container.validateTree(Container.java:1731) at java.desktop/java.awt.Container.validateTree(Container.java:1731) at java.desktop/java.awt.Container.validateTree(Container.java:1731) at java.desktop/java.awt.Container.validateTree(Container.java:1731) at java.desktop/java.awt.Container.validateTree(Container.java:1731) at java.desktop/java.awt.Container.validate(Container.java:1657) at com.intellij.ui.tabs.newImpl.JBTabsImpl.revalidateAndRepaint(JBTabsImpl.java:1294) at com.intellij.ui.tabs.newImpl.JBTabsImpl.relayout(JBTabsImpl.java:2153) at com.intellij.ui.tabs.newImpl.JBTabsImpl.updateContainer(JBTabsImpl.java:2130) at com.intellij.ui.tabs.newImpl.JBTabsImpl.executeSelectionChange(JBTabsImpl.java:1033) at com.intellij.ui.tabs.newImpl.JBTabsImpl.access$2200(JBTabsImpl.java:54) at com.intellij.ui.tabs.newImpl.JBTabsImpl$11.run(JBTabsImpl.java:989) at com.intellij.openapi.fileEditor.impl.EditorTabbedContainer.lambda$null$1(EditorTabbedContainer.java:115) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:212) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:178) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:168) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:154) at com.intellij.openapi.fileEditor.impl.EditorTabbedContainer.lambda$new$2(EditorTabbedContainer.java:113) at com.intellij.ui.tabs.newImpl.JBTabsImpl._setSelected(JBTabsImpl.java:985) at com.intellij.ui.tabs.newImpl.JBTabsImpl.select(JBTabsImpl.java:975) at com.intellij.openapi.fileEditor.impl.EditorTabbedContainer$EditorTabs.select(EditorTabbedContainer.java:745) at com.intellij.openapi.fileEditor.impl.EditorTabbedContainer.setSelectedIndex(EditorTabbedContainer.java:165) at com.intellij.openapi.fileEditor.impl.EditorWindow.lambda$setSelectedEditor$3(EditorWindow.java:641) at com.intellij.util.ui.UIUtil.invokeLaterIfNeeded(UIUtil.java:2458) at com.intellij.openapi.fileEditor.impl.EditorWindow.setSelectedEditor(EditorWindow.java:639) at com.intellij.openapi.fileEditor.impl.EditorWindow.setEditor(EditorWindow.java:701) at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl4Edt(FileEditorManagerImpl.java:908) at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.lambda$openFileImpl4$7(FileEditorManagerImpl.java:845) at com.intellij.openapi.application.impl.ApplicationImpl.invokeAndWait(ApplicationImpl.java:630) at com.intellij.openapi.application.impl.ApplicationImpl.invokeAndWait(ApplicationImpl.java:643) at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl4(FileEditorManagerImpl.java:845) at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl3(FileEditorManagerImpl.java:790) at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.lambda$openFileImpl2$4(FileEditorManagerImpl.java:773) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:212) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:178) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:168) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:154) at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl2(FileEditorManagerImpl.java:773) at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileWithProviders(FileEditorManagerImpl.java:704) at com.intellij.openapi.fileEditor.ex.FileEditorManagerEx.openFile(FileEditorManagerEx.java:145) at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.lambda$openEditor$10(FileEditorManagerImpl.java:1137) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:220) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:178) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:168) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:154) at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openEditor(FileEditorManagerImpl.java:1135) at org.exbin.bined.intellij.OpenAsBinaryAction.actionPerformed(OpenAsBinaryAction.java:61) at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:265) at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:282) at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$actionPerformed$0(ActionMenuItem.java:292) at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:265) at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:107) at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:282) at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$0(ActionMenuItem.java:111) at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:82) at com.intellij.openapi.application.TransactionGuardImpl.lambda$submitTransaction$1(TransactionGuardImpl.java:106) at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:115) at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:121) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:111) at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:524) at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:35) at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:546) at java.desktop/java.awt.Component.processMouseEvent(Component.java:6651) at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342) at java.desktop/java.awt.Component.processEvent(Component.java:6416) at java.desktop/java.awt.Container.processEvent(Container.java:2263) at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5026) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4858) at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918) at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547) at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307) at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4858) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:817) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:762) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:405) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:704) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:404) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

java.lang.NullPointerException at org.exbin.bined.delta.SegmentsRepository.closeFileSource(SegmentsRepository.java:73) at org.exbin.bined.intellij.BinEdEditorPanel.closeData(BinEdEditorPanel.java:465) at org.exbin.bined.intellij.BinEdFileEditor$1.lambda$fileClosed$0(BinEdFileEditor.java:82) at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:312) at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:433) at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:416) at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:399) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:817) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:766) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:405) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:704) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:404) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Let me know if you'd like me to try anything else to debug. Like using this plugin a lot, but it's very buggy :) hence happy to contribute.

hajdam commented 5 years ago

Not sure how much can I help with this as I don't have a Mac. :-(

Could you also include information about which version of Idea or other JetBrains IDE are you using and which version of Java?

As this seems to be two parts error, can you also check if behavior changes if you switch to IntelliJ theme in Preferences/Appearance?

Nice to hear that plugin is at least a bit useful thou.

ZR8C commented 5 years ago

Switched over to Darcula theme and then I was able to open hex files no issues. I switched back to Light theme and the issue happened again, couldn't open any. I also tried with the High Contrast theme, and I was able to open files in the hex viewer successfully.

IntelliJ details:

IntelliJ IDEA 2019.2.1 (Ultimate Edition) Build #IU-192.6262.58, built on August 20, 2019 Runtime version: 11.0.3+12-b304.39 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o macOS 10.14.6 GC: G1 Young Generation, G1 Old Generation Memory: 2048M Cores: 4 Registry: terminal.buffer.max.lines.count=50000, debugger.watches.in.variables=false Non-Bundled Plugins: com.alayouni.ansiHighlight, com.ppolivka.gitlabprojects, mobi.hsz.idea.gitignore, net.seesharpsoft.intellij.plugins.csv, org.exbin.deltahex.intellij, org.toml.lang, some.awesome

hajdam commented 5 years ago

From what I can tell, this is more like IntelliJ issue. Workaround is to use Darcula or I removed problematic button for now in the current development version of the plugin: https://bined.exbin.org/download/?bined-intellij-plugin.zip Another option is to use older version of the plugin: https://bined.exbin.org/intellij-plugin/?download#older_releases

I'll try to find some better solution for this later.

grmartin commented 4 years ago

I would like to confirm that as a user with the same issue, the Snapshot version worked:

My Details:

CLion 2019.2.2
Build #CL-192.6603.37, built on September 11, 2019
Subscription is active until November 14, 2020
Runtime version: 11.0.3+12-b304.56 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.5
GC: ParNew, ConcurrentMarkSweep
Memory: 1987M
Cores: 8
Registry: run.processes.with.pty=TRUE
Non-Bundled Plugins: org.exbin.deltahex.intellij
hajdam commented 4 years ago

Hopefully fixed in version 0.2.2 with using toolbar available in intelliJ. Can't test it much, thou.

grmartin commented 4 years ago

I’ll be happy to review in the next day or two. I’ll get back to you!

Sent using the mail.com mail app

On 1/25/20 at 13:14, Miroslav Hajda wrote:

Hopefully fixed in version 0.2.2 with using toolbar available in intelliJ. Can't test it much, thou.

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/exbin/bined-intellij-plugin/issues/22#issuecomment-578429264