#284 closed defect (fixed)
.NET: Exceptions being thrown on IInserts/IUpdates involving large datasets
Reported by: | MaksimS | Owned by: | gregboone |
---|---|---|---|
Priority: | major | Milestone: | 3.4.0 |
Component: | SDF Provider | Version: | 3.2.0 |
Severity: | 3 | Keywords: | |
Cc: | jng | External ID: |
Description
Managed wrapper seems to throw an error while performing perpetual IInserts/IUpdates involving large datasets (i.e. tens of thousands of feature instances). This keeps happening since god-knows-when, but let's set it to version 3.2.0 (continued to appear in 3.3.0 also).
Exception being thrown:
- System.AccessViolationExceptions ("Attempted to read or write protected memory. This is often an indication that other memory is corrupt") thrown at OSGeo.FDO.Runtime.Disposable.Finalize() (Target Site: void ReleaseUnmanagedObject() ) - C++ pure virtual function call errors. - Memory allocation failed errors.
There are also other types of exceptions fired here and there, scattered among other related projects (i.e. MapGuide) - possibly related to this: http://trac.osgeo.org/mapguide/ticket/323
It's general opinion (me, Clayton) that something's buggy with managed wrapper and garbage collector - it's not disposing its underlying unmanaged resources in the correct order. As Clayton correctly pointed out: "...and that this problem will occur when the garbage collector comes around - hence the pseudo-randomness...", therefor a fuzziness on properly pinpointing source of the problem.
Change History (7)
comment:1 by , 17 years ago
Cc: | added |
---|
comment:2 by , 17 years ago
Status: | new → assigned |
---|
comment:3 by , 17 years ago
comment:4 by , 17 years ago
Looks like a managed garbage collection/SDF Feature reader interaction issue.
If I manually dispose the reader by adding
reader.Dispose();
to the above for loop, then all is fine. I assume the garbage collector is not disposing the reader objects at a fast enough rate to keep up with the new ones being created. I am investigating if there a way to free all the SDF resources attached to the feature reader on a call to Close().
comment:5 by , 17 years ago
This is definatelly affecting related projects, I just noticed following thread on MapGuide wiki, seems so related to the quirks I've been experiencing on MGE:
http://www.nabble.com/MGOS-2.0%3A-MgUpdateFeatures-broken-to16467463s16610.html#a16491260
comment:6 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Moved the cleanup code from the destructor to Close.
comment:7 by , 16 years ago
Component: | FDO API → SDF Provider |
---|
Test Details: