-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exceptions in customizers __jclass_init__ crash the JVM #1198
Comments
I did not get a crash on my machine. Perhaps we need more details in terms of versions or arch....
|
Windows 10 and 11. JDK 21, 22 and JDK 8. Python 3.11.7, 3.12.1 and 3.8.10. I tried the lowest supported versions of Java and Python that had pre-built wheels for Jpype1 (to eliminate variables), that I could get my hands on. Also I had to debug the setup.py script and step through it to change the flags to get a release build with debug info. If you do |
Got it. Will try though I have a few other items in the queue already. Edit: I was successfully able to replicate the issue with Windows 11 so I have a place to work from. |
I understand the issue. The problem is to prevent name mangling we are declaring functions as The problem was compounded because the |
A PR with the fix is posted. It will be included in the next release. Though I haven't seen any responses from the maintainer in a while so not sure when it will get reviewed. |
Nice, that was quick. Thank you very much. |
It was a one liner. So not that impressive. The longer job would be verifying all of the other calls in module dont have the same problem. |
I did take a quick look yesterday and I think everything else is ok. |
Below is a silly example to reproduce the problem. I just picked a class at random that didn't have a customizer provided by jpype. There is no purpose for a customizer for this class other then demonstrating the issue.
The crash appears to be from an uncaught exception in
PyJPClass_hook
around (pyjp_class.cpp:1200)The text was updated successfully, but these errors were encountered: