Bulk collect hangs

Terry Dykstra

Member²
I have the following code (stripped down) in a before update trigger. The cursor finds 4 records. The moment I try to step into a line where I try to get a value from the first row of t_invoices(i) (i=1), PLSQLDeveloper just hangs. Anybody seen this? I'm using 7.1.5.1397.

DECLARE
li_invoicecnt number(6);
ls_cc varchar2(12);
...
TYPE invoicearray IS TABLE OF PFAPINVOICE_D%ROWTYPE;
t_invoices invoicearray;
CURSOR cur_coding IS
SELECT * FROM PFAPINVOICE_D
WHERE ...;

BEGIN

....
OPEN cur_coding;
FETCH cur_coding BULK COLLECT INTO t_invoices;

li_invoicecnt := t_invoices.COUNT; /* count=4 */
FOR i IN 1..li_invoicecnt
LOOP

BEGIN
ls_cc := t_invoices(i).sub_acc; /* hangs here */
....
END;

END LOOP;
CLOSE cur_coding;
 
You could try the following:

1. Increase the shared pool size.

The Oracle Debugger seems to have some stability issues when there is not enough free memory in the shared pool.

2. Disable the call stack.

Go to Tools > Preferences > Debugger and disable the "Update call stack after each step".

3. Check for user trace files on the server.

It may be that the server process has died. Check if a trace file exist that is related to the problem, and if so, send it to me.
 
Back
Top