Mailinglist Archive: yast-devel (34 mails)

< Previous Next >
Re: [yast-devel] Python-yui's TreeItem widget causes segfault
  • From: Katarina Machalkova <kmachalkova@xxxxxxx>
  • Date: Fri, 25 Jun 2010 11:17:13 +0200
  • Message-id: <201006251117.17588.kmachalkova@xxxxxxx>
Hi Pranav,

My program works for most other widgets included, but when I use the
TreeItem, I get a Segfault at the end of my program. The program otherwise
works as desired. Do you have any suggestions to fix this?

Even just this code causes this problem:
item1 = yui.YTreeItem("hello")
item2 = yui.YTreeItem(item1, "world")

I am using Python 2.6 on Sles 11.0.

Erm, looks similar to
which has been fixed, but no clue if the fix went to SLES11 (is this GA or
SP1?). Please check the changelog of yast2-libyui package

I've tried myself (not really proficient in python, though) with fixed libyui

i) I can get a simple dialog with 1 tree widget and 1 button displayed, but
only in text-mode/ncurses (wut? :) ), GUI just shows an empty box
ii) it always segfaults on closing the dialog

The bug quoted above deals with memory ownership issues, so it seems to me
there are still some places left where this needs to be addressed in libyui(-

Conclusion: please file a bug, assign to yast2-maintainers and CC: kkaempf.
Don't forget to include a code sample


P.S. Here's my lame code:
import sys
import yui

log = yui.YUILog.instance()
log.enableDebugLogging( True )

factory = yui.YUI.widgetFactory()
dialog = factory.createPopupDialog()

item1 = yui.YTreeItem("hello")
item2 = yui.YTreeItem( item1, "world")

vbox = factory.createVBox( dialog )
tree = factory.createTree( vbox, "Hello, World!" )

factory.createPushButton( vbox, "&OK" )
event = dialog.waitForEvent()
\\\\\ Katarina Machalkova
\\\\\\\__o OOo developer
__\\\\\\\'/_ & hedgehog painter
< Previous Next >
Follow Ups