Fatal Error on Generation of Single Record Form - 300s Exceeded

SC Ver 9.2.016
MacOS 10.14

Attempting to generate single record form fails with generation exceeding 300s.

Full message:
Fatal error: Maximum execution time of 300 seconds exceeded in /Applications/Scriptcase/v9/wwwroot/scriptcase/devel/class/generator/nmDados.class.php on line 6432

Form has previously generated OK.

  • The change was to add an extra field (associated with another table) and I added code to the onLoad event to populate the field.
  • I had made some changes to subforms (wanted to look at changing style from Editable Grid to Multiple Records) but I reversed out those changes (both to the subforms themselves and the Master/Detail Form links). Everything is now aligned back to using subforms as Editable Grids.

Error is blocking ongoing development. Any ideas on fix / workaround?

the best thing to do would be to test your query live, then go into debug mode in Application / configuration and spot the fault, your request may wait for an answer and it may be longer than 30 seconds in box 300 ms is really a problem in your request or in your php request.

I did not fully understand what the point of your suggestion was (why would this problem occur due to any SQL?), but it did cause me to look at the SQL for the form. What I found was that two fields (which were added via ‘add field’, and nothing to do with the table associated with the form) have been included in the SQL for the table. These fields are associated with another table which is queried in the onLoad event.

I tried going back to Applications | Synchronise Table, but the added fields are not there.

This seems to be a bug.

In the meantime, how do I remove the two added fields from the forms SQL?

Note: My prior comment turns out not to be the cause of concern. In looking at another form (which generates successfully) added fields (those not included in the form’s table) are also included in the list of fields under SQL settings.

So the cause of the issue remains unresolved.

To be crystal clear, as I said, the problem occurs when generating source code (not when running the application).

How do I go into debug mode with the SC generator?

Whether in forms or grid, go to application, configuration, then at the bottom of the page you find debug mode, select it, save and restart your grid or forms, your application certainly waiting for an answer or a loop that is very long, this is not a solution but a guess,
good to you, and good luck in solving this problem
Nicolas

The problem was resolved. I overlooked another change that was made. We were trying to implement a ?please wait…? pop-up using a solution posted elsewhere on this forum. We pasted code into the onInit event, as suggested. However, this change caused the source code generator to loop, and eventually timeout. When we comment out this change the generation is successful.