Bug 767619

Summary: ncurses crashes in sw_single
Product: [openSUSE] openSUSE 12.2 Reporter: Duncan Mac-Vicar <dmacvicar>
Component: YaST2Assignee: Gabriele Mohr <gs>
Status: VERIFIED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Major    
Priority: P2 - High CC: bwiedemann, ma, sbrabec
Version: FactoryFlags: coolo: SHIP_STOPPER+
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: Yes
Marketing QA Status: --- IT Deployment: ---

Description Duncan Mac-Vicar 2012-06-19 08:07:38 UTC
Simply running yast2 sw_single in ncurses mode. Qt and Gtk are working for me.

Program received signal SIGSEGV, Segmentation fault.                                                                                                                                  
[Switching to Thread 0x7fffeeb3d700 (LWP 24287)]
0x00007ffff626808b in __dynamic_cast () from /usr/lib64/libstdc++.so.6
(gdb) bt
#0  0x00007ffff626808b in __dynamic_cast () from /usr/lib64/libstdc++.so.6                                                                                                              [#1  0x00007fffe413d664 in myPad (this=0x7fffe8382120) at /usr/include/YaST2/ncurses/NCTable.h:119
#2  setSortStrategy (newStrategy=0x7fffe83838a0, this=0x7fffe8382120) at /usr/include/YaST2/ncurses/NCTable.h:111                                                                       
#3  NCPkgTable::NCPkgTable (this=0x7fffe8382120, parent=<optimized out>, tableHeader=<optimized out>) at NCPkgTable.cc:127
#4  0x00007fffe41465cd in NCPackageSelector::createPkgLayout (this=0x7fffe8055b10, selector=<optimized out>, type=NCPkgTable::T_Packages) at NCPackageSelector.cc:1632
#5  0x00007fffe4140d75 in NCPackageSelectorStart::NCPackageSelectorStart (this=0x7fffe8055860, parent=<optimized out>, modeFlags=72, dimension=<optimized out>)
    at NCPackageSelectorStart.cc:92/lib64/libkdecore.so.5                                                                                                                               D#6  0x00007fffe4141067 in NCPackageSelectorPluginImpl::createPackageSelector (this=<optimized out>, parent=0x7fffe805c8d0, modeFlags=72) at NCPackageSelectorPluginImpl.cc:69
#7  0x00007ffff5154fe7 in YCPDialogParser::parsePackageSelector(YWidget*, YWidgetOpt&, YCPTerm const&, YCPList const&, int) () from /usr/lib64/YaST2/plugin/libpy2UI.so.2
#8  0x00007ffff5167853 in YCPDialogParser::parseWidgetTreeTerm(YWidget*, YWidgetOpt&, YCPTerm const&) () from /usr/lib64/YaST2/plugin/libpy2UI.so.2
#9  0x00007ffff51692b7 in YCPDialogParser::parseWidgetTreeTerm(YWidget*, YCPTerm const&) () from /usr/lib64/YaST2/plugin/libpy2UI.so.2
#10 0x00007ffff5147b02 in YCP_UI::OpenDialog(YCPTerm const&, YCPTerm const&) () from /usr/lib64/YaST2/plugin/libpy2UI.so.2
#11 0x00007ffff51305c3 in YUINamespace::OpenDialog(YCPTerm const&, YCPTerm const&) () from /usr/lib64/YaST2/plugin/libpy2UI.so.2
#12 0x00007ffff513745a in YUIFunction::evaluateCall_int() () from /usr/lib64/YaST2/plugin/libpy2UI.so.2
#13 0x00007ffff514c0b9 in YCPBuiltinCaller::call() () from /usr/lib64/YaST2/plugin/libpy2UI.so.2
#14 0x00007ffff4eb6db1 in YUI::uiThreadMainLoop (this=0x13f3620) at YUI.cc:3817bc624"
#15 0x00007ffff4eb6f0e in start_ui_thread (yui=<optimized out>) at YUI.cc:497
Comment 1 Bernhard Wiedemann 2012-06-19 09:05:57 UTC
this is from
gdb --args  /usr/lib/YaST2/bin/y2base sw_single gtk


