[SOLVED] Grid app, Divide By Zero exception when changing a default

I can create a new grid app against a table with a few thousand rows. All the defaults work fine.

If I change the initial number of rows to display from default of 10 to 20, then any QuickSearch that reduces the number of resulting pages produces an error dialog in the app, and an unhandled DivideByZero exception in the Apache error log tracing to the generated code at the point where the code is trying to calculate how many pages of results there are to display.

This has broken about 35 apps in my production environment.

The workaround is to set the initial number of displayed rows to the default of 10, and hope that the customer doesn’t try to change it (because I haven’t tested whether that’s broken too).

This should be a very easy problem to reproduce and fix.

This problem mysteriously and completely disappeared. No updates, simply redeployed and the problem disappeared on the dev box and the production environments.

Mark it solved because I can’t.