xzlwbl / idapython

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

Chooser gets garbage collected(access violation) #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a chooser(not dialog box). and immediately call choose
2. Press on the items in the list
3.

What is the expected output? What do you see instead?
Not access violation :)

What version of the product are you using? On what operating system?
0.9.0

Please provide any additional information below.
Example code:
Choose(['aaa','bbb'], 'dd',0).choose() # this should crash IDA

If you write:
c = Choose(['aaa','bbb'], 'dd',0)
c.choose()

It will work(probably because the reference in c), but after
some time it will crash if you try to press the list(This only
happened when I created a complex chooser).

Original issue reported on code.google.com by stam.co...@gmail.com on 2 Jul 2008 at 7:47

GoogleCodeExporter commented 9 years ago
-- It will work(probably because the reference in c), but after
-- some time it will crash if you try to press the list(This only
-- happened when I created a complex chooser).
It also happened in a simple chooser but only when it was created
from a script(not the script box) and it took some time.

Original comment by stam.co...@gmail.com on 2 Jul 2008 at 7:54

GoogleCodeExporter commented 9 years ago

Original comment by gergely.erdelyi on 27 Sep 2008 at 1:57

GoogleCodeExporter commented 9 years ago
The problem was the class, which is required by the callbacks got garbage 
collected as choose() return
immediately for non-modal choosers.
Now, there is a workaround for the problem that adds a circular self-reference 
for non-modal choosers.

Original comment by gergely.erdelyi on 10 Dec 2008 at 2:17