ViewFrame seems uninitialized when using UIContext.createTabForWidget

Open
#1,442 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
desktop

Research direction

Start with UIContext.createTabForWidget and trace how it creates a tab for an existing View such as LinearView or HexEditor. Reproduce the navigation-dialog crash in ViewFrame::getHistoryEntry and the graph-switch crash in ViewFrame::getTypeForView(QWidget*); done means these operations no longer crash for widgets added through this path.

Written by the indexing model from the issue text.

Description

Component: API Component: UI Effort: Medium Impact: Low

Multiple ViewFrame methods crash Binary Ninja when creating a new tab for an existing View widget like LinearView and HexEditor. I've found at least two methods crash, there's probably more. The two I've found to crash are ViewFrame::getHistoryEntry and ViewFrame::getTypeForView(QWidget*).

The first one occurs whenever the user tries to use the navigation dialog (g) to change location. Scrolling and clicking around works fine, but as soon as the dialog is used, it crashes on ViewFrame::getHistoryEntry().

The second one occured with a LinearView when I accidentally pressed the space bar and it tried to switch to the Graph view. That one crashed on ViewFrame::getTypeForView(QWidget*).

I suspect that the ViewFrame is not being created or initialized, which is causing null derefs when its member fields are accessed.

Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Vector35/binaryninja-api

All issues in Vector35/binaryninja-api

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.