joxeankoret / diaphora

Diaphora, the most advanced Free and Open Source program diffing tool.
http://diaphora.re
GNU Affero General Public License v3.0
3.6k stars 371 forks source link

Error when diffing from command line, probably a missing initialization #186

Closed lazytanuki closed 4 years ago

lazytanuki commented 4 years ago

Hello there !

To begin with I'd like to thank you for your work ! :)

So when I use the diffing mode in command line as documented, I find myself with the following error :

PS C:\Users\user\Desktop\diaphora> python .\diaphora.py ..\zlib.sqlite ..\r1.sqlite
[Mon Apr  6 10:28:40 2020] Diffing...
[Mon Apr  6 10:28:40 2020] Callgraphs are absolutely different
[Mon Apr  6 10:28:40 2020] Finding best matches...
Traceback (most recent call last):
  File ".\diaphora.py", line 2161, in <module>
    bd.diff(db2)
  File ".\diaphora.py", line 2088, in diff
    self.find_equal_matches_parallel()
  File ".\diaphora.py", line 1038, in find_equal_matches_parallel
    self.run_heuristics_for_category("Best")
  File ".\diaphora.py", line 1053, in run_heuristics_for_category
    if self.hooks is not None:

I added an initialization in diaphora.py at line 227 :

self.hooks = None

This made it work, however as I haven't got the time to look at how it is managed throughout the code, I have no idea if it has any unwanted impact.

Have a good day !

joxeankoret commented 4 years ago

First time I see this bug, thanks for reporting!

AxelPotato commented 4 years ago

I would like to add that this has also helped me ! Had the exact same issue and it did fix it for me.

In my case I was running the default python version coming with Ubuntu 20.04. If this helps in any way.

Also I am a big fan of this tool :) so thank you very much.

joxeankoret commented 4 years ago

Thanks to you :) I've pushed the change: https://github.com/joxeankoret/diaphora/commit/05ff30b4b1463f8bd63da87276555a9721f9ca98