Stalled new release leaves problem?

This is one for all you thinkers out there to puzzle over:

I uploaded a new release which had many changes (new fields, a couple of new tables etc). All was going fine and I got the usual feedback over fields added etc. Then the screen updates stopped. No confirmation that the new release had been activated. I let it sit for a while then went back to the solutions page and the new release appeared to be active. However the solution startup method would not complete and I could not get into the solution either with smart or web clients.

I rolled back and everything was fine again. To cut a long story short, after 4 more incremental releases, by adding additional ‘application.output()’ steps I was able to determine that the startup method was failing between these 2 steps:

forms.users_list.controller.loadRecords(dataset);
var record = forms.users_list.foundset.getRecord(1);

The extra feedback I added confirmed that the dataset had a record and that it was loaded into the form. The error suggested that the form for the foundset did not exist as it was failing at the point where I tried to confirm the foundset size

Exception Object: ConversionError: The undefined value has no properties calling getSize. (getGroupsForCurrentUser; line 24)
MSG: The undefined value has no properties calling getSize.

What makes no sense to me is if the dataset was not empty and the record was loaded into the form how could the same form foundset be ‘undefined’?

Even stranger is that this is not a change from what happens in the earlier release. Also I get no errors on my local install nor on any of the 3 other local installs that I have tried the same release on - all function perfectly. And don’t forget that the same steps still work fine in the rolled back release. And in any case what can go wrong between loadRecords (confirmed as true) and foundset.getSize when both are operating on the same form?

The only conclusion I can come to is that somehow the apparently stalled release process left some damage somewhere that affects all subsequent releases but still allows the last working release to continue working normally. I know this makes no sense and should not be possible but I struggle to come up with another explanation.

So I post this story here to see (if anyone is still reading this!) if someone can suggest what might be going on :?

An update for anyone interested in this one…

The same release used in all other situations was fine. The only way finally to get the deployed version that was failing following the stalled release upload was to completely delete the solution from the admin page, then upload the latest version from scratch.

The solution now works fine despite no changes in the method that previously was failing. So it seems that something did happen to corrupt in some way the original solution - I still have no explanation for what went wrong or how!

The form foundset can be null if you have an database server inactive or broken. (and then produces the msg “The undefined value has no properties calling getSize”).
Check the database servers on the admin page if they are all fine.