Bug #13792 Crash on selecting catalog
Submitted: 6 Oct 2005 4:29 Modified: 6 Oct 2005 6:18
Reporter: Stewart Smith Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Administrator Severity:S3 (Non-critical)
Version:1.1.2 OS:Linux (linux (Ubuntu Breezy))
Assigned to: CPU Architecture:Any

[6 Oct 2005 4:29] Stewart Smith
Description:
Connecting to MySQL 4.0.23_Debian-3ubuntu2.1-log from Ubuntu Breezy using self compiled mysql-administrator binaries (linked to mysql-5.0.12-beta client libs from mysql.com).

MySQL Administrator crashes when i select the mythconverg database in catalogs.

It reliably produces a core file.

Backtrace is:
#0  0xb734c0db in strlen () from /lib/tls/i686/cmov/libc.so.6
#1  0xb74add09 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string () from /usr/lib/libstdc++.so.6
#2  0xb7871d20 in Glib::ustring::ustring () from /usr/lib/libglibmm-2.0.so.1
#3  0x080fa0b6 in MACatalogsPanel::refresh_index_info (this=0x84d8a98,
    catalog=@0xbf9c6a58, schema=@0xbf9c69a8) at MACatalogsPanel.cc:649
#4  0x080fb419 in MACatalogsPanel::display_schema (this=0x84d8a98,
    catalog=@0xbf9c6a58, schema=@0xbf9c6a54, refresh=false)
    at MACatalogsPanel.cc:982
#5  0x080fbe15 in MACatalogsPanel::schema_selected (this=0x84d8a98,
    sender=0x86f65b0, node=@0xbf9c6ae4) at MACatalogsPanel.cc:958
#6  0x081374aa in SigC::Signal2<void, MGBrowserList*, Gtk::TreeIter const&, SigC::Marshal<void> >::emit_ (p1=@0xbf9c6afc, p2=@0xbf9c6ae4, data=0x86fccb8)
    at signal.h:761
#7  0x0813566f in MGBrowserList::emit_when_idle (this=0x86f65b0)
    at signal.h:726
#8  0x081370df in SigC::ObjectSlot0_<bool, MGBrowserList>::proxy (s=0x8494f30)
    at object_slot.h:63
#9  0xb78674ee in (anonymous namespace)::glibmm_source_callback ()
   from /usr/lib/libglibmm-2.0.so.1
#10 0xb7527750 in g_child_watch_add () from /usr/lib/libglib-2.0.so.0
#11 0xb75254ee in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#12 0xb75284f6 in g_main_context_check () from /usr/lib/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#13 0xb75289d8 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#14 0xb79c2791 in gtk_main_iteration_do () from /usr/lib/libgtk-x11-2.0.so.0
#15 0xb7d0ac8a in Gtk::Main::iteration_impl () from /usr/lib/libgtkmm-2.0.so.1
#16 0xb7d0ab9e in Gtk::Main::iteration () from /usr/lib/libgtkmm-2.0.so.1
#17 0x08140b1a in MGTableBrowserList::row_selected (this=0x86f65b0)
    at MGTableBrowserList.cc:149
#18 0xb786c0d8 in Glib::SignalProxyNormal::slot0_void_callback ()
   from /usr/lib/libglibmm-2.0.so.1
#19 0xb759dab3 in g_cclosure_marshal_VOID__VOID ()
   from /usr/lib/libgobject-2.0.so.0
#20 0xb75923a8 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#21 0xb75a0e8d in g_signal_stop_emission () from /usr/lib/libgobject-2.0.so.0
#22 0xb75a2150 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#23 0xb75a24c3 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#24 0xb7a7b308 in _gtk_tree_selection_internal_select_node ()
   from /usr/lib/libgtk-x11-2.0.so.0
#25 0xb7a8d62c in gtk_tree_view_scroll_to_cell ()
   from /usr/lib/libgtk-x11-2.0.so.0
#26 0xb7a95e81 in gtk_tree_view_set_model () from /usr/lib/libgtk-x11-2.0.so.0
#27 0xb7d5e188 in Gtk::Widget::on_button_press_event ()
   from /usr/lib/libgtkmm-2.0.so.1
#28 0x0813491e in MGBrowserList::CustomTreeView::on_button_press_event (
    this=0x86f7868, ev=0x85f4800) at MGBrowserList.cc:378
