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

NullPointerException in AbstractCppClassAnalyzer while analyzing libstdc++ #1750

Closed
TheAifam5 opened this issue Apr 12, 2020 · 3 comments
Closed

Comments

@TheAifam5
Copy link

TheAifam5 commented Apr 12, 2020

Describe the bug
Importing 64-bit libstdc++.so.6 on ArchLinux from /usr/lib/libstdc++.so.6 throws a single dialog with a text java.lang.NullPointerException with no callstack or any useful error information. In Attachments section I added the log with the callstack.

To Reproduce
Steps to reproduce the behavior:

  1. Load libstdc++.so.6
  2. Analyze with default options

Expected behavior
IMHO should show more detailed error message like every other plugin does when crashing (I mean the expand button to see more). I don't know if that affected the analysis but such thing should not exists.

Attachments
ArchLinux package containing that file (gcc-libs 9.3.0-1): https://www.archlinux.org/packages/core/x86_64/gcc-libs/

2020-04-12	04:09:12	ERROR	(MessageLog) Exception appended to MessageLog java.lang.NullPointerException
			at ghidra.app.plugin.prototype.CppCodeAnalyzerPlugin.AbstractCppClassAnalyzer.analyzeDestructor(AbstractCppClassAnalyzer.java:241)
			at ghidra.app.plugin.prototype.CppCodeAnalyzerPlugin.AbstractCppClassAnalyzer.fillStructures(AbstractCppClassAnalyzer.java:186)
			at ghidra.app.plugin.prototype.CppCodeAnalyzerPlugin.AbstractCppClassAnalyzer.added(AbstractCppClassAnalyzer.java:108)
			at ghidra.app.plugin.core.analysis.AnalysisScheduler.runAnalyzer(AnalysisScheduler.java:190)
			at ghidra.app.plugin.core.analysis.AnalysisTask.applyTo(AnalysisTask.java:39)
			at ghidra.app.plugin.core.analysis.AutoAnalysisManager$AnalysisTaskWrapper.run(AutoAnalysisManager.java:685)
			at ghidra.app.plugin.core.analysis.AutoAnalysisManager.startAnalysis(AutoAnalysisManager.java:785)
			at ghidra.app.plugin.core.analysis.AutoAnalysisManager.startAnalysis(AutoAnalysisManager.java:664)
			at ghidra.app.plugin.core.analysis.AutoAnalysisManager.startAnalysis(AutoAnalysisManager.java:629)
			at ghidra.app.plugin.core.analysis.AnalysisBackgroundCommand.applyTo(AnalysisBackgroundCommand.java:58)
			at ghidra.framework.plugintool.mgr.BackgroundCommandTask.run(BackgroundCommandTask.java:101)
			at ghidra.framework.plugintool.mgr.ToolTaskManager.run(ToolTaskManager.java:315)
			at java.base/java.lang.Thread.run(Thread.java:830)

Environment (please complete the following information):

  • OS: ArchLinux x64
  • Java Version: 13.0.2
  • Ghidra Version: bcb825f
@mumbel
Copy link
Contributor

mumbel commented Apr 12, 2020

this is not a bug in ghidra and not something that can be fixed here, you should file a bug with the plugin. (just curious is arch packaging this w/ ghidra or did you install it?, edit: nvmd just noticed you're on bcb825f)

https://github.com/astrelsky/Ghidra-Cpp-Class-Analyzer

@astrelsky
Copy link
Contributor

astrelsky commented Apr 12, 2020

Yes this is my fault.

I guess I should make it clear that it came from my plugin before appending something to the message log.

Just for clarification, this is occurring on import?

@TheAifam5
Copy link
Author

Oh... I wasnt sure about that from where that error even comes.
It occurs while analyzing: All options default + GCC RTTI (Fundamental Types) + C++ Class Analyzer (Fill Class Fields and Locate Constructors)

I am going to open the issue in astrelsky/Ghidra-Cpp-Class-Analyzer since is not Ghidra related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants