I have created a ticket with ID IMAGINGNET-4441 in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.
The JPG linked to your last reply is different to the JPG that causes the StackOverflowException. Perhaps the upload process modified the original uploaded JPG?
To hopefully prevent this, here is the JPG zipped: input.zip (238.1 KB)
I am still getting the StackOverflowException error when trying to load the attached JPG file with v 21.4
I have reproduced the issue with new JPG shared by you and have created a ticket with ID IMAGINGNET-4464 to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.