Bug #26187 Full crash after typing anything in query or script window. Space in table name
Submitted: 8 Feb 2007 16:38 Modified: 21 Feb 2007 12:21
Reporter: Robert Wallis Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Query Browser Severity:S2 (Serious)
Version:1.2.9rc OS:MacOS (OSX)
Assigned to: Vladimir Kolesnikov CPU Architecture:Any
Tags: crash, query, space, table name, type anything

[8 Feb 2007 16:38] Robert Wallis
Description:
After connecting to the local instance as root, with a schema specified.  As soon as one character is typed a full program crash occurs.

The previous beta version worked fine.

Here are some details from the crash report:

Date/Time:      2007-02-08 08:28:31.913 -0800
OS Version:     10.4.8 (Build 8N1051)
Report Version: 4

Command: MySQL Query Browser
Path:    /Applications/MySQL Query Browser.app/Contents/MacOS/MySQL Query Browser
Parent:  WindowServer [59]

Version: ??? (1.2.9rc)

PID:    2740
Thread: 0

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_PROTECTION_FAILURE (0x0002) at 0x00000008

Thread 0 Crashed:
0   com.mysql.MySQLToolsCommon 	0x1006c502 myx_get_identifier_type + 48
1   com.mysql.MySQLToolsCommon 	0x1006c4b4 make_new_word + 516
2   com.mysql.MySQLToolsCommon 	0x1006bedb myx_highlight + 1927
3   com.mysql.MySQLToolsCommon 	0x10035d8a -[MSQLSyntaxColoring recolorRange:] + 367
4   com.mysql.MySQLToolsCommon 	0x10034846 -[MSyntaxColoring doRecoloring:] + 77
5   com.apple.Foundation       	0x9260e0c7 __NSFireDelayedPerform + 403
6   com.apple.CoreFoundation   	0x9082b822 CFRunLoopRunSpecific + 3341
7   com.apple.CoreFoundation   	0x9082ab0e CFRunLoopRunInMode + 61
8   com.apple.HIToolbox        	0x92ddabef RunCurrentEventLoopInMode + 285
9   com.apple.HIToolbox        	0x92dda234 ReceiveNextEventCommon + 184
10  com.apple.HIToolbox        	0x92dda154 BlockUntilNextEventMatchingListInMode + 81
11  com.apple.AppKit           	0x9327f465 _DPSNextEvent + 572
12  com.apple.AppKit           	0x9327f056 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 137
13  com.apple.AppKit           	0x93278ddb -[NSApplication run] + 512
14  com.apple.AppKit           	0x9326cd2f NSApplicationMain + 573
15  com.mysql.QueryBrowser     	0x000022fc main + 30 (main.m:14)
16  com.mysql.QueryBrowser     	0x00002286 _start + 228 (crt.c:272)
17  com.mysql.QueryBrowser     	0x000021a1 start + 41

Thread 1:
0   libSystem.B.dylib          	0x90024427 semaphore_wait_signal_trap + 7
1   com.apple.Foundation       	0x9264e2f8 -[NSConditionLock lockWhenCondition:] + 39
2   com.apple.AppKit           	0x93356270 -[NSUIHeartBeat _heartBeatThread:] + 377
3   com.apple.Foundation       	0x925f836c forkThreadForFunction + 123
4   libSystem.B.dylib          	0x90023d87 _pthread_body + 84

Thread 2:
0   libSystem.B.dylib          	0x90024427 semaphore_wait_signal_trap + 7
1   com.apple.ColorSync        	0x915a5847 pthreadSemaphoreWait(t_pthreadSemaphore*) + 35
2   com.apple.ColorSync        	0x915bfdcc CMMConvTask(void*) + 60
3   libSystem.B.dylib          	0x90023d87 _pthread_body + 84

Thread 3:
0   libSystem.B.dylib          	0x90024427 semaphore_wait_signal_trap + 7
1   com.mysql.MySQLToolsCommon 	0x1000ab85 -[MMySQLDispatcher(Private) getNextRequest] + 58
2   com.mysql.MySQLToolsCommon 	0x1000afc7 processRequests + 84
3   libSystem.B.dylib          	0x90023d87 _pthread_body + 84

How to repeat:
Connect to a server.

Type any character in the query window.

Crash.

Suggested fix:
Check out the code in MSyntaxColoring doRecoloring, and myx_get_identifier_type which may be trying to use a pointer that is uninitialized.
[8 Feb 2007 18:24] Sveta Smirnova
Thank you for the report.

Seems to be duplicate of the bug #25780.

Do you connect to server located on remote machine?
[8 Feb 2007 18:47] Robert Wallis
This happens when connecting to 127.0.0.1, the local machine.  I haven't tried testing with another server.  I don't have access to a remote server from this machine.

Sorry I didn't search closed bugs, and bug #25780 looks like the same bug with the exception that the crash is happening on a schema with spaces in the name, not just hyphens.

My problem schema had a table with a space in the name.  I quickly created a test table in `temp` named `table name` with one column.  Then changed my schema to `mysql` and then back to `temp`.  As soon as I typed something it crashed!  Yay.  

Now I can bug the developer that created a table with a space in the name about why never to put spaces in table names.

Thank you
[8 Feb 2007 18:53] Sveta Smirnova
Thank you for the report.

Verified as described. To repeat: create schema with table `foo bar`, connect to it and get crash.
[21 Feb 2007 12:21] 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