-
Notifications
You must be signed in to change notification settings - Fork 186
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
Crash on Windows 10 startJVM() #544
Comments
See details from the Windows Event Viewer:
|
Just to clarify, running on Windows 10 64 bits. |
I will have to see if I can replicate this. I don't currently have that setup available in my installed software, but it should have been covered in the CI. |
Hi Thrameos, any update on this issue ???? |
It works for me. I believe your problem is a site issue.
|
Jpype 0.6.3 has a number of crashes including one when the JVM finder grabs the wrong architecture dll. Though the orginal report appears correct. Jpype 0.7.0 has addressed all of those issues and issues an error if you attempt to force the wrong JVM. I attempted to replicate the reported error using 0.7.0 and every test was successful (worked or properly reported) thus it either must be old software, machine configuration such as bad jvm, or so local problem with modifications. Unfortunately if i cant replicate it i cant address it thus my best guess is a site specific problem. All i can say is upgrade/reinstall so that it is as current as possible, then use enable tracing to capture the fault point if it is still happening. I ran for one year with 0.6.3 with windows 10 32 bit so i know that that configuration could be made to work. |
@Thrameos thank you for the response. How do I enable tracing? I haven't heard that phrase before. |
It somewhat depends on version. Older versions require a modification to the header file should be found with grep on TRACING. Newer versions merely require giving |
One last note, I do not have a pattern to get the visual studio to debug JPype. The issue is that JVM intentionally triggers a segfault during startup as part of its testing that its hooks are installed. I have patterns to bypass the check for gdb but not for visual studio. |
Hi, Is there any update on this one? I'm getting "Process finished with exit code -1073740791 (0xC0000409)" while I'm trying to startJVM(). Thanks, |
You can try the project/debug/windows directory on how to diagnose this type of issue. As far as I am aware problems with starting up are usually site specific problems, (mismatched libraries, missing files, etc). We have certain guards against obvious problems but there is no programmatic way to detect many of these issues. Since is no way for me to know all of the ways that a particular site can be messed up, I posted a guide to help people solve their site issues. |
Thanks for your update, unfortunately, I'm still not able to run jpype over the 32-bit environment. |
Missing DLLS would definitely prevent the JVM from running. It seems like the issue has been diagnosed. Assuming you can correct the missing 32-bit DLLs, it should work. |
Hi,
|
Do you have a 32 bit JVM? There most common problem here is starting a 32 bit python and then loading a 64 bit jvm dll. Second most common is a dll conflict. That is the 32 bit python or dll loaded in python does not match one supplied by the 32 bit jvm. When the jvm starts rather than loading the expected copy it gets the memory copy which is missing symbols. Hence a crash. Unfortunately these are generally site issues in which the jvm and python installs were taken from builds that dont match those that we test on. Usually caused by building with tools from different eras. Searching on github you will find plenty of reports of such bad combinations. The fixes listed are get python from this sounce and java from that and it will work. As we dont control either distributions it is difficult to solve. |
Well my JVM is indeed 32 bits, because when I try to start with a 64 bits Python, I get : |
At least that catch is working. So next you would need to look for conflicts in the dlls. |
I have no clue where to start looking for that kind of conflict. What DLLs are we talking about ? Java's or Python's ? |
You will have to find the dlls that were loaded by both Java and Python and look for a conflict (any dll that is on both but resolves to a different location.) That is the most likely source of a conflict. As for how to do this task, I can't be of a lot of help. When I was working with windows I used the program cygcheck which was able to list all the dependencies and how they will be resolved. There are other windows tools such as dumpbin that get at the information. Unfortunately those don't show how it is resolved and they don't traverse into the dlls to find those with additional dependencies. https://stackoverflow.com/questions/475148/how-do-i-find-out-which-dlls-an-executable-will-load Assuming you can't find a 3rd party tool that examines the executable and finds dependencies, you can look to see what dlls are in the distributions of Python and Java. For the Java side I believe all the dlls it uses are located under |
Interesting. How did jpype get built for this python version? It may be a problem with the build tools rather than a dll conflict. It may be required to build JPype with debugging symbols to figure out the crash point. But before doing thatperhaps rolling back to Python 3.9 would be best. 3.11 had some API changes that were a challenge to work around regarding memory allocation. |
Well I stumbled upon this thread on Stack Overflow : |
It seems to agree with me on the heart of the problem, DLL hell. I am not sure why Windows\System32 would contain 64 bit dlls, but if that is the case it would certainly trigger the issue you are seeing. I am not sure of their final conclusion that it isn't possible to run, more like exceedingly difficult. Unfortunately, I don't think this solves your issue. At best I can add this to the documentation so that others don't end going down the same rabbit hole. |
i am running on 64 bit java and 64 bit python its crashing without giving any error while starting JVM on windows 10 any solutions please |
I would need some version info and diagnostics. I run that 64 bit java and python without issue. |
Hello,
A code that works on linux (32 and 64bit) crashs on windows 10, when using 32bit python AND 32bit Java. See below for versions:
The text was updated successfully, but these errors were encountered: