PDA

View Full Version : Segfault in Pmw.dialog



dld
January 28th, 2009, 06:03 PM
Has anyone found a workaround or fix for segment fault when activating a Pmw Dialog?
DLD

Zugzwang
January 29th, 2009, 12:08 PM
Dear OP, when using abbreviations that are uncommon in this forum, please always explain them. Also state the context of your question, for example to which toolkit/programming language you refer to.

dld
January 29th, 2009, 05:00 PM
Ok, Thanks. Pwm is Python MIcrowidgets. Dialog is one of the widgets it provides. With the latest releases of Ubuntu (8.10), Python, Pmw and Tkinter, Pmw.Dialog segment faults when calling activate() on it. This may be a problem in Ubuntu (probably not), Python (probably not), Pmw (perhaps) or Tkinter (also possible).

stevescripts
February 4th, 2009, 06:00 PM
Did you get this issue resolved? If not, can you post a simple example that causes the segfault?

Steve
(meant to get around to this earlier ...)

dld
February 5th, 2009, 06:39 PM
Not resolved! As an example execute:
/usr/share/doc/python-pmw-doc/examples/Dialog.py
This is from the python-pmw-doc package.

If it would be helpful, I can cut that example down to fewer lines.

stevescripts
February 5th, 2009, 10:51 PM
Yes, cut it down a bit please.

Does this work for you?



#!/usr/local/bin/python2.5

import Tkinter
root = Tkinter.Tk()
import Pmw
Pmw.initialise(root)

dialog = Pmw.Dialog(
title = 'Pmw dialog',
buttons = ('Yes', 'No'))

root.mainloop()


Steve

dld
February 6th, 2009, 05:56 AM
Yes, it does work: 2 small windows, the dialog with 2 buttons and an empty main window. But the dialog doesn't hold focus and prevent the top window from displaying. Put "dialog.activate()" before "root.mainloop()" and see the segfault.

dld
February 6th, 2009, 06:21 PM
I have traced the problem to a call to _busy_hold() [line 1259 in file PmwBase.py] in calling showbusycursor [line 1110] in def activate() [line 1102]. _busy_hold is a global name; I don't have any idea yet where function _busy_hold() might be defined. Hope this helps.

dld
February 6th, 2009, 06:41 PM
I have traced the problem to a call to _busy_hold() [line 1259 in file PmwBase.py] in calling showbusycursor [line 1110] in def activate() [line 1102]. _busy_hold is a global name; I don't have any idea yet where function _busy_hold() might be defined. Hope this helps.

One more step. The definition of busy_hold() is in file PmwBlt.py beginning on line 54. The segment fault happens on line 57:

window.tk.call(_busyCommand, 'hold', window._w)

This takes us into tk, so it is the end of the line for me. Anybody understand tkinter?