Any idea what is causing the AV?
An access violation in GetMem
is caused by a heap corruption. You have a defect in your program that is corrupting the heap.
The best way for you to track the fault down is to use the FastMM memory manager in full debug mode. This should, hopefully, tell you the point in the code that corrupts the heap.