tvOS keyboard crash when I use emailAddress as content type

Hi there,

Currently I've been trying to fix a crash when a textfield (with emailAdress as content type) displays a list of recent emails used. The issue can be reproduced with a new project.

Steps to reproduce:

  • Click on textfield.
  • A list of recent emails used will be displayed.
  • Chose any email.
  • List will be hidden automatically.
  • If you click play/pause from physical remote control the crash appears with the following report:
*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 9223372036854775807 beyond bounds [0 .. 4]'
terminating due to uncaught exception of type NSException
CoreSimulator 885.2 - Device: Apple TV 4K (3rd generation) (at 1080p) (1C111442-8AE4-40C7-B782-1CD459382A6F) - Runtime: tvOS 16.4 (20L494) - DeviceType: Apple TV 4K (3rd generation) (at 1080p)

Does anyone knows how to fix that issue?

I realized that this issue can't be reproduced when you choose Enter New instead of choose any recent email.

tvOS keyboard crash when I use emailAddress as content type
 
 
Q