Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 07-02-2024, 12:02
TQN TQN is offline
VIP
 
Join Date: Apr 2003
Location: Vietnam
Posts: 358
Rept. Given: 143
Rept. Rcvd 24 Times in 13 Posts
Thanks Given: 196
Thanks Rcvd at 168 Times in 51 Posts
TQN Reputation: 24
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
Reply With Quote
  #2  
Old 07-02-2024, 15:42
sendersu sendersu is offline
VIP
 
Join Date: Oct 2010
Posts: 1,293
Rept. Given: 335
Rept. Rcvd 236 Times in 126 Posts
Thanks Given: 325
Thanks Rcvd at 631 Times in 349 Posts
sendersu Reputation: 200-299 sendersu Reputation: 200-299 sendersu Reputation: 200-299
it resembles me this old issue.... https://hex-rays.com/blog/ida-7-4-and-python-3-8/
Reply With Quote
  #3  
Old 07-02-2024, 16:19
aijundi aijundi is offline
Friend
 
Join Date: Jul 2019
Posts: 36
Rept. Given: 1
Rept. Rcvd 0 Times in 0 Posts
Thanks Given: 2
Thanks Rcvd at 30 Times in 16 Posts
aijundi Reputation: 0
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"
Reply With Quote
  #4  
Old 07-02-2024, 18:05
TQN TQN is offline
VIP
 
Join Date: Apr 2003
Location: Vietnam
Posts: 358
Rept. Given: 143
Rept. Rcvd 24 Times in 13 Posts
Thanks Given: 196
Thanks Rcvd at 168 Times in 51 Posts
TQN Reputation: 24
Thanks @aijundi
Replace IDA's sip.pyd with PyQt5's sip.pyd, IDA still crashes
Reply With Quote
  #5  
Old 07-02-2024, 18:24
aijundi aijundi is offline
Friend
 
Join Date: Jul 2019
Posts: 36
Rept. Given: 1
Rept. Rcvd 0 Times in 0 Posts
Thanks Given: 2
Thanks Rcvd at 30 Times in 16 Posts
aijundi Reputation: 0
did you run idapyswitch and select python 3.12 before?
Reply With Quote
  #6  
Old 07-02-2024, 22:57
sendersu sendersu is offline
VIP
 
Join Date: Oct 2010
Posts: 1,293
Rept. Given: 335
Rept. Rcvd 236 Times in 126 Posts
Thanks Given: 325
Thanks Rcvd at 631 Times in 349 Posts
sendersu Reputation: 200-299 sendersu Reputation: 200-299 sendersu Reputation: 200-299
@TQN
does it work with older python (eg 3.11)?
what is the specific error you are observing in 3.12?
Reply With Quote
  #7  
Old 07-03-2024, 05:17
chants chants is offline
VIP
 
Join Date: Jul 2016
Posts: 820
Rept. Given: 46
Rept. Rcvd 50 Times in 31 Posts
Thanks Given: 730
Thanks Rcvd at 1,136 Times in 527 Posts
chants Reputation: 51
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.
Reply With Quote
The Following User Says Thank You to chants For This Useful Post:
niculaita (07-03-2024)
  #8  
Old 07-03-2024, 18:22
sendersu sendersu is offline
VIP
 
Join Date: Oct 2010
Posts: 1,293
Rept. Given: 335
Rept. Rcvd 236 Times in 126 Posts
Thanks Given: 325
Thanks Rcvd at 631 Times in 349 Posts
sendersu Reputation: 200-299 sendersu Reputation: 200-299 sendersu Reputation: 200-299
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?
Reply With Quote
The Following User Says Thank You to sendersu For This Useful Post:
chants (07-04-2024)
  #9  
Old 07-03-2024, 22:08
chants chants is offline
VIP
 
Join Date: Jul 2016
Posts: 820
Rept. Given: 46
Rept. Rcvd 50 Times in 31 Posts
Thanks Given: 730
Thanks Rcvd at 1,136 Times in 527 Posts
chants Reputation: 51
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.
Reply With Quote
The Following User Says Thank You to chants For This Useful Post:
sendersu (07-03-2024)
  #10  
Old 07-03-2024, 22:45
kristamullpass6415 kristamullpass6415 is offline
Friend
 
Join Date: Sep 2023
Posts: 17
Rept. Given: 0
Rept. Rcvd 0 Times in 0 Posts
Thanks Given: 4
Thanks Rcvd at 12 Times in 8 Posts
kristamullpass6415 Reputation: 0
Quote:
Originally Posted by TQN View Post
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.
Reply With Quote
  #11  
Old 07-04-2024, 08:39
TQN TQN is offline
VIP
 
Join Date: Apr 2003
Location: Vietnam
Posts: 358
Rept. Given: 143
Rept. Rcvd 24 Times in 13 Posts
Thanks Given: 196
Thanks Rcvd at 168 Times in 51 Posts
TQN Reputation: 24
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 <support@hex-rays.com>

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.

Last edited by TQN; 07-04-2024 at 08:45.
Reply With Quote
The Following User Says Thank You to TQN For This Useful Post:
niculaita (07-04-2024)
  #12  
Old 07-05-2024, 01:47
chants chants is offline
VIP
 
Join Date: Jul 2016
Posts: 820
Rept. Given: 46
Rept. Rcvd 50 Times in 31 Posts
Thanks Given: 730
Thanks Rcvd at 1,136 Times in 527 Posts
chants Reputation: 51
Full stack trace?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ida Pro Python editor v1 Storm Shadow Developer Section 24 10-05-2017 03:08
x64dbg python Storm Shadow Developer Section 6 08-04-2017 15:29
ollydbg2-python sh3dow Community Tools 0 10-07-2014 04:48


All times are GMT +8. The time now is 23:34.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( 1998 - 2025 )