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

Decompilation output is shown in a wrong window when clicking inside Output window #12

Closed
s3rvac opened this issue Jan 14, 2018 · 3 comments

Comments

@s3rvac
Copy link
Member

s3rvac commented Jan 14, 2018

Steps to reproduce

  1. Open IDA.
  2. Select any file. Answer OK or Yes to all questions (if any).
  3. Click anywhere inside the input file in the IDA View-A window.
  4. Start decompilation.
  5. Right after the decompilation is started, click inside the Output window.

Behavior

After the decompilation finishes, its output is shown in a window right next to the Output window:

idaplugin-output-window

Expected behavior

The decompilation output should be shown in a window right next to the IDA View-A window, which is where it opens when skipping step 5 above. That is, it should appear in the usual place.

Configuration

  • Commit: e249927 (current master)
  • 64b Arch Linux, GCC 7.2.1, Debug build of IDA plugin
  • IDA version 6.9.160222 (32-bit), Linux
@PeterMatula
Copy link
Collaborator

Rewrite to IDA SDK 7.0 did not help. This is still happening.

I tried to solve it, but I did not succeed. I tried to play with different WOPN_ combinations, different parent widgets for create_custom_viewer(), and looked for related functionality in kernwin.hpp, but nothing helped.

I have no more ideas, maybe someone can help.

@PeterMatula
Copy link
Collaborator

This issue is even worse I realized. Weird RetDec window jumping is also happening when function renaming action happens. The window gets docked to the right of the current ASM output window. I played around with set_dock_pos(), get_current_widget(), and get_current_viewer(), but so far no luck.

@PeterMatula
Copy link
Collaborator

PeterMatula commented Sep 18, 2019

Getting a get_current_widget() when decompilation is triggered and activate_widget() it before display_widget() of decompilation result works, but the problem is if the widget that was taken is closed in the meantime. That will cause segfault.

Simple solution is to use jumpto(decompiled_function->start_ea) before showing the function. This should be always safe and it should take care of all the problems I can think of at the moment. The only downside is that we are changing position in IDA view without users requesting it. But it is probably not a big problem.

fengjixuchui added a commit to fengjixuchui/retdec-idaplugin that referenced this issue Oct 8, 2019
code_viewer.h: fix avast#12, activate disasm IDA view window before showin…
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants