binaryninja-api icon indicating copy to clipboard operation
binaryninja-api copied to clipboard

"Select None" Not Working

Open utkonos opened this issue 1 year ago • 6 comments

Version and Platform (required):

  • Binary Ninja Version: 4.1.5902
  • OS: macOS
  • OS Version: 14.6.1 (23G93)
  • CPU Architecture: x64

Bug Description: The "Select None" entry in the "Edit" menu does not clear the selected instruction when in Linear View. Also, if you have a particular token selected in the Graph View and then use "Select None" the selection of a particular instruction is cleared, but the selection of a particular token remains. Look at the screenshots below to see that the behavior in Linear and the behavior in Graph are both working incorrectly in opposite ways.

Steps To Reproduce:

  1. Set Linear View
  2. Select any instruction line
  3. In the Edit menu click "Select None"
  4. Notice instruction still selected
  5. Change to Graph View
  6. Select one token (eax for example)
  7. In the Edit menu click "Select None"
  8. Notice cleared instruction but remaining token is selected.

Expected Behavior: All selected entities in the view will be unselected

Screenshots/Video Recording: Before: image

After Select None: image

Before: image

After Select None: image

utkonos avatar Aug 20 '24 22:08 utkonos

Btw, I am just curious -- what actually prompts you to use the ""Select None" action? Normally I would think one can do it by just clicking at a location where there is nothing to achieve the same goal

xusheng6 avatar Aug 27 '24 14:08 xusheng6

Clean screenshots of your beautiful UI. Both of those views, when using Select None, leave at least one UI element still selected. And, yes, clicking somewhere else is one workaround, but isn't a workaround for small functions where there isn't anywhere off-screen that one can click.

utkonos avatar Aug 27 '24 14:08 utkonos

A better workaround might be to use Select None from the command palette (Cmd-P), which appears to work correctly in linear view.

fuzyll avatar Aug 27 '24 15:08 fuzyll

@fuzyll Command pallete does the same thing. At least on macos. are you testing on macos?

https://github.com/user-attachments/assets/12f474b4-b141-4395-8db7-1e9a7571a8b3

utkonos avatar Aug 27 '24 16:08 utkonos

Oh, I understand now. No, you are correct, it also doesn't work. It removes all of the selections except for the current line in linear view. I misread what you were saying earlier.

fuzyll avatar Aug 27 '24 16:08 fuzyll

Yes, and interestingly, Graph and Linear have opposite behaviors. Select None leaves the instruction selected or leaves the token selected depending on which view you're looking at.

utkonos avatar Aug 27 '24 17:08 utkonos

Forgot to update this, but I believe Graph View should be fixed as of builds >= 4.2.6025-dev. Linear View was not quite as easy and I haven't finished fixing that yet.

fuzyll avatar Sep 11 '24 14:09 fuzyll

Should be fixed in builds >= 4.2.6105-dev. I had made two changes to linear view earlier, which cancelled each other out. Making just one of them was more successful. 🙂

fuzyll avatar Sep 24 '24 18:09 fuzyll