Bug #1243 Crash when try to connect to a local MySQL Server which isn't running
Submitted: 10 Sep 2003 15:06 Modified: 8 Dec 2003 16:04
Reporter: Steffen Schlaer Email Updates:
Status: Closed Impact on me:
None 
Category:MySQLCC Severity:S2 (Serious)
Version:0.9.3 OS:Linux (Linux)
Assigned to: Bugs System CPU Architecture:Any

[10 Sep 2003 15:06] Steffen Schlaer
Description:
When I try to connect to a local MySQL Server which isn't running at this moment, the 
MySQLCC crashes on my Linux Machine (SuSE 8.2, glibc2.3, MySQL installed by tar-Ball, 
MySQLCC installed by tar-Ball). 
 
When I start the local MySQL Server and try a connect, all works fine with MySQLCC. When I 
now stop the local MySQL Server and try a new connect with the opened MySQLCC I get the 
following ErrorMessage: 
[DevelopDB] FEHLER 2002: Can't connect to local MySQL server through socket 
'/tmp/mysql.sock' (2) 
 
When I now restart MySQLCC and try the same connect to the local MySQL Server (which 
isn't running anway), MySQLCC crashes again without to display the ErrorMessage shown 
above. 

How to repeat:
Restart MySQLCC and try a connect on a local MySQL Server which isn't running.
[11 Sep 2003 6:49] Lorenzo Grio
This bug is present also in Windows version.
I'm using MySQLCC on Windows XP.
[6 Oct 2003 8:45] Hans Deragon
Mysqlcc 0.9.3 on Red Hat 9 (latest patches) crashes even if the server is running.  I tried both versions for glibc 2.2 and 2.3 (2.3 is what I have installed).

Following is the output of gdb when it crashed:

[New Thread 1075111072 (LWP 4390)]
 
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1075111072 (LWP 4390)]
0x083b7112 in QTextCodec::fromUnicode(QString const&) const ()
(gdb) backtrace
#0  0x083b7112 in QTextCodec::fromUnicode(QString const&) const ()
#1  0x081285b8 in CMySQL::emitError() ()
#2  0x08128369 in CMySQL::connect() ()
#3  0x080a4be5 in CMySQLServer::connect() ()
#4  0x080ce71b in CServerItem::setConnected(bool) ()
#5  0x080ce6cb in CServerItem::doubleClicked() ()
#6  0x08092233 in CDatabaseListView::DoubleClicked(QListViewItem*) ()
#7  0x081301a8 in CDatabaseListView::qt_invoke(int, QUObject*) ()
#8  0x081e5e39 in QObject::activate_signal(QConnectionList*, QUObject*) ()
#9  0x083e5eb4 in QListView::doubleClicked(QListViewItem*) ()
#10 0x08281a5c in QListView::contentsMouseDoubleClickEvent(QMouseEvent*) ()
#11 0x082a71d5 in QScrollView::viewportMouseDoubleClickEvent(QMouseEvent*) ()
#12 0x082a6b43 in QScrollView::eventFilter(QObject*, QEvent*) ()
#13 0x08280102 in QListView::eventFilter(QObject*, QEvent*) ()
#14 0x081e40e3 in QObject::activate_filters(QEvent*) ()
#15 0x081e4046 in QObject::event(QEvent*) ()
#16 0x081fe02a in QWidget::event(QEvent*) ()
#17 0x0819ffe7 in QApplication::internalNotify(QObject*, QEvent*) ()
#18 0x0819f8d6 in QApplication::notify(QObject*, QEvent*) ()
#19 0x08157bdb in QETWidget::translateMouseEvent(_XEvent const*) ()
#20 0x08155907 in QApplication::x11ProcessEvent(_XEvent*) ()
#21 0x083f4ed7 in QEventLoop::processEvents(unsigned) ()
#22 0x081ac82f in QEventLoop::enterLoop() ()
#23 0x081ac6fc in QEventLoop::exec() ()
#24 0x081a0193 in QApplication::exec() ()
#25 0x080e0fbc in mysqlcc_main(int, char**) ()
#26 0x080e242b in main ()
#27 0x420156a4 in __libc_start_main () from /lib/tls/libc.so.6

Now, it still seems that I cannot connect to the server even though it is running.  Probably because my settings are wrong.  But I cannot even edit my settings because mysqlcc crashes when I select the server entry from the left pane and select ¨edit¨.  Following the trace when this happens.  Notice it is again at the same place that the crash occurs.  It seams to be a Unicode issue; maybe not related to mysqlcc per say, but a library linked with.  I tried ¨export LANG=C¨, but with no more success.  Needless to say, mysqlcc is totally useless to me in this state. :(

[New Thread 1075111072 (LWP 4393)]
 
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1075111072 (LWP 4393)]
0x083b7112 in QTextCodec::fromUnicode(QString const&) const ()
(gdb) backtrace
#0  0x083b7112 in QTextCodec::fromUnicode(QString const&) const ()
#1  0x081285b8 in CMySQL::emitError() ()
#2  0x08128369 in CMySQL::connect() ()
#3  0x080a4be5 in CMySQLServer::connect() ()
#4  0x080cb820 in CRegisterServerDialog::initConnectionDialog(CMessagePanel*)
    ()
