ORA-01403: No Data Found when working with Master-Detail IG in Oracle APEX

In Oracle APEX 5.1, I have an Interactive Grid Master-Detail page. The following series of steps (which users sometimes take) creates an unhandled exception (ORA-01403: no data found).

  1. User creates an invalid record in the master section and a corresponding record in the detail section.
  2. User attempts to save (row processing) and receives error due to invalid master record.
  3. Without deleting the invalid master record, user activates filters which remove invalid master record.
  4. User makes (valid) additions/modifications to other records
  5. User attempts to save.
  6. User receives an error (ORA-01403: no data found).

I believe the problem is that the detail records for the invalid (now removed) master record are still being processed when the user saves. However, there is no way for the user to access those records, nor can I figure out how to remove them automatically (the ORA 01403 error occurs prior to and halts page processing and validation as far as I can tell).

Any suggestions for how to prevent this, handle the error, or enable users to correct this error would be appreciated.

Here's the backtrace for the error, if it's helpful:

  • error_backtrace: ORA-06512: at "APEX_050100.WWV_FLOW_INTERACTIVE_GRID", line 7640 ORA-06512: at "APEX_050100.WWV_FLOW_INTERACTIVE_GRID", line 7819 ORA-06512: at "APEX_050100.WWV_FLOW_INTERACTIVE_GRID", line 7850 ORA-06512: at "APEX_050100.WWV_FLOW_INTERACTIVE_GRID", line 8990 ORA-06512: at "APEX_050100.WWV_FLOW_REGION_NATIVE", line 3101 ORA-06512: at "APEX_050100.WWV_FLOW_PLUGIN", line 2146 ORA-06512: at "APEX_050100.WWV_FLOW_PLUGIN", line 3006 ORA-06512: at "APEX_050100.WWV_FLOW", line 3190 ORA-06512: at "APEX_050100.WWV_FLOW", line 5544