xzlwbl / idapython

Automatically exported from code.google.com/p/idapython
Other
0 stars 0 forks source link

Function List triggers OnGetLineAttr in Choose2 instance #74

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. run 
http://code.google.com/p/idapython/source/browse/trunk/examples/ex_choose2.py
2. scroll through function list
output window will show lots of "getlineattr n"-entries where n is not an index 
in MyChoose2.items
3. calling reanalyze_function() on any funtion will actually make the color of 
the second entry in the function list (n==1) change to blue

if you would do something like:
def OnGetLineAttr(self, n):
        if self.items[n][0] == True:
            return [COL_1, 0]
this will most likely trow an IndexError (nothing shown in output window) and 
MyChoose will not work properly afterwards

What version of the product are you using? On what operating system?
IDAPython 1.5.2.3 for Windows, IDA Pro 6.1 and Python 2.7 
Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] 

Original issue reported on code.google.com by sviehbo...@gmail.com on 12 Sep 2011 at 4:03

GoogleCodeExporter commented 9 years ago
Yes, spotted. Will be fixed.

Original comment by elias.ba...@gmail.com on 15 Sep 2011 at 10:49