TextArea Lockout Problems in Cocoa

My program uses a styled textarea to allow the user to enter a Xojoscript. The script is scanned and colored based on the elements, but this scanning is currently only done when the user accesses a menu item. All of this works fine under both carbon and cocoa builds as well as windows.

Cocoa builds, however, present a new challenge. If the user enters text over many minutes (>45 min in general), the cocoa textarea will sometimes lockout the user so that clicking inside the textarea no longer allows the user to enter text. The identical program compiled to a carbon app or a windows app never does this. At first I thought this was caused by my use of app.doevents, but all such calls have now been removed, and the textarea lockout is still present in cocoa with roughly the same time delay.

The source of this problem will be very difficult to trace because it takes a long time before it occurs, and the program still has a responsive GUI for the other elements (tabs, buttons, etc.). Submitting a useful feedback report is impossible. I have looked through many bug reports which suggest others may have had a similar problem, but they are labeled as unreproducible, and obviously have not been fixed. My questions:

  1. Has anyone else experienced this problem?
  2. Can anyone suggest a way to “reset” a textarea to make it responsive again to user input without scaring the hell out of the user?