kostyll / formlayout

Automatically exported from code.google.com/p/formlayout
0 stars 0 forks source link

Multiple calls to fedit() result in a segmentation fault #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

<code>
import formlayout

def main() :

    while True :
        keys = [('foo','bar')]
        values = formlayout.fedit(keys)

if __name__ == '__main__' : main()
else : pass
</code>

What is the expected output? What do you see instead?
(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_container_add: assertion 
`GTK_IS_CONTAINER (container)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_container_add: assertion 
`GTK_IS_CONTAINER (container)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_container_add: assertion 
`GTK_IS_CONTAINER (container)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_container_add: assertion 
`GTK_IS_CONTAINER (container)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_container_add: assertion 
`GTK_IS_CONTAINER (container)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_container_add: assertion 
`GTK_IS_CONTAINER (container)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_container_add: assertion 
`GTK_IS_CONTAINER (container)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_container_add: assertion 
`GTK_IS_CONTAINER (container)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_container_add: assertion 
`GTK_IS_CONTAINER (container)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_container_add: assertion 
`GTK_IS_CONTAINER (container)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_container_add: assertion 
`GTK_IS_CONTAINER (container)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_container_add: assertion 
`GTK_IS_CONTAINER (container)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_container_add: assertion 
`GTK_IS_CONTAINER (container)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_container_add: assertion 
`GTK_IS_CONTAINER (container)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_container_add: assertion 
`GTK_IS_CONTAINER (container)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_container_add: assertion 
`GTK_IS_CONTAINER (container)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed

(<unknown>:4512): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion 
`GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed
Segmentation fault

What version of the product are you using? On what operating system?
On vanilla Ubuntu 11.04 with formlayout installed in a virtualenv via pip.

Please provide any additional information below.

Original issue reported on code.google.com by b...@co57.com on 30 Sep 2011 at 2:21

GoogleCodeExporter commented 9 years ago
In your script, I can see only one call to fedit.
You mention multiple calls to fedit in your report: did you run it inside 
IPython several times or anywhere else?

Original comment by pierre.raybaut on 6 Oct 2011 at 2:38

GoogleCodeExporter commented 9 years ago
The call to fedit is inside a while loop. That's what I meant by "multiple 
calls." Cheers! ~br

Original comment by b...@co57.com on 6 Oct 2011 at 2:48

GoogleCodeExporter commented 9 years ago
As certain versions of PyQt does not like the QApplication to be destroyed 
(when quitting the `fedit` function), I suggest the two following options:

1. initializing your own QApplication, only once, before calling fedit (before 
your while loop):

from PyQt4.QtGui import QApplication
app = QApplication([])
data = dict(a=1)
while True:
    data = formlayout.fedit(data)

2. if 1. does not work, try the following but the result should be the same:

from PyQt4.QtGui import QApplication
app = QApplication([])
data = dict(a=1)
while True:
    dialog = formlayout.FormDialog(data)
    if dialog.exec_():
        data = dialog.get()

Original comment by pierre.raybaut on 6 Oct 2011 at 3:06