ghidra
ghidra copied to clipboard
broken projects ? Cannot invoke "ghidra.framework.data.RootGhidraFolderData.dispose()" because "this.rootFolderData" is null
Describe the bug Just updated to 10.3 provided by my distro, and I cannot open certain existing projects, but others appear to work. Error dialog pasted below
To Reproduce Open existing 10.2 project... I'm trying to find a project that exhibits this problem, and that I can upload here.
Screenshots
Cannot invoke "ghidra.framework.data.RootGhidraFolderData.dispose()" because "this.rootFolderData" is null
java.lang.NullPointerException: Cannot invoke "ghidra.framework.data.RootGhidraFolderData.dispose()" because "this.rootFolderData" is null
at ghidra.framework.data.ProjectFileManager.dispose(ProjectFileManager.java:1184)
at ghidra.framework.data.ProjectFileManager.<init>(ProjectFileManager.java:130)
at ghidra.framework.project.DefaultProject.<init>(DefaultProject.java:128)
at ghidra.framework.project.DefaultProjectManager.openProject(DefaultProjectManager.java:140)
at ghidra.framework.main.FileActionManager.doOpenProject(FileActionManager.java:300)
at ghidra.framework.main.FileActionManager.openProject(FileActionManager.java:245)
at ghidra.framework.main.FileActionManager$2.actionPerformed(FileActionManager.java:99)
at docking.DockingActionProxy.actionPerformed(DockingActionProxy.java:47)
at docking.MenuBarMenuHandler.lambda$processMenuAction$0(MenuBarMenuHandler.java:64)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
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:742)
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)
Environment (please complete the following information):
Build Date: 2023-May-12 1514 CEST Ghidra Version: 10.3 Java Home: /usr/lib/jvm/java-20-openjdk JVM Version: N/A 20.0.1 OS: Linux 5.10.181-2-MANJARO amd64
have you tried 10.3.1 release from github?
have you tried 10.3.1 release from github?
Ah, hadn't noticed that was out already. Will try "soon"
It appears as though this error can still happen. But, there should have been another exception that preceded this one. Please check you log to see if you have any other exceptions just before this one.
Please check you log to see if you have any other exceptions
Just tried again, and the log window only has that same exception I posted, and the next line is simply Error opening project: /home/.....
Will you check in the log file in {user home}/.ghidra/.ghidra_{version}/application.log
?
Will you check in the log file in
{user home}/.ghidra/.ghidra_{version}/application.log
?
Same contents as the Log window.
2023-06-26 12:11:54 ERROR (FileActionManager) Open Project Failed: Error opening project: /home/..... : Cannot invoke "ghidra.framework.data.RootGhidraFolderData.dispose()" because "this.rootFolderData" is null
at ghidra.framework.data.ProjectFileManager.dispose(ProjectFileManager.java:1184)
at ghidra.framework.data.ProjectFileManager.<init>(ProjectFileManager.java:130)
at ghidra.framework.project.DefaultProject.<init>(DefaultProject.java:128)
at ghidra.framework.project.DefaultProjectManager.openProject(DefaultProjectManager.java:140)
at ghidra.framework.main.FileActionManager.doOpenProject(FileActionManager.java:300)
at ghidra.framework.main.FileActionManager$ReopenProjectAction.actionPerformed(FileActionManager.java:749)
at docking.DockingActionProxy.actionPerformed(DockingActionProxy.java:47)
at docking.MenuBarMenuHandler.lambda$processMenuAction$0(MenuBarMenuHandler.java:64)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
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:742)
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)
2023-06-26 12:11:59 ERROR (FileActionManager) Error opening project: /home....
I see. I believe there is an exception happening, but before it can be reported, this exception is triggered instead. Do you have the ability to modify the source code? If so, then you can add a null check inside of the dispose method for this variable and any others that are null when dispose is called. Once you do this, you will see the root cause of the issue.
I have corrected the ProjectFileManager.dispose()
method issue which I believe is masking another exception during instantiation. Hopefully this will get pushed out within the next few days afterwhich you can try it and see the real exception. Let use know what new exception you see.
Hopefully this will get pushed out within the next few days afterwhich you can try it and see the real exception. Let use know what new exception you see.
ed7ddd1b42b546e1a26171d3020d21146360a6e6
Thanks. Just compiled at c3fef96e7bd0b2e65fc738e71f85d6c6db123769 , with JRE 20, and everything seems to be back to normal. The problematic projects are simply some that I work on from 2 different computers, 2 different usernames, so I often get the Project is owned by <other_username>
depending where I worked on it last.
Btw, it would be really nice to have an extra button in that dialog to force taking ownership of project (with the obvious caveats). Otherwise I have to manually edit the .prp file...
Btw, it would be really nice to have an extra button in that dialog to force taking ownership of project (with the obvious caveats). Otherwise I have to manually edit the .prp file...
This request will get lost in this issue. If you would really like that, please create a new ticket.
I have met this problem too,It happened because that the owner of ghidra project is not the same as the user of current system。
There a lot of potential pitfalls with simply switching project-owner in prp file file due to OS/filesystem file ownership issues. The default umask on Linux and the resulting file permissions could result in various file permission failures where user does not have write permission.
due to OS/filesystem file ownership issues.
Yes, I consider that part of the "obvious" caveats that could be listed in a potential dialog box (I filed as separated issue #5507 as recommended).
Had the same issue upgrading from 10.1.3 to 11 in Win10, Java exceptions opening projects, even when entering text for a new project name. In the end, solution was to delete the old GHidra folder and make a new one, instead of extracting the zip on top of the old folder overwriting files as you go. So anybody with the same problem, just nuke the old version and don't overwrite the files in the old folder.
You definitely don't want to extract the folders on top of each other. How was this achieved? The top-level zipped folder has the ghidra version in its name.
In windows you can just open the zip by double clicking, then ctrl-A, ctrl-C then select the Ghidra folder and hit ctrl-V Tada! Nothing but problems.... Don't do this (learn from me)