Skip to content

IDA Plugin crashes with "'NoneType' object has no attribute 'fileno'" after calling "Setup" #475

@OevreFlataeker

Description

@OevreFlataeker

Using the current qiling master branch and the IDA Pro plugin with IDA 7.5 on Windows 10 64 bit with Python 3.8 x64.
Plugin installs correctly. When running "Setup" from the Qiling context menu and choosing a root folder, no matter what I chose, the dialog is finished with

---------------------------------------------------------------------------------------------
Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 23:11:46) [MSC v.1916 64 bit (AMD64)] 
IDAPython 64-bit v7.4.0 final (serial 0) (c) The IDAPython Team <idapython@googlegroups.com>
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
Qiling Emulator Plugin For IDA, by Qiling Team. Version 1.1.1, 2020
Based on Qiling v1.1.1
Find more information about Qiling at https://qiling.io
---------------------------------------------------------------------------------------
Set rootfs success
Qiling initialized done
Traceback (most recent call last):
  File "C:/Users/xxx/qiling/qiling/extensions/idaplugin/Qiling.py", line 408, in activate
    self.action_handler.ql_handle_menu_action(self.action_type)
  File "C:/Users/xxx/qiling/qiling/extensions/idaplugin/Qiling.py", line 942, in ql_handle_menu_action
    [x.handler() for x in self.menuitems if x.action == action]
  File "C:/Users/xxx/qiling/qiling/extensions/idaplugin/Qiling.py", line 942, in <listcomp>
    [x.handler() for x in self.menuitems if x.action == action]
  File "C:/Users/xxx/qiling/qiling/extensions/idaplugin/Qiling.py", line 618, in ql_start
    self.qlemu.start()
  File "C:/Users/xxx/qiling/qiling/extensions/idaplugin/Qiling.py", line 498, in start
    qlstdin = QlEmuMisc.QLStdIO('stdin', sys.__stdin__.fileno())
AttributeError: 'NoneType' object has no attribute 'fileno'

Using an ordinary interactive python 3.8 shell of course prints a proper value for fileno():

C:\Users\xxx>c:\python38\python -c "import sys; print(sys.__stdin__.fileno())"
0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions