GTG

ugly trace when copy/pasting in a custom gtk.TextView

Bug #317101 reported by Lionel Dricot
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
GTG
Invalid
Undecided
Unassigned
PyGTK
Fix Released
Medium
pygtk (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

In the GTG software, we are using a custom TaskView who inherits from gtk.TextView. TaskView has its custom serialization/deserialization functions.

When copy/pasting in our TaskView, we got the following ugly trace (but the program is not always crashing. Sometime the trace appears only after you close the whole program).

Even if we are doing something bad, we should never see this trace as we are doing pure python work.

If you want to reproduce this bug, you can :
- bzr branch lp:gtg
- launch ./debug.sh
- create a new task with some text in it
- copy paste the text in the same task
- if the application didn't crashed, just close it, you will see the trace

*** glibc detected *** python: free(): invalid pointer: 0x09aca264 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0xb7ef93f4]
/lib/tls/i686/cmov/libc.so.6(cfree+0x96)[0xb7efb456]
/usr/lib/libglib-2.0.so.0(g_free+0x36)[0xb7ceac06]
/usr/lib/libgtk-x11-2.0.so.0[0xb783a0d1]
/usr/lib/libgtk-x11-2.0.so.0[0xb78d7d0f]
/usr/lib/libgtk-x11-2.0.so.0[0xb77a506a]
/usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x1ab)[0xb7d6ac4b]
/usr/lib/libgobject-2.0.so.0[0xb7d81095]
/usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x7dc)[0xb7d827ac]
/usr/lib/libgobject-2.0.so.0(g_signal_emit_by_name+0x19d)[0xb7d82acd]
/usr/lib/libgtk-x11-2.0.so.0[0xb780770c]
/usr/lib/libgtk-x11-2.0.so.0[0xb78079b3]
/usr/lib/libgtk-x11-2.0.so.0[0xb77a7036]
/usr/lib/libgobject-2.0.so.0[0xb7d693c9]
/usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x1ab)[0xb7d6ac4b]
/usr/lib/libgobject-2.0.so.0[0xb7d80d3d]
/usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x65b)[0xb7d8262b]
/usr/lib/libgobject-2.0.so.0(g_signal_emit+0x26)[0xb7d82c26]
/usr/lib/libgtk-x11-2.0.so.0[0xb78bc33e]
/usr/lib/libgtk-x11-2.0.so.0(gtk_main_do_event+0x3d7)[0xb77a0fe7]
/usr/lib/libgdk-x11-2.0.so.0[0xb763750a]
/usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x1e8)[0xb7ce26f8]
/usr/lib/libglib-2.0.so.0[0xb7ce5da3]
/usr/lib/libglib-2.0.so.0(g_main_loop_run+0x1d2)[0xb7ce62c2]
/usr/lib/libgtk-x11-2.0.so.0(gtk_clipboard_store+0x16e)[0xb78d9cbe]
/usr/lib/libgtk-x11-2.0.so.0[0xb78d9d6f]
/usr/lib/libgtk-x11-2.0.so.0(gtk_main+0x20c)[0xb77a14fc]
/var/lib/python-support/python2.5/gtk-2.0/gtk/_gtk.so[0xb7b7bf1c]
python(PyEval_EvalFrameEx+0x5973)[0x80cede3]
python(PyEval_EvalFrameEx+0x6785)[0x80cfbf5]
python(PyEval_EvalFrameEx+0x6785)[0x80cfbf5]
python(PyEval_EvalCodeEx+0x685)[0x80d0345]
python(PyEval_EvalCode+0x57)[0x80d0557]
python(PyRun_FileExFlags+0xef)[0x80edf8f]
python(PyRun_SimpleFileExFlags+0x19a)[0x80ee25a]
python(Py_Main+0xc57)[0x80595e7]
python(main+0x22)[0x8058962]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7ea0685]
python[0x80588a1]
======= Memory map: ========
08048000-08144000 r-xp 00000000 08:06 1798794 /usr/bin/python2.5
08144000-08145000 r--p 000fb000 08:06 1798794 /usr/bin/python2.5
08145000-0816a000 rw-p 000fc000 08:06 1798794 /usr/bin/python2.5
0816a000-08170000 rw-p 0816a000 00:00 0
0983f000-0a1ec000 rw-p 0983f000 00:00 0 [heap]
b5c00000-b5c21000 rw-p b5c00000 00:00 0
b5c21000-b5d00000 ---p b5c21000 00:00 0
b5d77000-b5d84000 r-xp 00000000 08:06 1373681 /lib/libgcc_s.so.1
b5d84000-b5d85000 r--p 0000c000 08:06 1373681 /lib/libgcc_s.so.1
b5d85000-b5d86000 rw-p 0000d000 08:06 1373681 /lib/libgcc_s.so.1
b5d9a000-b5dfa000 rw-s 00000000 00:09 2261037 /SYSV00000000 (deleted)
b5dfa000-b5e83000 r--p 00000000 08:06 1848068 /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf
b5e83000-b5e9b000 r-xp 00000000 08:06 1946688 /usr/lib/gio/modules/libgvfsdbus.so
b5e9b000-b5e9c000 r--p 00017000 08:06 1946688 /usr/lib/gio/modules/libgvfsdbus.so
b5e9c000-b5e9d000 rw-p 00018000 08:06 1946688 /usr/lib/gio/modules/libgvfsdbus.so
b5e9d000-b5eaa000 r-xp 00000000 08:06 1800670 /usr/lib/libgvfscommon.so.0.0.0
b5eaa000-b5eab000 r--p 0000d000 08:06 1800670 /usr/lib/libgvfscommon.so.0.0.0
b5eab000-b5eac000 rw-p 0000e000 08:06 1800670 /usr/lib/libgvfscommon.so.0.0.0
b5ec0000-b5ef6000 r-xp 00000000 08:06 1373613 /lib/libdbus-1.so.3.4.0
b5ef6000-b5ef7000 r--p 00035000 08:06 1373613 /lib/libdbus-1.so.3.4.0
b5ef7000-b5ef8000 rw-p 00036000 08:06 1373613 /lib/libdbus-1.so.3.4.0
b5f31000-b5f34000 r-xp 00000000 08:06 1815396 /usr/lib/python2.5/lib-dynload/time.so
b5f34000-b5f35000 r--p 00002000 08:06 1815396 /usr/lib/python2.5/lib-dynload/time.so
b5f35000-b5f37000 rw-p 00003000 08:06 1815396 /usr/lib/python2.5/lib-dynload/time.so
b5f37000-b5f97000 rw-s 00000000 00:09 2228268 /SYSV00000000 (deleted)
b5f97000-b5f98000 r-xp 00000000 08:06 1882018 /usr/lib/gtk-2.0/2.10.0/immodules/im-cedilla.so
b5f98000-b5f99000 r--p 00000000 08:06 1882018 /usr/lib/gtk-2.0/2.10.0/immodules/im-cedilla.so
b5f99000-b5f9a000 rw-p 00001000 08:06 1882018 /usr/lib/gtk-2.0/2.10.0/immodules/im-cedilla.so
b5f9a000-b5fb1000 r--s 00000000 08:06 1880677 /usr/share/mime/mim./debug.sh: line 3: 13340 Abandon python main.py