#5  0x080cb28c in CRegisterServerDialog::CRegisterServerDialog(QString const&, CMessagePanel*, QWidget*) ()
#6  0x080cf0ea in CServerItem::processMenu(int) ()
#7  0x08135d5f in CServerItem::qt_invoke(int, QUObject*) ()
#8  0x081e5db9 in QObject::activate_signal(QConnectionList*, QUObject*) ()
#9  0x081e5ee4 in QObject::activate_signal(int, int) ()
#10 0x083e8026 in QPopupMenu::activated(int) ()
#11 0x08298872 in QPopupMenu::actSig(int, bool) ()
#12 0x0829c31b in QPopupMenu::mouseReleaseEvent(QMouseEvent*) ()
#13 0x081fe09b in QWidget::event(QEvent*) ()
#14 0x0819ffe7 in QApplication::internalNotify(QObject*, QEvent*) ()
#15 0x0819f8d6 in QApplication::notify(QObject*, QEvent*) ()
#16 0x08157862 in QETWidget::translateMouseEvent(_XEvent const*) ()
#17 0x08155907 in QApplication::x11ProcessEvent(_XEvent*) ()
#18 0x083f4ed7 in QEventLoop::processEvents(unsigned) ()
#19 0x081ac82f in QEventLoop::enterLoop() ()
#20 0x081a01c7 in QApplication::enter_loop() ()
#21 0x0829ea9a in QPopupMenu::exec(QPoint const&, int) ()
#22 0x08094b63 in CDatabaseListViewItem::displayMenu(QPoint const&) ()
#23 0x08091e71 in CDatabaseListView::ContextMenuRequested(QListViewItem*, QPoint const&, int) ()
#24 0x08130173 in CDatabaseListView::qt_invoke(int, QUObject*) ()
#25 0x081e5e39 in QObject::activate_signal(QConnectionList*, QUObject*) ()
#26 0x083e6514 in QListView::contextMenuRequested(QListViewItem*, QPoint const&, int) ()
#27 0x08281184 in QListView::contentsContextMenuEvent(QContextMenuEvent*) ()
#28 0x082a7533 in QScrollView::viewportContextMenuEvent(QContextMenuEvent*) ()
#29 0x082a6caa in QScrollView::eventFilter(QObject*, QEvent*) ()
#30 0x08280102 in QListView::eventFilter(QObject*, QEvent*) ()
#31 0x081e40e3 in QObject::activate_filters(QEvent*) ()
#32 0x081e4046 in QObject::event(QEvent*) ()
#33 0x081fe02a in QWidget::event(QEvent*) ()
#34 0x0819ffe7 in QApplication::internalNotify(QObject*, QEvent*) ()
#35 0x0819fcdd in QApplication::notify(QObject*, QEvent*) ()
#36 0x08157bc6 in QETWidget::translateMouseEvent(_XEvent const*) ()
#37 0x08155907 in QApplication::x11ProcessEvent(_XEvent*) ()
#38 0x083f4ed7 in QEventLoop::processEvents(unsigned) ()
#39 0x081ac82f in QEventLoop::enterLoop() ()
#40 0x081ac6fc in QEventLoop::exec() ()
#41 0x081a0193 in QApplication::exec() ()
#42 0x080e0fbc in mysqlcc_main(int, char**) ()
#43 0x080e242b in main ()
#44 0x420156a4 in __libc_start_main () from /lib/tls/libc.so.6
[6 Oct 2003 9:30] Hans Deragon
I tried an old version 0.8.7 of mysqlcc and it works fine.  It reports:

Error 1130:  Host 'localhost.localdomain' is not allowed to connect to this MySQL server.
[7 Oct 2003 5:31] Jonathan Strutt
I have experienced the same problem using Windows 2000. You get a Microsoft application error when trying to connect to a database service which is not running. I've attached a documentn (mySQL error - 071003.doc) to this bug with an image of the error message.
[7 Oct 2003 5:32] Jonathan Strutt
or at least I would if i could.

Sorry for the spam - contact me at jonathan.strutt@capita.co.uk for .DOC file.
[7 Oct 2003 10:04] Hans Deragon
I got my database up and running, and I can confirm that 0.9.3 is crashing only when it fails to login.  When it connects successfully to the database, it is running smoothly.  This has probably something to do with the error reporting.
[8 Dec 2003 16:04] Jorge del Conde
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 bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html