Forum Navigation
_rt_finalize access violations while allocating an object.
Posted: 01/07/08 06:51:27I've been getting strange access violations when trying to create a new object. I checked in ddbg and had this error : Unhandled Exception: EXCEPTION_ACCESS_VIOLATION(0xc0000005) at _rt_finalize (0x005d0703) thread(4092)
Within the loop where this happens it happens after 619 iterations, if I call GC.collect() while inside the loop (during each iteration) it happens after 71 iterations. It happens at this line : section = new MapSection?(); and it happens before the constructor is called.
The program itself only has allocated about 20MB of memory and I have a lot physical memory left so I don't think I am running into any sort of memory issue. It just seems to be a problem when the gc runs.
I have moved various allocations around and it does effect when the problem occurs, for instance allocating one object before the loop moves the point of failure to 84 iterations.