The custom chunked() extension function recursively called itself instead of using Kotlin's standard library chunked() method, causing StackOverflowError. Removed the buggy custom extension - Kotlin's List<T>.chunked() is already available in the standard library.