-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
using GDAL in java cause JVM crash #11544
Comments
Are you sure your runtime environment is sane ? I see in the hs_err_pid a mix of Visual Studio runtimes:
And does your gdalalljni.dll matches the gdal.dll version ?
|
@johnwick67943532 Ping w.r.t my question in #11544 (comment) |
Thanks alot to caring about this! |
I'm getting a similar issue with:
Error
|
Have you tested with older Java versions? |
@jratike80 Alas, no. I just don't have time. |
We can wait 😀 |
I'm getting a similar issue with:
|
Does it work with JRE 17? I know almost nothing about Java and JNI but Java 21 introduced the new FFM API. JNI is still supported but perhaps something has changed? But by looking at the error it looks like the error is not in GDAL but in some Microsoft Visual C++ Redistributable file:
|
i am not try it |
Hey, it may be this! |
yes,you are right ,I delete msvcp140.dll in JDKS/BIN , I solved this problem. |
nice bro,it is effective. |
To be clear, if you're using Temurin please use the latest version - 21.0.5 should not have this issue as per the release notes as that is when the issue was fixed (I see a reference to the older Temurin 21.0.4 above which will have this problem. Other java distributions (Such as the one @XiaoYang943 is using - I'm not sure where that is from but it's not Temurin) may still have this problem in 21.0.5, in which case removing the dll from the JDK directory is a reasonable fix until an update is available from your java distribution.
Since it is a known issue with older MS redistributables being shipped with the JDK, older versions will likely show the same issue. |
We were actually facing the same issue two months ago when Microsoft updates their Windows github action worker with a new version of the compiler that used the new version of the runtime but the Java version they deployed still used the old DLL. Closing as not a GDAL bug |
I'd argue it still is a GDAL issue. At best the native code should guard against it, at worst the documentation needs to be updated to state which versions of Java are compatible. The vast majority of Java builds (Corretto, Oracle, etc.,) will still fail and people will bemoan GDAL and loose a lot of time. FYI I've tried Temurin-21.0.5+11 (build 21.0.5+11-LTS) and does not appear to cause issues, however I'm still trying to understand the API so not had a completely successful run. |
Well guys, i changed codebase stack into python with conda. just 3 command finish GDAL lib :
Other info: |
you're welcome to submit a pull request to our documentation |
use python to free from this issue |
What is the bug?
simple run
Dataset dataset = gdal.Open(filePath, gdalconst.GA_ReadOnly);
Cause:
[error occurred during error reporting (), id 0xc0000005, EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffcb4b63080]
Disconnected from the target VM, address: '127.0.0.1:10152', transport: 'socket'
Steps to reproduce the issue
as above
Versions and provenance
win10, gdal 3.6.1, jvm21
Additional context
hs_err_pid16096.log
The text was updated successfully, but these errors were encountered: