Opened 10 years ago
Closed 9 years ago
#5303 closed defect (fixed)
[PATCH] Cleanup completeness in GDALDestroyDriverManager and OGRCleanupAll
Reported by: | akhliustov | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description (last modified by )
- In supplied global destruction functions GDALDestroy and DllMain GDALDestroyDriverManager is called before OGRCleanupAll.
The former calls a bunch of cleanup functions ending with CPLCleanupMasterMutex. Unfortunately, OGRCleanupAll immediately tries to get another mutex, recreating the master mutex.
- There is a possibility that CPLCleanupMasterMutex will not be called at all, if GDALDriverManager was not instantiated.
These issues can be fixed by adding required calls to OGRCleanupAll.
Attachments (1)
Change History (7)
comment:1 by , 10 years ago
Description: | modified (diff) |
---|---|
Summary: | Cleanup order in gcore/gdaldllmain.cpp → Cleanup completeness in GDALDestroyDriverManager and OGRCleanupAll |
comment:2 by , 9 years ago
comment:3 by , 9 years ago
Summary: | Cleanup completeness in GDALDestroyDriverManager and OGRCleanupAll → [PATCH] Cleanup completeness in GDALDestroyDriverManager and OGRCleanupAll |
---|
comment:4 by , 9 years ago
Description: | modified (diff) |
---|
comment:5 by , 9 years ago
Well, GDAL 2 doesn't have this problem, and here is the patch for GDAL 1.11.
by , 9 years ago
Attachment: | ogrcleanupall.patch added |
---|
comment:6 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
If everything is fine in trunk, I'm not to keen in doing such a change in the stable branch, so closing
Note:
See TracTickets
for help on using tickets.
Feels like a useful patch. Unfortunately core developers haven't had time to review it yet but thanks a lot anyway. This is the best place that GDAL project have for storing uncommitted patches so that at least the advanced users can find and utilize them.