Dear Erel, To compile the same source with B4A 5.0, there is no error, but 5.02 like this: B4A version: 5.02 (1) Parsing code. (0.06s) Compiling code. Error Exception of type 'System.OutOfMemoryException' was thrown.