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

instrIndex in the current UIActionContext becomes -1 after navigating to a history entry in the linear view #6320

Open
xusheng6 opened this issue Jan 15, 2025 · 2 comments
Assignees
Labels
Component: UI Issue needs changes to the user interface Effort: Low Issue should take < 1 week Impact: Low Issue is a papercut or has a good, supported workaround Type: Bug Issue is a non-crashing bug with repro steps UI: Linear Issues with the Linear view
Milestone

Comments

@xusheng6
Copy link
Member

This is created to track the leftover issue of #6254. Basically, since we are not restoring the instrIndex when we navigate to a history entry in the linear view, it gets its default value (-1). While this behavior is much better than the original behavior (the value is read before initialization and can return anything), it is still not the most desired result.

We cannot simply save the instrIndex into the HistoryEntry object -- since the instrIndex could change in the future. Also, this issue is unlikely to make substantial difference to the user -- since if they randomly click somewhere in the linear view, these things will all be populated correctly. In other words, the instrIndex is only missing when the user does not click anywhere else. In this sense, if we do not find out a good way to restore it, I think it is tolerable to leave it as-is. That said, I am still creating this issue to track the progress and latest status on it

@xusheng6
Copy link
Member Author

Repro steps:

  1. Open any binary and switch to linear view
  2. Double-click a function to navigate to it
  3. Press Escape to go back
  4. Run following code in Python console:
>>> hex(current_ui_action_context.instrIndex)
'0xffffffffffffffff'
  1. Also notice if I click on any other instruction, the value becomes correctly populated:
>>> hex(current_ui_action_context.instrIndex)
'0x4'

@xusheng6 xusheng6 added Type: Bug Issue is a non-crashing bug with repro steps Component: UI Issue needs changes to the user interface Impact: Low Issue is a papercut or has a good, supported workaround Effort: Low Issue should take < 1 week UI: Linear Issues with the Linear view labels Jan 21, 2025
@xusheng6 xusheng6 self-assigned this Jan 21, 2025
@xusheng6 xusheng6 added this to the Gallifrey milestone Jan 21, 2025
@xusheng6
Copy link
Member Author

After extensive discussion, we decide the fix for this would be to NOT call the callback if the instrIndex is -1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: UI Issue needs changes to the user interface Effort: Low Issue should take < 1 week Impact: Low Issue is a papercut or has a good, supported workaround Type: Bug Issue is a non-crashing bug with repro steps UI: Linear Issues with the Linear view
Projects
None yet
Development

No branches or pull requests

1 participant