Bug 18085 - python gtkmozembed example coredumps inside libxul
Summary: python gtkmozembed example coredumps inside libxul
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: xulrunner-libs (show other bugs)
Version: unstable
Hardware: all Linux
: P2 normal
Assignee: Andrey Cherepanov
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-03 15:42 MSK by Andrey V Khavryuchenko
Modified: 2008-12-08 11:08 MSK (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey V Khavryuchenko 2008-12-03 15:42:29 MSK
Gtkmozembed example:

import gtk
import gtkmozembed

class TinyGecko:
    def __init__(self):
        self.moz = gtkmozembed.MozEmbed()
                
        win = gtk.Window()
        win.add(self.moz)
        print '!!! here'
        win.show_all()
        print '!!! there'
        # self.moz.load_url('http://www.pygtk.org')
        data = '<html><head><title>Hello</title></head><body>pygtk dev</body></html>'
        self.moz.render_data(data, long(len(data)), 'file:///', 'text/html')

if __name__ == '__main__':
  TinyGecko()
  gtk.main()

gdb traceback:

(no debugging symbols found)
!!! here

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1211959616 (LWP 15666)]
0xb6063bd2 in EmbedPrivate::Realize () from /usr/lib/libxul.so
(gdb) bt
#0  0xb6063bd2 in EmbedPrivate::Realize () from /usr/lib/libxul.so
#1  0xb60625da in ?? () from /usr/lib/libxul.so
#2  0x0829d288 in ?? ()
#3  0xbfc30558 in ?? ()
#4  0x00000000 in ?? ()

Feels like this bug https://bugzilla.mozilla.org/show_bug.cgi?id=358926
Comment 1 Andrey V Khavryuchenko 2008-12-05 19:29:08 MSK
Обновлённый backtrace:

akhavr@t40 ~/RPM/BUILD $ gdb python
GNU gdb 6.6-alt3 (ALT Linux)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i586-alt-linux"...
(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb)
(gdb) set env MOZILLA_FIVE_HOME=/usr/lib/firefox/
(gdb) set args /tmp/mozembed.py
(gdb) run
Starting program: /usr/bin/python /tmp/mozembed.py
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New process 17786]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[New Thread -1211742528 (LWP 17786)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
!!! here
(no debugging symbols found)
(no debugging symbols found)
!!! there
[New Thread -1256752240 (LWP 17795)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1211742528 (LWP 17786)]
0xb6711346 in nsEmbedStream::AppendToStream () from /usr/lib/libxul.so
(gdb) bt
#0  0xb6711346 in nsEmbedStream::AppendToStream () from /usr/lib/libxul.so
#1  0xb670cd36 in nsWebBrowser::AppendToStream () from /usr/lib/libxul.so
#2  0xb60164c3 in EmbedPrivate::AppendToStream () from /usr/lib/libxul.so
#3  0xb60140a0 in gtk_moz_embed_render_data () from /usr/lib/libxul.so
#4  0xb6c5a149 in ?? () from /usr/lib/python2.5/site-packages/gtk-2.0/gtkmozembed.so
#5  0x0822c990 in ?? ()
#6  0xb7bf4574 in ?? ()
#7  0x00000044 in ?? ()
#8  0xb7c03d94 in ?? ()
#9  0xb7c0569c in ?? ()
#10 0xbfb657cc in ?? ()
#11 0xbfb657d4 in ?? ()
#12 0xbfb657d0 in ?? ()
#13 0xb7c03cc0 in ?? ()
#14 0x00000044 in ?? ()
#15 0xb7bf4574 in ?? ()
#16 0x00000044 in ?? ()
#17 0xb7c0569c in ?? ()
#18 0xb7c03d94 in ?? ()
#19 0xb7bf4574 in ?? ()
#20 0xb7efcff4 in ?? () from /usr/lib/libpython2.5.so.1.0
#21 0x081c9a6c in ?? ()
#22 0x081ca9b4 in ?? ()
#23 0xbfb65818 in ?? ()
#24 0xb7e56129 in PyCFunction_Call () from /usr/lib/libpython2.5.so.1.0
Backtrace stopped: frame did not save the PC
(gdb) q
The program is running.  Exit anyway? (y or n) y

Судя по исходникам, авторы тупо забивают на проверку возвращаемых значений.

Тестирую патч.
Comment 2 Alexey Gladkov 2008-12-08 11:08:49 MSK
Приложил патч на xulrunner-1.9.0.5-alt1.20081205. Попробуйте, если не исправлено, то переоткройте.