gaasedelen / tenet

A Trace Explorer for Reverse Engineers
MIT License
1.31k stars 132 forks source link

Error: `argument 1 has unexpected type 'float'` #15

Open donghyunlee00 opened 2 years ago

donghyunlee00 commented 2 years ago

Errors argument 1 has unexpected type 'float' occurred in Qt functions.

image

wr-web commented 2 years ago

You can convert self._dpi_scale to int in waitbox.py solving this problem. :( Afterward I find so many type problem....

ferib commented 1 year ago

I ended up solving this by replacing every self._dpi_scale with a fixed value in waitbox.py. Is there any clean way to fix this?

Surprised to see this worked as-is on OSX but not on Windows 🙃

Edit: Ended up doing self._dpi_scale = int(get_dpi_scale()*5.0) at waitbox.py:65, seems to work fine now

nasroabd commented 1 year ago

I am still not able to get it to fully work on my end, I tried your fork @ferib but I get the following errors:

Screenshot 2023-05-14 at 1 52 57 AM

Help is much appreciated, please and thank you!

ferib commented 1 year ago

Hey, I had some issues with my IDA Pro 8.1 and the Python version I used as the plugin made my IDA crash. I just upgraded to 8.2 and I can see those errors as well now 🤔

nasroabd commented 1 year ago

@ferib on which version of IDA and Python you got it to work previously?

ferib commented 1 year ago

I used IDA 8.1 with Python 3.11.x, I was told to upgrade to 8.2.

I am currently looking in the 'new' errors I get in 8.2

nasroabd commented 1 year ago

yeah same I am using IDA 8.2, thank you for looking into it!

please keep me posted, much appreciated!

ferib commented 1 year ago

@MrNasro I added some more int(), I cba to figure out which place is best so I took wherever IDA started to complain.

https://github.com/gaasedelen/tenet/commit/2bb443afd00da40b2905afc4c7c965849a298ac4

Not sure why but when clicking around in the timeline window I crash randomly for some reason 🤔

nasroabd commented 1 year ago

yeah I still see some errors and it does not seem to be functioning correctly :/ I wonder if it is the version of Python or IDA, in the original repo it does not mention which versions they got it to work on.

J-jaeyoung commented 1 year ago

yeah I still see some errors and it does not seem to be functioning correctly :/ I wonder if it is the version of Python or IDA, in the original repo it does not mention which versions they got it to work on.

@MrNasro I also have the same problems and only python under 3.10 works fine on me without any code patch. (exactly, 3.9.11) This issue seems to be related to the deprecated implicit conversion after python 3.10.

Ana06 commented 4 months ago

I get the same error in IDA 8.3 with Python 3.10:

C:\Users\flare\AppData\Roaming\Hex-Rays\IDA Pro\plugins\tenet_plugin.py: setSpacing(self, int): argument 1 has unexpected type 'float'

J-jaeyoung commented 4 months ago

I get the same error in IDA 8.3 with Python 3.10:

Python 3.9.xx will solve the issue

Ana06 commented 4 months ago

@J-jaeyoung

Python 3.9.xx will solve the issue

Yes, as you mentioned before the issue looks related to the deprecated implicit conversion.

I would like to add this plugin to FLARE-VM and we are using Python 3.10. Decreasing the Python version affects other libraries and plugins, so this is not an option and we are rather looking into increasing the Python version. Note also there seem to be a bug in the latest version of IDA Pro (8.4) and IDApython only runs with Python 3.12: https://github.com/mandiant/VM-Packages/issues/1017 So I hope @gaasedelen finds time to fix the issue (or review the PR that appear to fix the issue: https://github.com/gaasedelen/tenet/pull/18). :wink: