Server side cursors were not initialized properly and this caused a reference to uninitialized memory.