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

BSimFeatureVisualizer: NullPointerException is raised when selecting some features #7311

Closed
gemesa opened this issue Dec 20, 2024 · 0 comments
Assignees
Labels
Feature: BSim Status: Internal This is being tracked internally by the Ghidra team
Milestone

Comments

@gemesa
Copy link
Contributor

gemesa commented Dec 20, 2024

Describe the bug
When inspecting BSim features in BSimFeatureVisualizer, sometimes a NullPointerException is raised when selecting a feature.

To Reproduce
Steps to reproduce the behavior:

  1. Import the attached rust-rayon2-strip binary and auto-analyze it
  2. Go to BSim --> BSim Feature Visualizer
  3. Select the feature e8550d61 in the table
  4. See the NullPointerException

Expected behavior
No NullPointerException raised.

Screenshots

image

image

Attachments
rust-rayon2-strip.zip

Environment (please complete the following information):

  • OS: Linux fedora 6.12.4-200.fc41.x86_64
  • Java Version: openjdk 21.0.4 2024-07-16 LTS
  • Ghidra Version: 11.3_DEV
  • Ghidra Origin: locally built from the GitHub repo without any changes (commit 8bbc1d054075d0626eba621b470077a17e3dc16a)

Additional context
Full error log:

Cannot invoke "ghidra.app.decompiler.ClangLine.getLineNumber()" because the return value of "ghidra.app.decompiler.ClangToken.getLineParent()" is null
java.lang.NullPointerException: Cannot invoke "ghidra.app.decompiler.ClangLine.getLineNumber()" because the return value of "ghidra.app.decompiler.ClangToken.getLineParent()" is null
	at ghidra.bsfv.BsfvTokenHighlightMatcher.start(BsfvTokenHighlightMatcher.java:129)
	at ghidra.app.decompiler.component.ClangDecompilerHighlighter.applyHighlights(ClangDecompilerHighlighter.java:91)
	at ghidra.bsfv.BsfvTableProvider.lambda$buildTablePanel$0(BsfvTableProvider.java:190)
	at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:231)
	at docking.widgets.table.RowObjectSelectionManager.superFireValueChanged(RowObjectSelectionManager.java:189)
	at docking.widgets.table.RowObjectSelectionManager.fireValueChanged(RowObjectSelectionManager.java:168)
	at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:206)
	at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:258)
	at java.desktop/javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:459)
	at java.desktop/javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:469)
	at java.desktop/javax.swing.DefaultListSelectionModel.setSelectionInterval(DefaultListSelectionModel.java:513)
	at java.desktop/javax.swing.JTable.changeSelectionModel(JTable.java:2441)
	at java.desktop/javax.swing.JTable.changeSelection(JTable.java:2510)
	at java.desktop/javax.swing.plaf.basic.BasicTableUI$Handler.adjustSelection(BasicTableUI.java:1145)
	at java.desktop/javax.swing.plaf.basic.BasicTableUI$Handler.mousePressed(BasicTableUI.java:1068)
	at java.desktop/java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:287)
	at java.desktop/java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:287)
	at java.desktop/java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:287)
	at java.desktop/java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:287)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6618)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3398)
	at java.desktop/java.awt.Component.processEvent(Component.java:6386)
	at java.desktop/java.awt.Container.processEvent(Container.java:2266)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4996)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4828)
	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.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4828)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:775)
	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.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:98)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:747)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
	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:744)
	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)

---------------------------------------------------
Build Date: 2024-Dec-20 1528 CET
Ghidra Version: 11.3
Java Home: /home/gemesa/.sdkman/candidates/java/21.0.4-tem
JVM Version: Eclipse Adoptium 21.0.4
OS: Linux 6.12.4-200.fc41.x86_64 amd64
Workstation: fedora
@ryanmkurtz ryanmkurtz added Status: Triage Information is being gathered Feature: BSim labels Dec 23, 2024
@ghidracadabra ghidracadabra added Status: Internal This is being tracked internally by the Ghidra team and removed Status: Triage Information is being gathered labels Jan 10, 2025
@ryanmkurtz ryanmkurtz added this to the 11.3 milestone Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: BSim Status: Internal This is being tracked internally by the Ghidra team
Projects
None yet
Development

No branches or pull requests

3 participants