Attilio Fiandrotti wrote:
> Rob Shortt wrote:
>> Hi, I just wanted to post an update.
>>
>> Attached is the patch I am using to add gdk_keyval_convert_case() into
>> the directfb backend. I noticed something while running gtk-demo with
>> this patch. I get the message "Unimplemented: gdk_keyval_convert_case"
>> which makes perfect sense, then the demo exits (I don't see the demo).
>> The first thing I realized is that I ran the demo successfully earlier,
>> and I verified this by reversing my patch.
>
> <snip/>
>
> Uhm, if the gtk-demo app cannot start and exits with a crash after
> applying the patch, then i think there must be somtheing wrong in your
> patch that maybe also causes py-gtk to crash.
Yes, that's what I was getting at. :) I was only pointing out what I
had done (and undone).
> 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.
With my DEBUGs, here is the output of python -c "import gtk":
# python -c "import gtk"
DEBUG: SELECTION_PRIMARY
DEBUG: (null)
DEBUG: SELECTION_SECONDARY
DEBUG: (null)
DEBUG: SELECTION_CLIPBOARD
DEBUG: (null)
DEBUG: TARGET_BITMAP
DEBUG: (null)
DEBUG: TARGET_COLORMAP
DEBUG: (null)
DEBUG: TARGET_DRAWABLE
DEBUG: (null)
DEBUG: TARGET_PIXMAP
DEBUG: (null)
DEBUG: TARGET_STRING
DEBUG: (null)
DEBUG: SELECTION_TYPE_ATOM
DEBUG: (null)
DEBUG: SELECTION_TYPE_BITMAP
DEBUG: (null)
DEBUG: SELECTION_TYPE_COLORMAP
DEBUG: (null)
DEBUG: SELECTION_TYPE_DRAWABLE
DEBUG: (null)
DEBUG: SELECTION_TYPE_INTEGER
DEBUG: (null)
DEBUG: SELECTION_TYPE_PIXMAP
DEBUG: (null)
DEBUG: SELECTION_TYPE_WINDOW
DEBUG: (null)
DEBUG: SELECTION_TYPE_STRING
DEBUG: (null)
=======================| DirectFB 1.0.0-rc3 |=======================
(c) 2001-2006 United Cultures of Earth - go for outer space!
(c) 2000-2004 Convergence (integrated media) GmbH
----------------------------------------------------------------
(*) DirectFB/Core: Multi Application Core. (2007-01-02 03:03)
(*) Direct/Thread: Running 'Fusion Dispatch' (MESSAGING, 12772)...
(*) DirectFB/Core: doing sync()...
(*) DirectFB/Genefx: MMX detected and enabled
(*) DirectFB/Graphics: VIA/S3G CLE266/UniChrome 0.4 (-)
(-c:12770): Gdk-CRITICAL **: gdk_drawable_set_colormap: assertion `cmap
== NULL || gdk_drawable_get_depth (drawable) == cmap->visual->depth' failed
(*) Direct/Thread: Running 'EventBufferFeed' (MESSAGING, 12773)...
(!!!) *** WARNING [Application exited without deinitialization of
DirectFB!] *** [core.c:745 in dfb_core_deinit_check()]
(!) Direct/Thread: Canceling 'Fusion Dispatch' (12772)!
Thanks,
-Rob
_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev