Crash in WebLIB.Grids when changing the number of rows

This morning I received a problem report mentioning that a grid containing an invoice overview only displayed a single row instead of the required number of rows. The production version indeed showed that problem, but in debug mode everything worked as expected.

During the investigation of the cause, I noticed that the problem was due to the code optimization option, which is ON when compiling in Release mode and OFF in debug mode. I recreated the same problem using a small demo program, attached here:
GridProblem.zip (1.4 MB)

When compiled for DEBUG and making sure the WEB CORE option "Enable optimization" is OFF (i.e. the normal debug settings), the program runs as expected, including the changing of rows:



However, when compiled for DEBUG and making sure the WEB CORE option "Enable optimization" is ON, the program crashes when changing the number of rows:



The crash appeared to be in WEBLIB.GRIDS, line 5053

I don't know if this happened in a recent previous version. Currently I am using the latest version V2.2.2.1:
Version

Thanks for looking into this problem. For moment I used a workaround by compiling for RELEASE in which I turned OFF the "Enable optimization" option. This produced a larger js file, but loading is was not significantly slower.

We have internally already fixed this issue. Next update will address this.