---Type <return> to continue, or q <return> to quit---
#29 0xb7d5a27e in Gtk::Widget_Class::button_press_event_callback ()
   from /usr/lib/libgtkmm-2.0.so.1
#30 0xb79c50ac in _gtk_marshal_BOOLEAN__BOXED ()
   from /usr/lib/libgtk-x11-2.0.so.0
#31 0xb7591d75 in g_cclosure_new_swap () from /usr/lib/libgobject-2.0.so.0
#32 0xb75923a8 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#33 0xb75a0c9f in g_signal_stop_emission () from /usr/lib/libgobject-2.0.so.0
#34 0xb75a1ec3 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#35 0xb75a24c3 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#36 0xb7aa71ef in gtk_widget_activate () from /usr/lib/libgtk-x11-2.0.so.0
#37 0xb79c37e7 in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
#38 0xb79c3c48 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#39 0xb77f3b2d in _gdk_events_queue () from /usr/lib/libgdk-x11-2.0.so.0
#40 0xb75254ee in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#41 0xb75284f6 in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#42 0xb75287e3 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#43 0xb79c2ee5 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#44 0xb7d0ac29 in Gtk::Main::run_impl () from /usr/lib/libgtkmm-2.0.so.1
#45 0xb7d0ab1e in Gtk::Main::run () from /usr/lib/libgtkmm-2.0.so.1
#46 0x0809cf9a in main (argc=1, argv=0xbf9c7f74) at main.cc:491

stepping up to 3,
(gdb) print *index
$2 = {key_name = 0x21 <Address 0x21 out of bounds>,
  table_name = 0x666e6f63 <Address 0x666e6f63 out of bounds>,
  index_type = 0x7463696c <Address 0x7463696c out of bounds>,
  not_null = 1869833586, unique = 1769239916, index_columns_num = 1851879023,
  index_columns = 0x4c340079}

which is, of course, garbage.
(gdb) print *(MYX_TABLE_STATUS*)_entity_status->schema_entities[j].entity
$7 = {table_name = 0x8719318 "conflictresolutionany",
  table_type = 0x871a780 "MyISAM", row_format = 0x871a790 "Dynamic",
  rows = 0x871a7a0 "0", avg_row_length = 0x8719278 "0",
  data_length = 0x8719288 "0", max_data_length = 0x8719298 "4294967295",
  index_length = 0x87192a8 "1024", data_free = 0x87192b8 "0",
  auto_increment = 0x87192c8 "",
  create_time = 0x87192d8 "2005-06-24 14:54:41",
  update_time = 0x87192f0 "2005-06-24 14:54:41", check_time = 0x8719308 "",
  create_options = 0x8719570 "", comment = 0x8719580 "", indexes_num = 2,
  indexes = 0x87196b0, columns_num = 2, columns = 0x8719220}

and looking closer:
(gdb) print ((MYX_TABLE_STATUS*)_entity_status->schema_entities[j].entity)->indexes[0]
$12 = {key_name = 0x8719760 "prefertitle",
  table_name = 0x8719740 "conflictresolutionany",
  index_type = 0x8719770 "BTREE", not_null = 1, unique = 0,
  index_columns_num = 1, index_columns = 0x87197b0}
(gdb) print ((MYX_TABLE_STATUS*)_entity_status->schema_entities[j].entity)->indexes[1]
$13 = {key_name = 0x87197e0 "disliketitle",
  table_name = 0x87197c0 "conflictresolutionany",
  index_type = 0x87197f8 "BTREE", not_null = 1, unique = 0,
  index_columns_num = 1, index_columns = 0x8719590}
(gdb) print ((MYX_TABLE_STATUS*)_entity_status->schema_entities[j].entity)->indexes[2]
$14 = {key_name = 0x0, table_name = 0x0, index_type = 0x0, not_null = 0,
  unique = 0, index_columns_num = 0, index_columns = 0x0}

print ts1->indexes_num
$18 = 7

so something is wrong in there.

How to repeat:
Connect to db using MySQL Administrator (over TCP). Select Catalogs. Select mythconverg.

Suggested fix:
Not crash.
[6 Oct 2005 5:57] Marin Purgar
This is a duplicate of the Bug #13628.
[6 Oct 2005 6:18] Stewart Smith
marked as duplicate.

patch fixes problem.