This is an application error.
The function calling sequence is incorrect.
This is usually an application issue. Take the following steps:
1. Check whether concurrency is being controlled by the connection handles in the thread program.
2. Use cursors when executing the SELECT statement to check whether execution completes successfully after a timeout occurs, without raising an error.
3. Check whether functions are called in order.
4. Check whether the application has been debugged for memory invasion.