Text input bug

I have a very annoying Xojo bug which is very easy to reproduce. The problem is the error it generates is most of the time caught by the Xojo framework, BUT sometimes it’s not and it crashes the application.

Basically, for Cocoa framework, if you press a key to build char compositions like ^ or ¨ or ´ to create accented characters, while holding CMD the Xojo framework crash. This is visible even in Xojo IDE, since it’s built with Xojo.

I have a report for this, which is reviewed, but not yet marked as verified: <https://xojo.com/issue/32765>

Can anyone confirm this problem?
Just open Xojo and press CMD+[a key used to create accented chars] (this vary among keyboard layouts, for example with German keyboard, press CMD+^)

At this point you should get this dialog

Thanks.

[quote=104221:@Massimo Valle]Basically, for Cocoa framework, if you press a key to build char compositions like ^ or ¨ or ´ to create accented characters, while holding CMD the Xojo framework crash. This is visible even in Xojo IDE, since it’s built with Xojo.

I have a report for this, which is reviewed, but not yet marked as verified: Feedback Case #32765

Can anyone confirm this problem?[/quote]

Just tried with ^ and ¨ together with CMD and a French keyboard, could not reproduce the problem. It works just fine. The accent appears on a colored background, then after typing the vowel, the accented character is there.

With the German keyboard, when holding CMD and ^ or ´ the accent simply does not appear, and it beeps. No crash of any sort.

My iMac is still in repair, so I am doing that with Mac OS X 10.7.5 on my old MacBook. Could the crash be related to the OS version ? Have you tried the same key combination in another program ?

I tried it with 4 different Macs, all with OS X 10.9.3 and the above happens on 2 of them.
BUT, in all of them, if I look at the Console, the exception is reported.
It’s just that in some Xojo try to crash, while in others it ignores the problem.

@Michel, can you please open Console and see if this is happening?

[quote=104261:@Massimo Valle]I tried it with 4 different Macs, all with OS X 10.9.3 and the above happens on 2 of them.
BUT, in all of them, if I look at the Console, the exception is reported.
It’s just that in some Xojo try to crash, while in others it ignores the problem.

@Michel, can you please open Console and see if this is happening?[/quote]

Indeed an error is reported in the Console with the German keyboard :

6/25/14 3:00:32.732 PM My Application.debug: -[__NSCFConstantString characterAtIndex:]: Range or index out of bounds

But with the French keyboard, no error at all. It is as if the CMD key had not been pressed.

I tried in other apps and no error.

[quote=104261:@Massimo Valle]I tried it with 4 different Macs, all with OS X 10.9.3 and the above happens on 2 of them.
BUT, in all of them, if I look at the Console, the exception is reported.
It’s just that in some Xojo try to crash, while in others it ignores the problem.
[/quote]

Maybe you could prevent the crash by returning True in the keyboard event if the CMD key is pressed while punching the accent keys.

The problem is the Xojo framework is generating this exception before I can control it in some way.
In fact this also happens on the Xojo IDE.

I tried with the French keyboard and it happen even with this configuration, but only if you press CMD+^ and then again CMD+^

[quote=104268:@Massimo Valle]The problem is the Xojo framework is generating this exception before I can control it in some way.
In fact this also happens on the Xojo IDE.

I tried with the French keyboard and it happen even with this configuration, but only if you press CMD+^ and then again CMD+^[/quote]

Indeed the error appears in the Console when pressing twice Cmd+^ with the French keyboard.

I just tried to assign Cmd+^ to a menu handler, it does not trap it either. I seems accent keys are processed within the keyboard driver somehow, and that only the accented character is reported to the application.

This is indeed a reproducible bug. Maybe you should add a sample project to your bug report and a link to this thread.