[Bug 427370] New: libyui/python/ncurses: crash when calling Frame widget
https://bugzilla.novell.com/show_bug.cgi?id=427370 Summary: libyui/python/ncurses: crash when calling Frame widget Product: openSUSE 11.0 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: YaST2 AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: dl9pf@gmx.de QAContact: jsrain@novell.com Found By: Community User Test: wget -nd "http://svn.opensuse.org/svn/yast/trunk/libyui-bindings/swig/python/examples/..." works in QT: python widgets.py -> Select Frame crashes in ncurses: unset DISPLAY python widgets.py -> Select Frame I first thought its a minsize issue, but it even crashes with a maximized console window. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=427370 Klaus Kämpf <kkaempf@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kkaempf@novell.com, sh@novell.com AssignedTo|bnc-team-screening@forge.provo.novell.com |kkaempf@novell.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=427370 User sh@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=427370#c1 --- Comment #1 from Stefan Hundhammer <sh@novell.com> 2008-09-18 09:49:05 MDT --- Hm; just a thought: libyui got binary incompatible, and libyui-python-bindings still relies on an older version? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=427370 User dl9pf@gmx.de added comment https://bugzilla.novell.com/show_bug.cgi?id=427370#c2 Jan-Simon Möller <dl9pf@gmx.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dl9pf@gmx.de --- Comment #2 from Jan-Simon Möller <dl9pf@gmx.de> 2008-09-18 09:58:37 MDT --- (In reply to comment #1 from Stefan Hundhammer)
Hm; just a thought: libyui got binary incompatible, and libyui-python-bindings still relies on an older version?
Hmm I compiled both from svn, so if the're incompatible there - I'm lost ;). btw. packages are there: home:dl9pf:yuitest . They use /opt/yuitest as prefix. So LD_LIBRARY_PATH=/opt/yuitest/lib(64) PYTHONPATH=/opt/yuitest/lib(64)/python2.5/site-packages/ python foo.py should do. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=427370 User sh@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=427370#c3 --- Comment #3 from Stefan Hundhammer <sh@novell.com> 2008-09-18 10:13:17 MDT --- You could try "ldd" and "strace" to find out which libs are really used. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=427370 User sh@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=427370#c4 --- Comment #4 from Stefan Hundhammer <sh@novell.com> 2008-09-18 10:15:55 MDT --- BTW You are probably aware that if you compile libyui from SVN, you should also compile yast2-qt and yast2-ncurses (and yast2-gtk if you use it) from SVN. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=427370 User dl9pf@gmx.de added comment https://bugzilla.novell.com/show_bug.cgi?id=427370#c5 --- Comment #5 from Jan-Simon Möller <dl9pf@gmx.de> 2008-09-18 11:06:07 MDT --- (In reply to comment #4 from Stefan Hundhammer)
BTW You are probably aware that if you compile libyui from SVN, you should also compile yast2-qt and yast2-ncurses (and yast2-gtk if you use it) from SVN.
Already done -> home:dl9pf:yuitest LD_LIBRARY_PATH=/opt/yuitest/lib64/ ldd _yui.so linux-vdso.so.1 => (0x00007fffb19fe000) libyui.so.3 => /opt/yuitest/lib64/libyui.so.3 (0x00007feda9192000) libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007feda8e52000) libm.so.6 => /lib64/libm.so.6 (0x00007feda8bfc000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007feda89e5000) libc.so.6 => /lib64/libc.so.6 (0x00007feda868b000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007feda846f000) libdl.so.2 => /lib64/libdl.so.2 (0x00007feda826b000) /lib64/ld-linux-x86-64.so.2 (0x00007feda98b3000) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=427370 User kkaempf@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=427370#c6 --- Comment #6 from Klaus Kämpf <kkaempf@novell.com> 2008-09-19 07:07:32 MDT --- Built newest libyui, qt and ncurses from svn. widgets.py still crashes in ncurses at: #0 NCFrame::preferredWidth (this=0x8e9060) at NCFrame.cc:46 46 defsze.W = firstChild()->preferredWidth(); -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=427370 User kkaempf@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=427370#c7 Klaus Kämpf <kkaempf@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gs@novell.com --- Comment #7 from Klaus Kämpf <kkaempf@novell.com> 2008-09-19 07:21:25 MDT --- Apparently, firstChild() is NULL once in a while. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=427370 User kkaempf@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=427370#c8 --- Comment #8 from Klaus Kämpf <kkaempf@novell.com> 2008-09-19 07:26:23 MDT --- Created an attachment (id=240570) --> (https://bugzilla.novell.com/attachment.cgi?id=240570) proposed fix Gabi, Stefan, please have a look if this fix is appropriate. (It defaults to a 1x1 size if firstChild() is NULL). Jan, apply the diff to your source and recompild. I'll leave it up to Stefan or Gabi to check the diff in. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=427370 User kkaempf@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=427370#c9 Klaus Kämpf <kkaempf@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|kkaempf@novell.com |sh@novell.com --- Comment #9 from Klaus Kämpf <kkaempf@novell.com> 2008-09-19 07:27:50 MDT --- Stefan, can you have a look please ? (or pass it to Gabi ;-)) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=427370 User sh@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=427370#c10 Stefan Hundhammer <sh@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #10 from Stefan Hundhammer <sh@novell.com> 2008-09-19 07:31:12 MDT --- Ugh - yes, you are right, yast2-ncurses has roughly a dozen of those landmines. :-(( -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=427370 User sh@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=427370#c11 --- Comment #11 from Stefan Hundhammer <sh@novell.com> 2008-09-19 07:42:52 MDT --- Created an attachment (id=240572) --> (https://bugzilla.novell.com/attachment.cgi?id=240572) Fix for this and all similar cases My naive approach tends to be to check pointers I get from the outside for 0 each time I try to dereference one. This prevents a lot of segfaults. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=427370 User dl9pf@gmx.de added comment https://bugzilla.novell.com/show_bug.cgi?id=427370#c12 --- Comment #12 from Jan-Simon Möller <dl9pf@gmx.de> 2008-09-20 15:13:41 MDT --- with the last path it crashes with: Reading symbols from /opt/yuitest/lib64/python2.5/site-packages/_yui.so...done. Loaded symbols for /opt/yuitest/lib64/python2.5/site-packages/_yui.so Reading symbols from /opt/yuitest/lib64/libyui.so.3...done. Loaded symbols for /opt/yuitest/lib64/libyui.so.3 Reading symbols from /usr/lib64/libstdc++.so.6...done. Loaded symbols for /usr/lib64/libstdc++.so.6 Reading symbols from /lib64/libgcc_s.so.1...done. Loaded symbols for /lib64/libgcc_s.so.1 Reading symbols from /usr/lib64/python2.5/lib-dynload/_locale.so...done. Loaded symbols for /usr/lib64/python2.5/lib-dynload/_locale.so Reading symbols from /usr/lib64/python2.5/lib-dynload/operator.so...done. Loaded symbols for /usr/lib64/python2.5/lib-dynload/operator.so Reading symbols from /home/dl9pf/pfx/lib/YaST2/plugin/libpy2ncurses.so.2...done. Loaded symbols for /home/dl9pf/pfx//lib/YaST2/plugin/libpy2ncurses.so.2 Reading symbols from /lib64/libncursesw.so.5...done. Loaded symbols for /lib64/libncursesw.so.5 Reading symbols from /usr/lib64/libpanelw.so.5...done. Loaded symbols for /usr/lib64/libpanelw.so.5 Core was generated by `python widgets.py'. Program terminated with signal 11, Segmentation fault. [New process 5662] #0 NCFrame::preferredWidth (this=0xba5d90) at NCFrame.cc:46 warning: Source file is more recent than executable. 46 defsze.W = hasChildren() ? firstChild()->preferredWidth() : 0; (gdb) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=427370 User dl9pf@gmx.de added comment https://bugzilla.novell.com/show_bug.cgi?id=427370#c13 --- Comment #13 from Jan-Simon Möller <dl9pf@gmx.de> 2008-09-22 05:36:16 MDT --- (In reply to comment #11 from Stefan Hundhammer)
Created an attachment (id=240572) --> (https://bugzilla.novell.com/attachment.cgi?id=240572) [details] Fix for this and all similar cases
Does this really fix the issue ? If I use the first patch, it works. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=427370 User sh@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=427370#c14 --- Comment #14 from Stefan Hundhammer <sh@novell.com> 2008-09-22 14:55:08 MDT --- Does it still crash with the patch from comment #13 ? It really shouldn't. If yes: Do you have a backtrace? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=427370 User sh@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=427370#c15 --- Comment #15 from Stefan Hundhammer <sh@novell.com> 2008-09-22 15:01:33 MDT --- if ( hasChildren() ) firstChild()->... is equivalent (but better readable and slightly more efficient) to if ( firstChild() ) firstChild()->... http://svn.opensuse.org/svn/yast/trunk/libyui/src/YWidget.h typedef YChildrenManager<YWidget> YWidgetChildrenManager; .. class YWidget { ... /** * Returns 'true' if this widget has any children. **/ bool hasChildren() const { return childrenManager()->hasChildren(); } /** * Returns the first child or 0 if there is none. * Useful mostly for children managers that handle only one child. **/ YWidget * firstChild() const { return childrenManager()->firstChild(); } ... /** * Returns this widget's children manager. **/ YWidgetChildrenManager * childrenManager() const; ... }; http://svn.opensuse.org/svn/yast/trunk/libyui/src/YChildrenManager.h template<class T> class YChildrenManager { ... /** * Check if there are any children. **/ bool hasChildren() const { return ! empty(); } /** * Returns the first child or 0 if there is none. * Useful mostly for children managers that handle only one child. **/ T * firstChild() { return _children.empty() ? (T *) 0 : _children.front(); } ... }; -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=427370 Stefan Hundhammer <sh@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEEDINFO Info Provider| |dl9pf@gmx.de -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=427370 User dl9pf@gmx.de added comment https://bugzilla.novell.com/show_bug.cgi?id=427370#c16 Jan-Simon Möller <dl9pf@gmx.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |ASSIGNED Info Provider|dl9pf@gmx.de | --- Comment #16 from Jan-Simon Möller <dl9pf@gmx.de> 2008-09-23 07:27:51 MDT --- Hmm, works now - possibly suffered a wrong built version of yast-ncurses.. Ok, big thanks! -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=427370 User sh@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=427370#c17 Stefan Hundhammer <sh@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #17 from Stefan Hundhammer <sh@novell.com> 2008-09-23 08:06:15 MDT --- OK, then I call this fixed. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com