Bug #58209 /usr/local/bin/mysql-workbench-bin crashes on start
Submitted: 15 Nov 2010 20:13 Modified: 16 Dec 2010 11:46
Reporter: Rafal W Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:5.2.1-ALPHA OS:FreeBSD
Assigned to: CPU Architecture:Any
Tags: crash, freebsd

[15 Nov 2010 20:13] Rafal W
Description:
When started mysql-workbench-bin from console, it's crashing (SEGV).
Please see backtrace.

More details:
http://forums.freebsd.org/showthread.php?t=19387

How to repeat:
> mysql-workbench-bin
Segmentation fault
Each time.

Here is backtrace:

(gdb) run
Starting program: /usr/local/bin/mysql-workbench-bin 
[New LWP 100257]
[New Thread 80b4021c0 (LWP 100257)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 80b4021c0 (LWP 100257)]
0x00000008092c05b7 in strlen () from /lib/libc.so.7
(gdb) bt full
#0  0x00000008092c05b7 in strlen () from /lib/libc.so.7
No symbol table info available.
#1  0x0000000808dc9bc1 in std::char_traits<char>::length (__s=0x0) at char_traits.h:258
No locals.
#2  0x0000000808dcbe15 in std::string::assign (this=0x7fffffffe4b0, __s=0x0) at basic_string.h:920
No locals.
#3  0x0000000808dcbe45 in std::string::operator= (this=0x7fffffffe4b0, __s=0x0) at basic_string.h:499
No locals.
#4  0x000000000070a87a in main (argc=1, argv=0x7fffffffe768) at main.cpp:113
	i = 1
	wboptions = {basedir = {static npos = 18446744073709551615, 
    _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x808f3b0b8 ""}}, plugin_search_path = {
    static npos = 18446744073709551615, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
      _M_p = 0x808f3b0b8 ""}}, struct_search_path = {static npos = 18446744073709551615, 
    _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x808f3b0b8 ""}}, module_search_path = {
    static npos = 18446744073709551615, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
      _M_p = 0x808f3b0b8 ""}}, library_search_path = {static npos = 18446744073709551615, 
    _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x808f3b0b8 ""}}, 
  cdbc_driver_search_path = {static npos = 18446744073709551615, 
    _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x808f3b0b8 ""}}, user_data_dir = {
    static npos = 18446744073709551615, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
      _M_p = 0x808f3b0b8 ""}}, open_at_startup = {static npos = 18446744073709551615, 
    _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x808f3b0b8 ""}}, 
  force_sw_rendering = false, force_opengl_rendering = false, use_log_file = false}
	disp = (Glib::Dispatcher *) 0x7fffffffe700
	splash_pid = 0
	app = {<sigc::trackable> = {callback_list_ = 0x80b474b10}, _vptr$Main = 0x808e0a070, static signal_run_ = {<No data fields>}, 
  static signal_quit_ = {<No data fields>}, static signal_key_snooper_ = {<No data fields>}, static instance_ = 0x0}
	program = {_wb_context_ui = 0x7fffffffe530, _wb_context = 0x808d91e2f, _grt_manager = 0x8, _main_form = 0x8, _idle_signal_conn = {slot_ = 0xaf714b}, 
  static _instance = 0x0}

Suggested fix:
Please don't pass NULL to libstdc++ library when environment is not setup.
[16 Nov 2010 2:59] Alfredo Kojima
You're not supposed to run the -bin script directly, you must start WB using the mysql-workbench script.
[16 Nov 2010 11:41] Rafal W
Even then, it shouldn't do SEGV! SEGV is memory leak or access to invalid memory which could cause some unexpected system behavior.
http://en.wikipedia.org/wiki/SIGSEGV
It's wrong and very not intuitive.
At least fix it by writing some error message:
Environment was not initiated, exiting...

I spent already whole day struggling why it does SEGV and compiling everything with debug symbols to find out the reason of SEGV.
Please fix it.
[16 Nov 2010 11:46] MySQL Verification Team
Please try version 5.2.29.
[17 Dec 2010 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".