#0  0x00007fffdccd31bd in __gnu_cxx::__exchange_and_add_dispatch(int*, int) [clone .constprop.79] () from /usr/lib64/YaST2/plugin/libpy2gtk_pkg.so.2
#1  0x00007fffdccd76fe in YGPackageSelector::Impl::refreshQuery() ()
   from /usr/lib64/YaST2/plugin/libpy2gtk_pkg.so.2
#2  0x00007fffdccff6af in YGtkPkgQueryWidget::notifyDelay(int)::inner::timeout_cb(void*) () from /usr/lib64/YaST2/plugin/libpy2gtk_pkg.so.2
#3  0x00007fffebd08f9b in ?? () from /usr/lib64/libglib-2.0.so.0
#4  0x00007fffebd08405 in g_main_context_dispatch ()
   from /usr/lib64/libglib-2.0.so.0
#5  0x00007fffebd08738 in ?? () from /usr/lib64/libglib-2.0.so.0
#6  0x00007fffebd087f4 in g_main_context_iteration ()
   from /usr/lib64/libglib-2.0.so.0
#7  0x00007fffeea43c6c in YGUI::waitInput(unsigned long, bool) ()
   from /usr/lib64/YaST2/plugin/libpy2gtk.so.2
#8  0x00007ffff46c09a6 in YDialog::waitForEvent(int) ()
   from /usr/lib64/libyui.so.4
#9  0x00007fffeea42789 in YGUI::runPkgSelection(YWidget*) ()
   from /usr/lib64/YaST2/plugin/libpy2gtk.so.2
#10 0x00007ffff493073c in YCP_UI::RunPkgSelection(YCPValue const&) ()
   from /usr/lib64/YaST2/plugin/libpy2UI.so.2
#11 0x00007ffff491b60d in YUINamespace::RunPkgSelection(YCPValue const&) ()
   from /usr/lib64/YaST2/plugin/libpy2UI.so.2
#12 0x00007ffff491ee16 in YUIFunction::evaluateCall_int() ()
   from /usr/lib64/YaST2/plugin/libpy2UI.so.2
#13 0x00007ffff49360b9 in YCPBuiltinCaller::call() ()
   from /usr/lib64/YaST2/plugin/libpy2UI.so.2
#14 0x00007ffff46a0db1 in YUI::uiThreadMainLoop() ()
   from /usr/lib64/libyui.so.4
#15 0x00007ffff46a0f0e in start_ui_thread(void*) () from /usr/lib64/libyui.so.4
#16 0x00007ffff673be0e in start_thread () from /lib64/libpthread.so.0
#17 0x00007ffff5a5c28d in clone () from /lib64/libc.so.6
Comment 2 Gabriele Mohr 2012-06-19 09:31:40 UTC
(In reply to comment #1)
> this is from
> gdb --args  /usr/lib/YaST2/bin/y2base sw_single gtk
> 
> 
This is not related to this bug.
Comment 3 Gabriele Mohr 2012-06-19 09:59:39 UTC
I have debugged the crash together with Michael Matz.
Reason of the segfault was that 'myPad()' (where the dynamic_cast is done) is called in the constructor of NCPkgTable and 'myPad()' is a method of the parent class NCPadWidget, which isn't ready with initialisation at this moment (this behaviour has changed with gcc-4.7).

I have submitted yast2-ncurses-pkg-2.22.7 with the bug-fix to Factory.
Comment 4 Bernhard Wiedemann 2012-06-19 15:37:47 UTC
yast --ncurses -i
works now with yast2-ncurses-pkg-2.22.7-60.1.x86_64 from YaST:Head repo
Great!
Comment 5 Bernhard Wiedemann 2012-06-19 19:55:43 UTC
*** Bug 764419 has been marked as a duplicate of this bug. ***
Comment 6 Bernhard Wiedemann 2012-06-19 19:57:16 UTC
split off the gtk issue into bug 767666