0 Replies Latest reply on Feb 15, 2011 3:49 PM by mojo

    use of multi-dimensional arrays in forms - forms debugger crash

      Hello All readers,

      have an issue with use of multi-dimensional arrays in forms when debugging and/or calling another form post array-population.

      USING VERSIONS: oracle forms 9.0.4, Jinitiator, oracle db 10.1

      the following code snippet works from a when-button-pressed trigger when called without the debugger. when called with the debugger it crashes when any element of the multi-dimensional associative array is accessed/populated/read. In addition, if i populate the multi-dimensional array then call a form (a msgbox form to display the arrays content as a string) it crashes too.

      type datasource_rec is record (field varchar2(32), val varchar2(3999));
      type datasource_arr is table of datasource_rec index by binary_integer;
      type datasource_arr_arr is table of datasource_arr index by binary_integer;

           l_arr datasource_arr_arr;

           procedure poparr(i_arr out datasource_arr_arr) is
                idx binary_integer := 1;
                iidx binary_integer := 1;

                while (idx <= 10) loop
                     iidx := 1;
                     while (iidx <= 10) loop     
                          i_arr(idx)(iidx).field := 'field'||to_char(iidx)||':'||to_char(idx); --# debugger crashes here with JVM aborting... message (which crashes forms builder too)
      i_arr(idx)(iidx).val := 'test value';
                     iidx := iidx+1;     
                     end loop;
                idx := idx+1;
                end loop;
           procedure printarr is
                idx binary_integer := l_arr.first;
                iidx binary_integer;
                l_msg varchar2(4000);
                l_response pls_integer;
                while (idx is NOT null) loop
                     iidx := l_arr(idx).first;
                     while (iidx is NOT null) loop
                          l_msg := l_msg||chr(10)||l_arr(iidx)(idx).field||' = '||l_arr(iidx)(idx).val;
                     iidx := l_arr(idx).next(iidx);
                     end loop;
                idx := l_arr.next(idx);
                end loop;
                alerts.info('see console for full printout: '||chr(10)||l_msg);
      --l_response := msgbox.show(l_msg); --calls another modal form to display a long message, which crashes the runtime with a java console message*


      The java console does not print anything useful when both forms builder and the runtime crash/hangs as a result of the debugger being attached (except displaying a "JVM aborting" message) but when the runtime alone crashes as a result of calling another form after popping the MD array it prints:

      oracle.forms.net.ConnectionException: Forms session <28> aborted: unable to communicate with runtime process.

           at oracle.forms.net.ConnectionException.createConnectionException(Unknown Source)

           at oracle.forms.net.HTTPNStream.getResponse(Unknown Source)

           at oracle.forms.net.HTTPNStream.doFlush(Unknown Source)

           at oracle.forms.net.HTTPNStream.flush(Unknown Source)

           at java.io.DataOutputStream.flush(Unknown Source)

           at oracle.forms.net.StreamMessageWriter.run(Unknown Source)

      has anyone else encountered this problem and found a solution/workaround? is their some sort of memory limitation for forms-side handling of (multi-dimensional) arrays?+

      many thanks

      ps: i get similar problems when a) populating the array from a server/db-side packaged procedure (crashes with java console message as above even when not debugging) b) using server/db-side packaged types for the array.