ORA-06512: at "APEX_050100.WWV_FLOW_DEBUG", line 561ORA-06512: at "APEX_050100.WWV_FLOW_DEBUG", line 985ORA-06512: at "APEX_050100.WWV_FLOW_DEBUG", line 355ORA-06512: at "APEX_050100.WWV_FLOW_DYNAMIC_EXEC", line 165ORA-06512: at "APEX_050100.WWV_FLOW_DYNAMIC_EXEC", line 1855ORA-06512: at "APEX_050100.WWV_FLOW_DYNAMIC_EXEC", line 1894ORA-06512: at "APEX_050100.WWV_FLOW_DYNAMIC_EXEC", line 935ORA-06512: at "APEX_050100.WWV_FLOW_PLUGIN", line 1296

What was the matter?

I added an exception handler to the render function of the plugin, but no errors were reported from there.

I added a debug statement at the beginning of the render function and there was no output from it in the debug log.

I studied the case with my colleague Alex Nuijten and we could not find a solution. Until he had the bright idea to run the page not in debug mode. And the plugin rendered without errors! Thanks, Alex.

Now everything fell into place. The debugging outputs the PL/SQL Code section of the plugin.

And this code was not fully shown until the last end statement. So the error was generated because the amount of PL/SQL code was too much to output when debugging :-( . The code was 21K long in total and up to about 16K was shown in the output.

This provides yet another reason to move the PL/SQL code of a plugin to a database package.

* ERROR at line 1: ORA-06502: PL/SQL: numeric or value error: character string buffer too small ORA-06512: at "APEX_050200.WWV_FLOW_DEBUG", line 563 ORA-06512: at "APEX_050200.WWV_FLOW_DEBUG", line 1009 ORA-06512: at "APEX_050200.WWV_FLOW_DEBUG_API", line 181 ORA-06512: at line 1