Exetools

Exetools (https://forum.exetools.com/index.php)
-   General Discussion (https://forum.exetools.com/forumdisplay.php?f=2)
-   -   IDA 8.3 and Python 3.12 (https://forum.exetools.com/showthread.php?t=21045)

TQN 07-02-2024 12:02

IDA 8.3 and Python 3.12
 
Has anyone been able to run IDA 8.3 leaked well with Python 3.12?
I have fixed the imp module of old Python to importlib module of Python 3.12.
But IDA 8.3 (and 7.7) both crash with IDAPython plugins that use PyQt5?
Please share the patch/fix.
Thanks and brgds

sendersu 07-02-2024 15:42

it resembles me this old issue.... https://hex-rays.com/blog/ida-7-4-and-python-3-8/

aijundi 07-02-2024 16:19

Install pyqt5 with your version of python "pip install pyqt5". Go to the location of its installation. Copy "sip.***.pyd" to "ida\python\3\PyQt5" and rename it to "sip.pyd"

TQN 07-02-2024 18:05

Thanks @aijundi
Replace IDA's sip.pyd with PyQt5's sip.pyd, IDA still crashes

aijundi 07-02-2024 18:24

did you run idapyswitch and select python 3.12 before?

sendersu 07-02-2024 22:57

@TQN
does it work with older python (eg 3.11)?
what is the specific error you are observing in 3.12?

chants 07-03-2024 05:17

According to:
Quote:

https://hex-rays.com/products/ida/news/8_3/
Quote:

IDAPython: added support for Python 3.12
Yet according to:
Quote:

https://hex-rays.com/products/ida/news/8_4/
Quote:

BUGFIX: IDAPython: IDAPython would fail to initialize on Python 3.12 release due to missing 'imp' module
BUGFIX: IDAPython: plugins using PyQt5 would crash IDA when using Python 3.12 release build
So it sounds like Python 3.12 debug version is supported in 3.12 only and only in 8.3 not 7.7. 8.4 fixes the issue, would need to custom patch otherwise which would require finding the underlying technical issue in the IDA Python libs which is debatable if it is worth it.

sendersu 07-03-2024 18:22

Python 3.12.0
Release Date: Oct. 2, 2023

IDA 8.3.230608
Release Date: June 8, 2023

means 8.3 used some pre-release 3.12 build?

chants 07-03-2024 22:08

According to:
Quote:

https://peps.python.org/pep-0693/
Quote:

3.12 development begins: Sunday, 2022-05-08
3.12.0 alpha 1: Monday, 2022-10-24
3.12.0 alpha 2: Monday, 2022-11-14
3.12.0 alpha 3: Tuesday, 2022-12-06
3.12.0 alpha 4: Tuesday, 2023-01-10
3.12.0 alpha 5: Tuesday, 2023-02-07
3.12.0 alpha 6: Tuesday, 2023-03-07
3.12.0 alpha 7: Tuesday, 2023-04-04
3.12.0 beta 1: Monday, 2023-05-22 (No new features beyond this point.)
3.12.0 beta 2: Tuesday, 2023-06-06
So it was just into beta period at that point. I guess by support they only meant they bumped a requirement version, and maybe tested some beta debug version for confirmation.

kristamullpass6415 07-03-2024 22:45

Quote:

Originally Posted by TQN (Post 131231)
Has anyone been able to run IDA 8.3 leaked well with Python 3.12?
I have fixed the imp module of old Python to importlib module of Python 3.12.
But IDA 8.3 (and 7.7) both crash with IDAPython plugins that use PyQt5?

What are plugins that are crashing? Most are working fine for me. I will try to help.

TQN 07-04-2024 08:39

All plugins which import/uses PyQt5.
For example, test with capa, telnet, lighthouse...

Crash text:
"IDA v8.3.230608 has encountered a problem.
Please send this information and, if possible, steps to reproduce the problem to <[email protected]>

Exception code: C0000005 Exception Flags: 00000000 Exception address: D39A137D
Parameters: 00000000, FFFFFFFF, 00000000"

From dump file, I debug and found, exception throwed from idapython.dll, extlang remove function.

"Oops! internal error 1442 occurred.
Further work is not possible and IDA will close.
Would you like to create a crash dump for a bug report?"

I will rebuild IDAPython from github repo source for IDA 8.3 and IDA 8.4 free and try test.

My old Python is 3.9.
IDA 77 and 8.3 run well with Python 3.9
I update to 3.12 because many lib/package Python out of support for Python 3.9. For example: ipython, jupyter...

I am thinking: not a bug of IDAPython, but bug occurred from the Qt5 private patched of Hexrays.

chants 07-05-2024 01:47

Full stack trace?


All times are GMT +8. The time now is 17:48.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX