Skip to content
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

OGRFeatureDefn: OGRFeatureDefn xxx with a ref count of -1 deleted! #11628

Open
sulongx opened this issue Jan 10, 2025 · 1 comment
Open

OGRFeatureDefn: OGRFeatureDefn xxx with a ref count of -1 deleted! #11628

sulongx opened this issue Jan 10, 2025 · 1 comment

Comments

@sulongx
Copy link

sulongx commented Jan 10, 2025

What is the bug?

After I read the data and close the resource using delete, this error message appears when the jvm starts GC and causes the system to crash: OGRFeatureDefn: OGRFeatureDefn xxx with a ref count of -1 deleted!

Steps to reproduce the issue

Layer layer = dataSource.GetLayer(0);
if (layer != null) {
FeatureDefn defn = layer.GetLayerDefn();
//......
Feature feature;
while ((feature = layer.GetNextFeature()) != null) {
//........
}
layer.delete();
}
dataSource.delete();

// Forced trigger GC
System.gc();

Versions and provenance

operating system: win10
gdal-version: release-1928-x64-gdal-3-10-0-mapserver-8-2-2
java-version: 1.8.0_292 HotSpot
maven:

org.gdal
gdal
3.10.0

Additional context

No response

@rouault
Copy link
Member

rouault commented Jan 10, 2025

@sulongx which input data format do you use, and could you try to create a one file isolated .java reproducer ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants