When the value of a cell is going to be updated asynchronously the lockActive method must be called before the async action (for example an ajax request) and unlockActive must be called after. The reason for this is that the edited row must remain locked so that any async updates apply to the correct row. The user can't keep editing a new row until all async edits to the current row are complete. This is all explained in the help for these methods (https://docs.oracle.com/en/database/oracle/application-express/18.2/aexjs/grid.html#lockActive ). This is handled automatically for dynamic actions because the IG region interface supports the getSessionState method and the beforeAsync and afterAsync callbacks. This part of the region interface is not currently documented and you would have to look at the code. But you don't need to know about that just that lockActive and unlockActive are called automatically from the server.js module around the ajax request that is done by the Set Value DA.
You can prove that this is the problem on your demo app by doing this after the error:
Then you can edit again.
John, thanks for the comprehensive explanation. Let's agree that the root cause is a bug in my application.
May I also ask you to have a look at example of grid's misbehavior: APEX 18.2 IG bug: Column lose it position after resize and page refresh
In addition I would like to report about a minor issue in master-detail IG. Removing a filter in a master report setting area I get "Uncaught TypeError: Cannot read property '_data' of undefined" error. The error stack looks like this:
Uncaught TypeError: Cannot read property '_data' of undefined at Object._restoreDataState (model.js?v=18.2.0.00.12:3877) at Object.onChange (model.js?v=18.2.0.00.12:4911) at notifyChange (model.js?v=18.2.0.00.12:234) at Object.clearData (model.js?v=18.2.0.00.12:1014) at widget.interactiveGrid.js?v=18.2.0.00.12:9368 at $.(/pls/apex/anonymous function).(anonymous function)._forEachView (https://static.oracle.com/cdn/apex/18.2.0.00.12/libraries/apex/widget.interactiveGrid.js?v=18.2.0.00.12:2898:21) at $.(/pls/apex/anonymous function).(anonymous function)._forEachView (https://static.oracle.com/cdn/apex/18.2.0.00.12/libraries/jquery-ui/1.12.0/jquery-ui-apex.js?v=18.2.0.00.12:474:25) at Object.success [as callback] (widget.interactiveGrid.js?v=18.2.0.00.12:9366) at success (server.js?v=18.2.0.00.12:1465) at Object.lOptions.success (server.js?v=18.2.0.00.12:1401)
Steps to reproduce:
Lets assume we have DEPT and EMP grids connected with master-detail relationship when DEPT is a muster. Add a new record to the DEPT region and save the changes. Then add a filter to the DEPT region to return only the record we've just created. Delete this record from the DEPT region and save the changes. Now delete the filter by pressing Remove Filter button in the report setting area. The error should occur in the console.