I believe you are describing a known bug that was introduced in version 8.1.0 which also exists in version 8.1.1. It was only discovered after 8.1.1 was released, so there is no documentation of the issue other than a few other forum posts.
The nature of the issue is this: if your port uses CVI's intermediary output queue (i.e. port was opened with OpenCom, or OpenComConfig was passed a non-negative output queue size), flushing the output queue while there is still data actively being written can cause a GPF. I believe closing the port is also internally flushing the queue and producing the same result.
As you discovered, adding a delay to ensure the internal output queue is empty before closing the port will avoid the problem. Also, opening your port with OpenComConfig and passing -1 as the output queue length will also avoid the GPF.
Sorry for your trouble. The bug is fixed in the next release of CVI.
Mert A.
National Instruments