Rob Shortt wrote:
> Attilio Fiandrotti wrote:
<snip/>
>>I think you should first get a working gtk-demo with patched gtk/dfb,
>>and later work on the py-gtk side
>
>
> Gtk-demo is back to working state and also by adding the symbol to
> gdk/gdk.symbols I got rid of the undefined symbol error in pygtk. Now
> the segfault is occurring there and I have found the problem.
>
> See this backtrace of python -c "import gtk":
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread -1209919808 (LWP 3797)]
> 0xb7e8e783 in strlen () from /lib/tls/libc.so.6
> (gdb) bt
> #0 0xb7e8e783 in strlen () from /lib/tls/libc.so.6
> #1 0x080840ea in PyString_FromString ()
> #2 0xb7a6899b in init_gtk () at gtkmodule.c:134
> #3 0x080d631c in _PyImport_LoadDynamicModule ()
> #4 0x080d4315 in PyImport_ExecCodeModule ()
> #5 0x080d4a39 in PyImport_ReloadModule ()
> #6 0x080d4d60 in PyImport_ReloadModule ()
> #7 0x080d52d4 in PyImport_ImportModuleEx ()
> #8 0x080afe91 in _PyBuiltin_Init ()
> #9 0x080589d7 in PyObject_Call ()
> #10 0x080b3d2d in PyEval_CallObjectWithKeywords ()
> #11 0x080b7a80 in PyEval_EvalFrame ()
> #12 0x080ba745 in PyEval_EvalCodeEx ()
> #13 0x080ba7a9 in PyEval_EvalCode ()
> #14 0x080d38ec in PyImport_ExecCodeModuleEx ()
> #15 0x080d3f66 in PyImport_ExecCodeModule ()
> #16 0x080d5876 in PyImport_ImportModule ()
> #17 0x080d4a39 in PyImport_ReloadModule ()
> #18 0x080d4ee1 in PyImport_ReloadModule ()
> #19 0x080d50ee in PyImport_ImportModuleEx ()
> #20 0x080afe91 in _PyBuiltin_Init ()
> #21 0x080589d7 in PyObject_Call ()
> #22 0x080b3d2d in PyEval_CallObjectWithKeywords ()
> #23 0x080b7a80 in PyEval_EvalFrame ()
> #24 0x080ba745 in PyEval_EvalCodeEx ()
> #25 0x080ba7a9 in PyEval_EvalCode ()
> #26 0x080dc995 in PyRun_InteractiveOneFlags ()
> #27 0x080dcab0 in PyRun_InteractiveLoopFlags ()
> #28 0x080dd5b2 in PyRun_AnyFileExFlags ()
> #29 0x08055ba8 in Py_Main ()
> #30 0x08055032 in main ()
>
>
> OK, gtkmodule.c line 134, we're looking at code like this:
>
> /* Add predefined atoms */
> #define add_atom(name) { aname = gdk_atom_name((GDK_##name)); \
> printf("DEBUG: %s\n", #name); \
> printf("DEBUG: %s\n", aname); \
> /* PyModule_AddObject(m, #name, PyString_FromString(aname)); */ \
> g_free(aname); }
>
> add_atom(SELECTION_PRIMARY);
> add_atom(SELECTION_SECONDARY);
>
>
> FYI, I added the DEBUG prints. Here gdk_atom_name() is returning NULL,
> forcing the segfault. I need to figure out why all these are NULL for
> gtk-directfb. I may have to move this to a different mailing list...
> do you know the maintainer for gtk-directfb? I need to understand the
> gtk internals a bit more and how the backends relate to the core.
</snip>
ok, we had cases of crashes in gtk/dfb similar to this in the past: this
seems to be a gtk issue, so the correct mailing list to ask for advice
is gtk-devel [1].
I think you should report here the issue you've found (only the
gdk_atom() stuff, letting go the pygtk backgound) and ask if it's ok for
gdk_atom_name() to return NULL: in this case gtkmodule should free aname
only if != NULL.
Otherwise we'll need to patch gtk/dfb to never return NULL from
gdk_atom_name().
Current maintainer for gtk/dfb is Mike Emmel, former maintainer and
author is Sven Neumann, both are subscribed to both gtk-devel and
directfb-dev.
cheers
Attilio
[1] http://mail.gnome.org/mailman/listinfo/gtk-devel-list
_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev