Bug #22783 Crash when pressing escape key in SQL textbox in Query Browser
Submitted: 28 Sep 2006 15:28 Modified: 10 Jan 2007 15:20
Reporter: Jon Evans Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Query Browser Severity:S2 (Serious)
Version:1.2.5 rc, 1.2.4 rc, 1.2.3beta OS:MacOS (Mac OS X 10.4.7, 10.4.8)
Assigned to: Vladimir Kolesnikov CPU Architecture:Any
Tags: crash, escape, EXC_BAD_ACCESS, KERN_PROTECTION_FAILURE, quit

[28 Sep 2006 15:28] Jon Evans
Description:
MySQL Query Browser crashes if you press escape in the SQL textbox (the one at the top centre of the main window)

How to repeat:
1. Launch Query Browser
2. Connect to a database
3. In the main window, type some text in the SQL field (top centre of window)
4. with the cursor still in there, press escape
5. The app quits

[...]
Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_PROTECTION_FAILURE (0x0002) at 0x00000000
[...]

Suggested fix:
I was actually searching for the "complete word" feature to autocomplete a column name.  I'd already tried Tab.  So the first suggested fix would be to implement this.

Alternatively, just ignore the 'escape' keypress.
[28 Sep 2006 15:39] Jon Evans
Crash log

Attachment: MySQL Query Browser.crash.log (application/octet-stream, text), 16.78 KiB.

[4 Oct 2006 15:02] Valeriy Kravchuk
Thank you for a problem report. Please, try to repeat with a newer version, 1.2.4rc, and inform about the results.
[4 Oct 2006 15:21] Jon Evans
Hi Valeriy,

I tested with the latest version I could download (1.2.4beta, contained in mysql-gui-tools-5.0-r4-osx10.4-universal.dmg) and the bug is still present.

Top of the stack trace is:

Thread 0 Crashed:
0   libSystem.B.dylib          	0x90039c63 strncasecmp + 138
1   libglib-2.0.0.dylib        	0x00337182 g_strncasecmp + 31 (gstrfuncs.c:1925)
2   com.mysql.MySQLToolsCommon 	0x1006bb37 tree_node_lookup + 85
3   com.mysql.MySQLToolsCommon 	0x1006bb6d tree_node_lookup + 139
4   com.mysql.MySQLToolsCommon 	0x1006bb97 tree_node_lookup + 181
5   com.mysql.MySQLToolsCommon 	0x1006bb97 tree_node_lookup + 181
6   com.mysql.MySQLToolsCommon 	0x1006a7ba myx_lookup_word + 56
7   com.mysql.MySQLToolsCommon 	0x10035cc0 -[MSQLSyntaxColoring completionListForWord:] + 62
8   com.mysql.MySQLToolsCommon 	0x10032f41 -[MSourceTextView completionsForPartialWordRange:indexOfSelectedItem:] + 113
9   com.apple.AppKit           	0x936f48a1 -[NSTextView(NSKeyBindingCommands) complete:] + 317
10  com.apple.AppKit           	0x9335a249 -[NSResponder doCommandBySelector:] + 76
11  com.apple.AppKit           	0x9335a0dc -[NSTextView doCommandBySelector:] + 229
12  com.apple.AppKit           	0x9335a249 -[NSResponder doCommandBySelector:] + 76
13  com.apple.AppKit           	0x937306c9 -[NSWindow doCommandBySelector:] + 121
14  com.apple.AppKit           	0x9335a0dc -[NSTextView doCommandBySelector:] + 229
15  com.apple.AppKit           	0x9334f868 -[NSKeyBindingManager(NSKeyBindingManager_MultiClients) interpretEventAsCommand:forClient:] + 1932
16  com.apple.AppKit           	0x9334ddc9 -[NSTSMInputContext interpretKeyEvents:] + 1157
17  com.apple.AppKit           	0x9334d170 -[NSView interpretKeyEvents:] + 65
18  com.apple.AppKit           	0x9334d05e -[NSTextView keyDown:] + 1061
19  com.apple.AppKit           	0x9334cbe1 -[NSWindow sendEvent:] + 7377
20  com.apple.AppKit           	0x9333e350 -[NSApplication sendEvent:] + 5023
21  com.apple.AppKit           	0x93268dfe -[NSApplication run] + 547
22  com.apple.AppKit           	0x9325cd2f NSApplicationMain + 573
23  com.mysql.QueryBrowser     	0x000028c4 main + 30 (main.m:14)
24  com.mysql.QueryBrowser     	0x0000284e _start + 228 (crt.c:272)
25  com.mysql.QueryBrowser     	0x00002769 start + 41
[21 Nov 2006 13:22] Valeriy Kravchuk
Please, try to repeat with a newer version, 1.2.5 rc, and inform about the results.
[21 Nov 2006 13:41] Jon Evans
Hi Valeriy,

1.2.5 rc still crashes for me in exactly the same way (connect, type anything at all in the query textfield, press Escape).
[21 Nov 2006 13:42] Jon Evans
latest crash report, from v1.2.5 rc

Attachment: crash.txt (text/plain), 19.24 KiB.

[23 Nov 2006 20:34] Sveta Smirnova
Thank you for the report.

Verified as described: just type ESC in query area.
[10 Jan 2007 15:20] Vladimir Kolesnikov
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html