ah, sorry. Here it is:
daniel@daniubuntu:~/comp/Doques/src$ gdb python
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb)
(gdb) run t_abiclose.py
Starting program: /usr/bin/python t_abiclose.py
[Thread debugging using libthread_db enabled]
[New Thread 0xb7e3f8c0 (LWP 29979)]
Open /tmp/_teste0zXndmV.txt
Close...
Open /tmp/_teste16LFQZT.txt
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7e3f8c0 (LWP 29979)]
0xb6c33a5f in XAP_App::setInputMode (this=0xa168380, szName=0xa3928cc
"default",
bForce=true) at xap_App.cpp:1310
1310 getFrame(i)->getCurrentView()->notifyListeners(AV_CHG_INPUTMODE);
Current language: auto; currently c++
(gdb) where
#0 0xb6c33a5f in XAP_App::setInputMode (this=0xa168380,
szName=0xa3928cc "default", bForce=true) at xap_App.cpp:1310
#1 0xb63e62dc in LoadBindings::Set (this=0xbff1b3bc) at LoadBindings.cpp:913
#2 0xb63e7f68 in LoadBindingsFromURI_invoke (d=0xbff1b458) at
LoadBindings.cpp:307
#3 0xb6c925ff in EV_EditMethod::Fn (this=0xa1f3fc0, pView=0xa37d6d0,
pCallData=0xbff1b458) at ev_EditMethod.cpp:134
#4 0xb6aa0b04 in abi_widget_invoke_ex (w=0xa154ea0,
mthdName=0xb7dc7934 "com.abisource.abiword.loadbindings.fromURI",
data=0xb7dd7534 "keybindings.xml", x=0, y=0) at abiwidget.cpp:2571
#5 0xb6ea7f19 in _wrap_abi_widget_invoke_ex (self=0xb6fd884c, args=0xb6fd86bc,
kwargs=0x0) at ./pyabiword.c:1291
#6 0x080cea39 in PyEval_EvalFrameEx (f=0xa21820c, throwflag=0)
at ../Python/ceval.c:3595
#7 0x080d0345 in PyEval_EvalCodeEx (co=0xb7dc7458,
globals=0xb7e18acc, locals=0x0,
args=0xb7dd78f8, argcount=4, kws=0x0, kwcount=0, defs=0x0, defcount=0,
closure=0x0) at ../Python/ceval.c:2858
#8 0x08117891 in function_call (func=0xb6fdc8b4, arg=0xb7dd78ec, kw=0x0)
at ../Objects/funcobject.c:517
#9 0x0805d867 in PyObject_Call (func=0x0, arg=0xb7dd78ec, kw=0x0)
at ../Objects/abstract.c:1861
#10 0x08063a7a in instancemethod_call (func=0xb6fdc8b4, arg=0xb7dd78ec, kw=0x0)
at ../Objects/classobject.c:2519
#11 0x0805d867 in PyObject_Call (func=0x0, arg=0xb6fd8734, kw=0x0)
at ../Objects/abstract.c:1861
#12 0x080c850c in PyEval_CallObjectWithKeywords (func=0xb6fd889c,
arg=0xb6fd8734,
---Type <return> to continue, or q <return> to quit---
kw=0x0) at ../Python/ceval.c:3464
#13 0x0805d9f0 in PyObject_CallObject (o=0xb6fd889c, a=0xb6fd8734)
at ../Objects/abstract.c:1852
#14 0xb7be567e in ?? ()
from /var/lib/python-support/python2.5/gtk-2.0/gobject/_gobject.so
#15 0xb7d18c4b in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#16 0xb7d2f5d8 in ?? () from /usr/lib/libgobject-2.0.so.0
#17 0xb7d3062b in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#18 0xb7d30c26 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#19 0xb786f33e in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#20 0xb7753fe7 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#21 0xb75ea50a in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#22 0xb7c906f8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#23 0xb7c93da3 in ?? () from /usr/lib/libglib-2.0.so.0
#24 0xb7c93f61 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#25 0xb7754204 in gtk_main_iteration () from /usr/lib/libgtk-x11-2.0.so.0
#26 0xb6c276fd in XAP_UnixFrameImpl::_nullUpdate (this=0xa347e98)
at xap_UnixFrameImpl.cpp:1325
#27 0xb69bb06b in fl_DocListener::populateStrux (this=0xa3ca740, sdh=0xa3843f8,
pcr=0xa350db0, psfh=0xbff1bfe8) at ../../../../src/af/xap/xp/xap_Frame.h:123
#28 0xb6a950a6 in pt_PieceTable::_tellAndMaybeAddListener (this=0xa3e8a40,
pListener=0xa3ca740, listenerId=0, bAdd=true) at pt_PT_Listener.cpp:130
#29 0xb6a95423 in pt_PieceTable::addListener (this=0xa3e8a40,
pListener=0xa3ca740,
listenerId=0) at pt_PT_Listener.cpp:53
#30 0xb6a6b268 in PD_Document::addListener (this=0xa38bd38,
pListener=0xa3ca740,
---Type <return> to continue, or q <return> to quit---
pListenerId=0xa379a1c) at pd_Document.cpp:3339
#31 0xb69b6b78 in FL_DocLayout::fillLayouts (this=0xa3799c8) at
fl_DocLayout.cpp:582
#32 0xb6b39b19 in AP_Frame::_replaceView (this=0xa341a38, pG=0xa37adb0,
pDocLayout=0xa3799c8, pView=0xa37d6d0, pScrollObj=0xa3eb368,
pViewListener=0xa3858d0, pOldDoc=0x0,
pScrollbarViewListener=0xa428478, lid=1,
lidScrollbarViewListener=2, iZoom=101) at ap_Frame.cpp:870
#33 0xb6b39f0d in AP_Frame::_showDocument (this=0xa341a38, iZoom=101)
at ap_Frame.cpp:686
#34 0xb6b3a3d7 in AP_Frame::_replaceDocument (this=0xa341a38, pDoc=0xa38bd38)
at ap_Frame.cpp:608
#35 0xb6b3a4d2 in AP_Frame::loadDocument (this=0xa341a38, pDoc=0xa38bd38)
at ap_Frame.cpp:388
#36 0xb6aa4afd in s_abi_widget_map_cb (p=0xa154ea0) at abiwidget.cpp:1774
#37 0xb7d263d4 in g_cclosure_marshal_VOID__VOID () from
/usr/lib/libgobject-2.0.so.0
#38 0xb7d18c4b in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#39 0xb7d2f5d8 in ?? () from /usr/lib/libgobject-2.0.so.0
#40 0xb7d307ac in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#41 0xb7d30c26 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#42 0xb7878b1c in gtk_widget_map () from /usr/lib/libgtk-x11-2.0.so.0
#43 0xb7878f25 in gtk_widget_set_parent () from /usr/lib/libgtk-x11-2.0.so.0
#44 0xb7777b1b in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#45 0xb7774fef in gtk_notebook_insert_page_menu () from
/usr/lib/libgtk-x11-2.0.so.0
#46 0xb7775606 in gtk_notebook_append_page () from /usr/lib/libgtk-x11-2.0.so.0
#47 0xb7ae437c in ?? () from
/var/lib/python-support/python2.5/gtk-2.0/gtk/_gtk.so
#48 0x080cea39 in PyEval_EvalFrameEx (f=0xa32026c, throwflag=0)
---Type <return> to continue, or q <return> to quit---
at ../Python/ceval.c:3595
#49 0x080d0345 in PyEval_EvalCodeEx (co=0xb7dc7650,
globals=0xb7e18acc, locals=0x0,
args=0xb6fd86f0, argcount=3, kws=0x0, kwcount=0, defs=0xb6fd9a98,
defcount=1,
closure=0x0) at ../Python/ceval.c:2858
#50 0x08117891 in function_call (func=0xb6fdc8ec, arg=0xb6fd86e4, kw=0x0)
at ../Objects/funcobject.c:517
#51 0x0805d867 in PyObject_Call (func=0x0, arg=0xb6fd86e4, kw=0x0)
at ../Objects/abstract.c:1861
#52 0x08063a7a in instancemethod_call (func=0xb6fdc8ec, arg=0xb6fd86e4, kw=0x0)
at ../Objects/classobject.c:2519
#53 0x0805d867 in PyObject_Call (func=0x0, arg=0xb7de276c, kw=0x0)
at ../Objects/abstract.c:1861
#54 0x080c850c in PyEval_CallObjectWithKeywords (func=0xb6fd8784,
arg=0xb7de276c,
kw=0x0) at ../Python/ceval.c:3464
#55 0x0805d9f0 in PyObject_CallObject (o=0xb6fd8784, a=0xb7de276c)
at ../Objects/abstract.c:1852
#56 0xb7be567e in ?? ()
from /var/lib/python-support/python2.5/gtk-2.0/gobject/_gobject.so
#57 0xb7d18c4b in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#58 0xb7d2f095 in ?? () from /usr/lib/libgobject-2.0.so.0
#59 0xb7d307ac in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#60 0xb7d30c26 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#61 0xb76a5eaa in gtk_button_clicked () from /usr/lib/libgtk-x11-2.0.so.0
#62 0xb76a6f58 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#63 0xb7d263d4 in g_cclosure_marshal_VOID__VOID () from
/usr/lib/libgobject-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#64 0xb7d173c9 in ?? () from /usr/lib/libgobject-2.0.so.0
#65 0xb7d18c4b in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#66 0xb7d2e8ee in ?? () from /usr/lib/libgobject-2.0.so.0
#67 0xb7d307ac in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#68 0xb7d30c26 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#69 0xb76a5f4a in gtk_button_released () from /usr/lib/libgtk-x11-2.0.so.0
#70 0xb76a5f83 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#71 0xb775a036 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#72 0xb7d173c9 in ?? () from /usr/lib/libgobject-2.0.so.0
#73 0xb7d18c4b in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#74 0xb7d2ed3d in ?? () from /usr/lib/libgobject-2.0.so.0
#75 0xb7d3062b in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#76 0xb7d30c26 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#77 0xb786f33e in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#78 0xb7752b4c in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
#79 0xb7753ef7 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#80 0xb75ea50a in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#81 0xb7c906f8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#82 0xb7c93da3 in ?? () from /usr/lib/libglib-2.0.so.0
#83 0xb7c942c2 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#84 0xb77543a9 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#85 0xb7b36f1c in ?? () from
/var/lib/python-support/python2.5/gtk-2.0/gtk/_gtk.so
#86 0x080cede3 in PyEval_EvalFrameEx (f=0xa046484, throwflag=0)
at ../Python/ceval.c:3579
#87 0x080d0345 in PyEval_EvalCodeEx (co=0xb7dc7bf0, globals=0xb7e18acc,
---Type <return> to continue, or q <return> to quit---
locals=0xb7e18acc, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0,
defcount=0, closure=0x0) at ../Python/ceval.c:2858
#88 0x080d0557 in PyEval_EvalCode (co=0xb7dc7bf0, globals=0xb7e18acc,
locals=0xb7e18acc) at ../Python/ceval.c:514
#89 0x080edf8f in PyRun_FileExFlags (fp=0x9fee008,
filename=0xbff1f733 "t_abiclose.py", start=257, globals=0xb7e18acc,
locals=0xb7e18acc, closeit=1, flags=0xbff1dc28) at
../Python/pythonrun.c:1273
#90 0x080ee25a in PyRun_SimpleFileExFlags (fp=0x9fee008,
filename=0xbff1f733 "t_abiclose.py", closeit=1, flags=0xbff1dc28)
at ../Python/pythonrun.c:879
#91 0x080595e7 in Py_Main (argc=1, argv=0xbff1dcf4) at ../Modules/main.c:532
#92 0x08058962 in main (argc=Cannot access memory at address 0x0
) at ../Modules/python.c:23
(gdb)
2009/2/26 Daniel Carvalho <idnael@gmail.com>:
> daniel@daniubuntu:~/comp/Doques/src$ gdb python
> GNU gdb 6.8-debian
> Copyright (C) 2008 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law. Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "i486-linux-gnu"...
> (gdb) run t_abiclose.py
> Starting program: /usr/bin/python t_abiclose.py
> [Thread debugging using libthread_db enabled]
> [New Thread 0xb7f038c0 (LWP 29518)]
> Open /tmp/_teste0hd-I0g.txt
> Close...
> Open /tmp/_teste1xAZ9XD.txt
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0xb7f038c0 (LWP 29518)]
> 0xb6cf7a5f in XAP_App::setInputMode (this=0x88b5380, szName=0x8989784
> "default",
> bForce=true) at xap_App.cpp:1310
> 1310 getFrame(i)->getCurrentView()->notifyListeners(AV_CHG_INPUTMODE);
> Current language: auto; currently c++
> (gdb)
>
>
> 2009/2/26 Dominic Lachowicz <domlachowicz@gmail.com>:
>> Can you provide a backtrace? You can run the python EXE inside of GDB,
>> and print out the BT when it crashes.
>>
>> On Thu, Feb 26, 2009 at 1:20 PM, Daniel Carvalho <idnael@gmail.com> wrote:
>>> 2008/12/29 Daniel Carvalho <idnael@gmail.com>:
>>>>
>>>> hello
>>>>
>>>> I have multiple abiwidgets inside a gtk.Notebook (a container that has
>>>> multiple tabs, one for each child).
>>>>
>>>
>>> Hi again
>>>
>>> This was a problem I mentioned some months ago.
>>>
>>> When I installed trunk, I found it has changed...
>>>
>>> Now it crashs if I create a Canvas, close it, and open another one.
>>> But only if I had have made a call to
>>> editor.invoke_cmd("com.abisource.abiword.loadbindings.fromURI","keybindings.xml",0,0)
>>>
>>> thats strange...
>>>
>>> Please see this ready to run example:
>>> If you comment the invoke_cmd call, it will work perfectly.
>>> I send the keybindings.xml file as attachment in this message. [ I
>>> think I took that file from the olpc project or from a sample project
>>> bundled with pyabiword]
>>>
>>>
>>>
>>> #!/usr/bin/env python
>>> # -*- coding: utf-8 -*-
>>>
>>> import pygtk
>>> pygtk.require('2.0')
>>> import gtk
>>>
>>> import abiword
>>>
>>> import os.path
>>> import tempfile
>>> import shutil
>>>
>>> import tempfile
>>>
>>>
>>> class Tabes(gtk.Notebook):
>>>
>>> def __init__(self):
>>>
>>> gtk.Notebook.__init__(self)
>>> self.popup_enable()
>>>
>>> self.set_scrollable(True)
>>> self.set_show_border(False)
>>>
>>> def __map_editor_cb(self,widget,event,editor):
>>>
>>> editor.invoke_cmd("com.abisource.abiword.loadbindings.fromURI","keybindings.xml",0,0)
>>>
>>>
>>> n=0
>>> def teste_open_cb(self,widget, data=None):
>>>
>>> path=tempfile.mkstemp(".txt","_teste"+str(self.n))[1]
>>> f=open(path,"w")
>>> f.write("ola "+str(self.n)+"\n"+path)
>>> f.close()
>>>
>>> print "Open "+path
>>>
>>> nome=os.path.basename(path)
>>>
>>> editor=abiword.Canvas()
>>> # nota: path tem que ser absoluto...
>>> editor.load_file("file:"+path,path)
>>>
>>>
>>> editor.set_show_margin(False) # sem efeito...
>>>
>>> editor.connect_after("map-event",self.__map_editor_cb,editor)
>>>
>>> editor.show()
>>>
>>> lab=gtk.Label(nome)
>>>
>>> index=self.append_page(editor,lab)
>>> self.set_current_page(index)
>>>
>>> self.n = (self.n+1 ) % 30
>>>
>>> def teste_close_cb(self,widget, data=None):
>>> if self.get_n_pages()==0:
>>> return
>>>
>>> print "Close..."
>>> pnum=self.get_current_page()
>>> editor=self.get_nth_page(pnum)
>>>
>>> self.remove_page(pnum)
>>> editor.destroy()
>>>
>>>
>>>
>>> if __name__ == "__main__":
>>>
>>> window=gtk.Window(gtk.WINDOW_TOPLEVEL)
>>> window.set_default_size(640, 480)
>>>
>>> box=gtk.VBox(False,5)
>>> box.show()
>>> window.add(box)
>>>
>>> tabes=Tabes()
>>> box.add(tabes)
>>> tabes.show()
>>>
>>> # buttons:
>>>
>>> b=gtk.Button("open")
>>> b.show()
>>> b.connect("clicked",tabes.teste_open_cb, None)
>>> box.pack_end(b,False,False)
>>>
>>> b=gtk.Button("close")
>>> b.show()
>>> b.connect("clicked",tabes.teste_close_cb, None)
>>> box.pack_end(b,False,False)
>>>
>>> window.show()
>>>
>>> gtk.main()
>>>
>>
>>
>>
>> --
>> Mediocrity knows nothing higher than itself; but talent instantly
>> recognizes genius.
>>
>
Received on Thu Feb 26 19:33:50 2009
This archive was generated by hypermail 2.1.8 : Thu Feb 26 2009 - 19:33:50 CET