Related branches

Revision history for this message
Bertrand Rousseau (bertrand-rousseau) wrote :
Download full text (5.1 KiB)

Cut & Paste crashes GTG for me. Shell log:

*** glibc detected *** python: free(): invalid pointer: 0x08624e4c ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0xb7f3b3f4]
/lib/tls/i686/cmov/libc.so.6(cfree+0x96)[0xb7f3d456]
/usr/lib/libglib-2.0.so.0(g_free+0x36)[0xb7d6cc06]
/usr/lib/libgtk-x11-2.0.so.0[0xb78fc0d1]
/usr/lib/libgtk-x11-2.0.so.0[0xb7999d0f]
/usr/lib/libgtk-x11-2.0.so.0[0xb786706a]
/usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x1ab)[0xb7decc4b]
/usr/lib/libgobject-2.0.so.0[0xb7e03095]
/usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x7dc)[0xb7e047ac]
/usr/lib/libgobject-2.0.so.0(g_signal_emit_by_name+0x19d)[0xb7e04acd]
/usr/lib/libgtk-x11-2.0.so.0[0xb78c970c]
/usr/lib/libgtk-x11-2.0.so.0(gtk_selection_convert+0x154)[0xb78ca794]
/usr/lib/libgtk-x11-2.0.so.0[0xb7901072]
/usr/lib/libgtk-x11-2.0.so.0[0xb7999f41]
/usr/lib/libgtk-x11-2.0.so.0[0xb78671e3]
/usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x1ab)[0xb7decc4b]
/usr/lib/libgobject-2.0.so.0[0xb7e03095]
/usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x7dc)[0xb7e047ac]
/usr/lib/libgobject-2.0.so.0(g_signal_emit_by_name+0x19d)[0xb7e04acd]
/usr/lib/libgtk-x11-2.0.so.0[0xb78c8145]
/usr/lib/libgtk-x11-2.0.so.0(gtk_selection_convert+0x179)[0xb78ca7b9]
/usr/lib/libgtk-x11-2.0.so.0(gtk_text_buffer_paste_clipboard+0xd9)[0xb78fdad9]
/usr/lib/libgtk-x11-2.0.so.0[0xb7924fbb]
/usr/lib/libgobject-2.0.so.0(g_cclosure_marshal_VOID__VOID+0x84)[0xb7dfa3d4]
/usr/lib/libgobject-2.0.so.0[0xb7deb3c9]
/usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x1ab)[0xb7decc4b]
/usr/lib/libgobject-2.0.so.0[0xb7e02d3d]
/usr/lib/libgtk-x11-2.0.so.0[0xb77aa870]
/usr/lib/libgtk-x11-2.0.so.0[0xb77aae2c]
/usr/lib/libgtk-x11-2.0.so.0[0xb77ab09d]
/usr/lib/libgtk-x11-2.0.so.0(gtk_bindings_activate_event+0xfe)[0xb77ab20e]
/usr/lib/libgtk-x11-2.0.so.0[0xb7929e0b]
/usr/lib/libgtk-x11-2.0.so.0[0xb7869036]
/usr/lib/libgobject-2.0.so.0[0xb7deb3c9]
/usr/lib/libgobject-2.0.so.0(g_closure_invoke+0xd8)[0xb7decb78]
/usr/lib/libgobject-2.0.so.0[0xb7e02d3d]
/usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x65b)[0xb7e0462b]
/usr/lib/libgobject-2.0.so.0(g_signal_emit+0x26)[0xb7e04c26]
/usr/lib/libgtk-x11-2.0.so.0[0xb797e33e]
/usr/lib/libgtk-x11-2.0.so.0(gtk_window_propagate_key_event+0x11f)[0xb7991eff]
/usr/lib/libgtk-x11-2.0.so.0[0xb79951cc]
/usr/lib/libgtk-x11-2.0.so.0[0xb7869036]
/usr/lib/libgobject-2.0.so.0[0xb7deb3c9]
/usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x1ab)[0xb7decc4b]
/usr/lib/libgobject-2.0.so.0[0xb7e02d3d]
/usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x65b)[0xb7e0462b]
/usr/lib/libgobject-2.0.so.0(g_signal_emit+0x26)[0xb7e04c26]
/usr/lib/libgtk-x11-2.0.so.0[0xb797e33e]
/usr/lib/libgtk-x11-2.0.so.0(gtk_propagate_event+0x1b1)[0xb7861c11]
/usr/lib/libgtk-x11-2.0.so.0(gtk_main_do_event+0x2e7)[0xb7862ef7]
/usr/lib/libgdk-x11-2.0.so.0[0xb76f950a]
/usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x1e8)[0xb7d646f8]
/usr/lib/libglib-2.0.so.0[0xb7d67da3]
/usr/lib/libglib-2.0.so.0(g_main_loop_run+0x1d2)[0xb7d682c2]
/usr/lib/libgtk-x11-2.0.so.0(gtk_main+0xb9)[0xb78633a9]
/var/lib/python-support/python2.5/gtk-2.0/gtk/_gtk.so[0xb7c3ef1c]
python(PyEval_EvalFrameEx+0x5973)[0x80cede3]
python(PyEval_EvalFrame...

Read more...

description: updated
Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

upstream bug : http://bugzilla.gnome.org/show_bug.cgi?id=567747 (it seems that thing have changed in launchpad, I don't find anymore where to report the upstream bug)

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

Might be interesting to know that the bug happens with :
python 2.5.2 pygtk 2.13.0-0 under ubuntu

but someone tested with arch linux with
python version 2.6.1, pygtk version 2.13.0-2

And was unable to reproduce it.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

linking the upstream report, thanks for sent it there.

Changed in gnome-python:
importance: Undecided → Medium
status: New → Triaged
Changed in pygtk:
status: Unknown → New
Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

GTG : This bug is a pure Pygtk bug. There's nothing we can do about it right now.

Changed in gtg:
status: New → Invalid
Changed in pygtk:
status: New → Confirmed
Changed in pygtk:
status: Confirmed → Fix Released
Changed in gnome-python:
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pygtk - 2.14.1-0ubuntu1

---------------
pygtk (2.14.1-0ubuntu1) jaunty; urgency=low

  * New upstream version:
    - Return the deserialized string as a new memory buffer (lp: #317101)
    - Complete docs with 2.14 API

 -- Sebastien Bacher <email address hidden> Fri, 06 Mar 2009 18:06:28 +0100

Changed in pygtk:
status: Fix Committed → Fix Released
Changed in pygtk:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.