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

Multiple tabs in visual panel mode get overwritten by loaded layout when switching #23267

Open
grindingpeon opened this issue Sep 1, 2024 · 5 comments

Comments

@grindingpeon
Copy link

Environment

2024-09-01T18:06:30 CEST
radare2 5.9.2 0 @ linux-x86-64
birth: git.5.9.2 2024-08-01__08:35:56
options: gpl release -O1 cs:5 cl:2 meson
Linux x86_64

Description

When using visual panel mode and loading my default layout with v default I try to create another tab.
But when switching back to the first one the second gets overwritten with the loaded layout.
I.e. I cannot have different layouts in the different tabs while they all get overwritten to the one loaded.
Is this on purpose or how can I keep the different layouts in the different tabs?

@grindingpeon
Copy link
Author

I guess a video can show exactly what I mean:

r2-visual-panel-tab-issue.mp4

@trufae
Copy link
Collaborator

trufae commented Sep 1, 2024

Looks like a bug to me. Each tab should have a different layout

@grindingpeon
Copy link
Author

Is there a way I can help solving the bug? 🤔
I am not the most proficient in C and debugging.

@trufae trufae added this to the 5.9.6 - corteza milestone Sep 16, 2024
@trufae
Copy link
Collaborator

trufae commented Oct 10, 2024

Sorry i had other priorities and being busy, sure it will be great if you can try to fix the bug by yourself. Can you join the Discord o rTelegram chats? the best way to debug in panels is by using eprintf()+sleep(1). but feel free to investigate by reading the code and making few changes to unsderstand the behaviour .

can you give me the keys you press so i can repro? because by using it the way i do it seems to work fine for me

@grindingpeon
Copy link
Author

Yes, will join at some point, don't have time to work on it atm.

This is my layout named default stored inside ~/.local/share/radare2/r2panels:

{"Title":"Disassembly","Cmd":"pd","x":0,"y":1,"w":99,"h":28},{"Title":"Hexdump","Cmd":"xc $r*16","x":0,"y":28,"w":87,"h":19},{"Title":"RegisterRefs","Cmd":"drr","x": 98,"y":1,"w":76,"h":28},{"Title":"Stack","Cmd":"pxr@r:SP","x":86,"y":28,"w":88,"h":19}

To reproduce I type:

r2 -AA /bin/ls
# inside radare2
v default
v
# open new tab
tt
# switch
t2
# change layout
"j<enter>
# switch back to first tab
t1
# switch back to second tab
t2
# the layout has been changed to to the default :/

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

2 participants