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

[Bug] NullPointerException: Cannot invoke "String.contains(java.lang.CharSequence)" because the return value of "com.intellij.openapi.vfs.VirtualFile.getCanonicalPath()" is null at OverrideTemplateInThemeAction.java:58 #1177

Closed
Knase opened this issue Sep 8, 2022 · 4 comments
Assignees
Labels

Comments

@Knase
Copy link

Knase commented Sep 8, 2022

Describe the bug (*)

A clear and concise description of what the bug is.

java.lang.NullPointerException: Cannot invoke "String.contains(java.lang.CharSequence)" because the return value of "com.intellij.openapi.vfs.VirtualFile.getCanonicalPath()" is null
	at com.magento.idea.magento2plugin.actions.generation.OverrideTemplateInThemeAction.isOverrideAllowed(OverrideTemplateInThemeAction.java:58)
	at com.magento.idea.magento2plugin.actions.generation.OverrideFileInThemeAction.update(OverrideFileInThemeAction.java:55)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performDumbAwareUpdate$0(ActionUtil.java:150)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:173)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.doUpdate(ActionUpdater.java:660)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$updateActionReal$4(ActionUpdater.java:128)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$computeOnEdt$6(ActionUpdater.java:211)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:66)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:66)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$computeOnEdt$7(ActionUpdater.java:207)
	at com.intellij.openapi.actionSystem.impl.ActionUpdateEdtExecutor.lambda$computeOnEdt$0(ActionUpdateEdtExecutor.java:45)
	at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:194)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:881)
	at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:513)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:75)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:118)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:42)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:779)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:730)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:724)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:749)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:918)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:766)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:450)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:791)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:449)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113)
	at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:624)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:447)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:881)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:493)
	at com.intellij.openapi.actionSystem.impl.Utils.lambda$expandActionGroupImpl$3(Utils.java:235)
	at com.intellij.openapi.actionSystem.impl.Utils.runLoopAndWaitForFuture(Utils.java:778)
	at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroupImpl(Utils.java:233)
	at com.intellij.openapi.actionSystem.impl.Utils.lambda$fillMenu$6(Utils.java:317)
	at com.intellij.openapi.actionSystem.impl.Utils.computeWithRetries(Utils.java:808)
	at com.intellij.openapi.actionSystem.impl.Utils.fillMenu(Utils.java:316)
	at com.intellij.openapi.actionSystem.impl.ActionPopupMenuImpl$MyMenu.lambda$updateChildren$2(ActionPopupMenuImpl.java:172)
	at com.intellij.util.TimeoutUtil.run(TimeoutUtil.java:59)
	at com.intellij.openapi.actionSystem.impl.ActionPopupMenuImpl$MyMenu.updateChildren(ActionPopupMenuImpl.java:171)
	at com.intellij.openapi.actionSystem.impl.ActionPopupMenuImpl$MyMenu.show(ActionPopupMenuImpl.java:123)
	at com.intellij.ui.PopupHandler$2.invokePopup(PopupHandler.java:142)
	at com.intellij.ui.PopupHandler.mousePressed(PopupHandler.java:47)
	at java.desktop/java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:288)
	at java.desktop/java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:287)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6645)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3392)
	at com.intellij.ui.treeStructure.Tree.processMouseEvent(Tree.java:422)
	at com.intellij.ide.dnd.aware.DnDAwareTree.processMouseEvent(DnDAwareTree.java:44)
	at java.desktop/java.awt.Component.processEvent(Component.java:6413)
	at java.desktop/java.awt.Container.processEvent(Container.java:2266)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5022)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4572)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
	at java.d

To Reproduce (*)

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior (*)

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Please complete the following information: (*)

  • OS: Linux 5.15.0-46-generic
  • PhpStorm/Intellij version: 2022.2.1
  • Plugin Version: 4.3.1

Additional context

Mainline branch: 4.4.1-develop

@Knase Knase added the bug label Sep 8, 2022
@m2-assistant
Copy link

m2-assistant bot commented Sep 8, 2022

Hi @Knase. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.

Add a comment to assign the issue: @magento I am working on this


@bohdan-harniuk bohdan-harniuk changed the title Bug Report 2022/09/08 [Bug] NullPointerException: Cannot invoke "String.contains(java.lang.CharSequence)" because the return value of "com.intellij.openapi.vfs.VirtualFile.getCanonicalPath()" is null at OverrideTemplateInThemeAction.java:58 Sep 13, 2022
@bohdan-harniuk bohdan-harniuk self-assigned this Sep 13, 2022
@makzef
Copy link

makzef commented Sep 16, 2022

@magento I am working on this

@makzef
Copy link

makzef commented Oct 4, 2022

Hello @bohdan-harniuk.

Issue is a duplicate of #1106 and has been resolved in #1125.
@Knase the fix is available in 4.4.0 version of plugin, so please update.
I assume it can be closed now.

Thank you.

@Knase
Copy link
Author

Knase commented Oct 4, 2022

@makzef Thanks)))

@Knase Knase closed this as completed Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants