I am not sure if this bug really comes from my app or maybe really is a UIKit bug. Maybe someone here can clarify this.
There is a tableview. Each cell offers a disclosure-button to a "settings"-like screen that is a modal view. The modal view can be closed via a "Close"-button.
The modal view contains a UITextView.
Now here comes the bug: The user holds a key that offers similar characters( eg: a -> ä á à ... ). When the user holds that key, the characters get offered and the first one gets selected blue. If the user holds this button and simultaneously clicks the "Close" Button. The modal view disappears and the table view shows up. The keyboard goes away, but the {a á ä à} menu is still visible for about a second. Then the app crashes.
This can only be reproduced on the device, since you cannot press two buttons simultaneously.
Here is a stack trace
Date/Time: 2009-12-01 17:39:31.048 +0100
OS Version: iPhone OS 3.0.1 (7A400)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00000008
Crashed Thread: 0
Thread 0 Crashed:
0 libobjc.A.dylib 0x300102ac objc_msgSend + 16
1 UIKit 0x308ffda0 -[UIKeyboardImpl hasMarkedText] + 20
2 UIKit 0x309161b2 -[UIKeyboardImpl updateShiftState] + 230
3 UIKit 0x309224c0 -[UIKeyboardImpl handleObserverCallback] + 72
4 UIKit 0x30922466 observerCallback + 14
5 CoreFoundation 0x3020bf38 __CFRunLoopDoObservers + 420
6 CoreFoundation 0x30252e46 CFRunLoopRunSpecific + 1734
7 CoreFoundation 0x3025276a CFRunLoopRunInMode + 42
8 GraphicsServices 0x32044b08 GSEventRunModal + 108
9 GraphicsServices 0x32044bb4 GSEventRun + 56
10 UIKit 0x308f035c -[UIApplication _run] + 384
11 UIKit 0x308ef11a UIApplicationMain + 694
12 **** 0x00002360 main (main.m:14)
13 **** 0x000022fc start + 44
Thread 1:
0 libSystem.B.dylib 0x31d47624 semaphore_wait_signal_trap + 8
1 libSystem.B.dylib 0x31d702de semaphore_wait_signal + 2
2 libSystem.B.dylib 0x31d49c9c pthread_mutex_lock + 284
3 WebCore 0x35866fa6 __ZL17_WebTryThreadLockb + 98
4 WebCore 0x35866f22 __ZL14WebRunLoopLockP19__CFRunLoopObservermPv + 14
5 CoreFoundation 0x3020bf38 __CFRunLoopDoObservers + 420
6 CoreFoundation 0x30252db0 CFRunLoopRunSpecific + 1584
7 CoreFoundation 0x3025276a CFRunLoopRunInMode + 42
8 WebCore 0x35866ed2 __ZL12RunWebThreadPv + 286
9 libSystem.B.dylib 0x31d6a6ea _pthread_body + 10