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
NullPointerException ghidra.program.model.data.DataTypeManager.getUniversalID()
#4578
Comments
This should not be possible in the normal work flow. The implication is that a Data Type Manager was closed off of the Swing thread or that the JTree did not get notified that the manager was closed. Do you recall what you were doing when this happened? |
@dragonmacher I added new things to the Data Type Manager, where I had 2 folders and both contained a struct called But it is still happening. Basically I can't use the Data Type Manager at all rn. Whenever I try to access anything from it, it will throw this error. |
I see. It seems like it is in a bad state. Does the issue go away if you restart Ghidra? |
@dragonmacher no, this issue doesn't go away.
|
The struct types in the functions are still labelled correct and still show all the fields btw. |
When you added the types mentioned above, did you do so via a script or through the UI? Are you manipulating types via a script? |
Edit: I can modify these structs and point to other structs except the ones that I added when it broke, but the suggestions are missing thats why I thought only the default windows ones work. |
No, I didn't use a script. I did it through the UI. I actually never used scripts with Ghidra. |
We would like to examine your binary. Will you export your program as a .gzf file and then post it here? |
Any way to share this file not in public? |
This is the only forum we are currently using for sharing. You can try to isolate the offending type(s). First, make a copy of your binary in the front end so that you can freely make changes, reverting back to the original as desired. In the copy, start removing the types you believe caused the issue. If there is only one or a few offending types, then finding them should be relatively easy. Hopefully, once those types are removed, the issue will go away. At that point, we would like you to re-create the types to see if the issue returns. Being able to isolate the characteristics of that type should allow us to reproduce the issue by following the steps you used to create the type. Once we understand the issue, we may be able to offer guidance on how to fix those types in the original version of your binary. |
Okay but how can I remove the types? I cannot expand the folder in Data Type Manager UI. |
I see. Scripting may be the only way to do this then. You can try creating this new script via the Script Manager window. Press the new script button on the toolbar. Create a Java scirpt. Name it 'FindBadTypesScript.java' and then paste these contents in the editor:
Let us know if the script produces any output when you run it. |
Output:
|
Now replace the contents of the
|
|
added now the output is:
|
My mistake. Try overwriting the complete contents with this:
|
Output is still:
|
Try this:
|
Output:
|
Try this:
|
Output:
|
Okay I know how I created this error. |
So, that is the problem. Is |
No I just typed |
This is not a type that we provide. It appears as though it is from this repo: Do you have this extension? Or any other extension to Ghidra that may be using this? |
Yes I have this extension. It is literally the only thing that I have and I didn't even use this ever. |
Okay everything works fine if I disable this extension. |
Edit: I just saw your message. Good to see you were able to work around the issue. Otherwise, this should have worked for you:
|
Thanks for your help! |
It's all my fault, what else is new 😅. Sorry about that. I remember seeing this yesterday and just thinking, wth this should be impossible. |
Perhaps you can think of this as helping to bring the community together? |
🤔 Well when you put it that way, I wonder what else I can break. |
The text was updated successfully, but these errors were encountered: