RSS/Atom feed Twitter
Site is read-only, email is disabled

PyGEGL instant crash

This discussion is connected to the gegl-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

3 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

PyGEGL instant crash David Gowers 15 Jul 15:35
PyGEGL instant crash David Gowers 15 Jul 16:57
PyGEGL instant crash David Gowers 24 Sep 03:06
David Gowers
2007-07-15 15:35:51 UTC (over 17 years ago)

PyGEGL instant crash

Using Python 2.6, typing 'import gegl' at the interpreter prompt causes the following crash to immediately happen:

---- babl-db.c:100 babl_db_insert()
Eeeeek
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1". [Thread debugging using libthread_db enabled] [New Thread -1210014016 (LWP 30914)] 0xffffe410 in __kernel_vsyscall ()
#0 0xffffe410 in __kernel_vsyscall () #1 0xb7e97933 in waitpid () from /lib/tls/i686/cmov/libc.so.6 #2 0xb7e413c9 in strtold_l () from /lib/tls/i686/cmov/libc.so.6 #3 0xb7f6e7dd in system () from /lib/tls/i686/cmov/libpthread.so.0 #4 0xb6e93df4 in babl_backtrack () at babl-internal.c:68 #5 0xb6e93e15 in babl_die () at babl-internal.c:74 #6 0xb6e8d352 in babl_db_insert (db=0x0, item=0x82bbff8) at babl-db.c:100 #7 0xb6e968be in babl_type_new (first_arg=0xb6ef90d6) at babl-type.c:135 #8 0xb6ef7dea in init () at CIE-Lab.c:427 #9 0xb7b191b3 in babl_extension_init () at babl-extension.c:194 #10 0xb7b16a2f in babl_init () at babl.c:40 #11 0xb7b3630e in gegl_post_parse_hook (context=0x0, group=0x0, data=0x0, error=0x0)
at gegl-init.c:199
#12 0xb7b364d5 in gegl_init (argc=0xbffa1038, argv=0xbffa1034) at gegl-init.c:73 #13 0xb7f8494d in pygegl_register_classes (d=0xb7d27714) at gegl.override:139 #14 0xb7f82f21 in initgegl () at geglmodule.c:57 #15 0x080d742f in _PyImport_LoadDynamicModule (name=0xbffa2177 "gegl", pathname=0xbffa1103
"/usr/lib/python2.6/site-packages/geglmodule.so", fp=0xfffffe00) at ./Python/importdl.c:53
#16 0x080d5327 in load_module (name=0xbffa2177 "gegl", fp=0x0, buf=0xbffa1103 "/usr/lib/python2.6/site-packages/geglmodule.so", type=3, loader=0xbffa0974) at Python/import.c:1752 #17 0x080d578c in import_submodule (mod=0x81343c0, subname=0xbffa2177 "gegl", fullname=0xbffa2177 "gegl") at Python/import.c:2394 #18 0x080d59d1 in load_next (mod=0x81343c0, altmod=0x81343c0, p_name=,
buf=0xbffa2177 "gegl", p_buflen=0xbffa3178) at Python/import.c:2214 #19 0x080d5e0d in import_module_level (name=0x0, globals=0xb7de2acc, locals=, fromlist=0x81343c0, level=-1) at Python/import.c:1995
#20 0x080d62de in PyImport_ImportModuleLevel (name=0xb7d23374 "gegl", globals=0xb7de2acc,
locals=0xb7de2acc, fromlist=0xfffffe00, level=-512) at Python/import.c:2066 #21 0x080b5658 in builtin___import__ (self=0x0, args=0xfffffe00, kwds=0xfffffe00)c:1995
at Python/bltinmodule.c:47
#22 0x0805a8ac in PyObject_Call (func=0xbffa0974, arg=0xfffffe00, kw=0xfffffe00) at Objects/abstract.c:1860
#23 0x080b9c39 in PyEval_CallObjectWithKeywords (func=0xfffffe00, arg=0xb7ddecac, kw=0x0)
at Python/ceval.c:3433
#24 0x080bc631 in PyEval_EvalFrameEx (f=0x81ebf24, throwflag=0) at Python/ceval.c:2071
#25 0x080c133f in PyEval_EvalCodeEx (co=0xb7d9d968, globals=0xb7de2acc, locals=0xb7de2acc, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2840
#26 0x080c14c6 in PyEval_EvalCode (co=0xfffffe00, globals=0xfffffe00, locals=0xfffffe00)
at Python/ceval.c:493
#27 0x080df9dc in PyRun_InteractiveOneFlags (fp=0xfffffe00, filename=0x8116d6e "",
flags=0xbffa3688) at Python/pythonrun.c:1293 #28 0x080dfbd0 in PyRun_InteractiveLoopFlags (fp=0xb7f37240, filename=0x8116d6e "",
flags=0xbffa3688) at Python/pythonrun.c:723 #29 0x080e030b in PyRun_AnyFileExFlags (fp=0xb7f37240, filename=0x8116d6e "",
closeit=0, flags=0xbffa3688) at Python/pythonrun.c:692 #30 0x08056dad in Py_Main (argc=0, argv=0xbffa3724) at Modules/main.c:527 #31 0xb7e20ea2 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6 #32 0x08056251 in _start () at ../sysdeps/i386/elf/start.S:119 ----

I don't find this terribly enlightening, except it looks very much like a crash I was getting before with BABL (but that was seemingly fixed). #11 seems to be the place where things first start going wrong.
I'm also pretty sure that the bug lies in the pygegl module, as I've compiled and used many other modules for Python 2.6, with no problems, and I ran the babl and gegl tests successfully (and the gegl editor works okay too)
Does anyone know what may be going wrong here?

David Gowers
2007-07-15 16:57:42 UTC (over 17 years ago)

PyGEGL instant crash

Oh, and BTW: I noticed that the 'text' node does not allow you to enforce an antialiasing policy. This means, for example, that on my system the default gegl editor graph's 'GEGL' text is rendered with no antialiasing (unlike eg. GIMP, where AA is explicitly specified and behaves correctly in both cases.). Obviously this is not anything major, but it might warrant a FIXME comment in the source.

David Gowers
2007-09-24 03:06:52 UTC (about 17 years ago)

PyGEGL instant crash

On 7/23/07, Kevin Cozens wrote:

David Gowers wrote:

The what's new document for each release is a good resource for these kinds of problems, especially its porting section:

http://docs.python.org/whatsnew/porting.html

The last two items on that page seem to be the more likely candidates that could cause problems. I don't see any calls to *_Malloc() or *_Free(). There are a number of calls to g_free(). If any of them are being called on items that were not allocated by a glib routine that could be the cause of the crash.

That page has also made me aware of at least one change needed for 64-bit machines.

--
Cheers!

Kevin.

Was trying to investigate this further. It turns out that current SVN of pygegl will not compile:

gegl.override: In function '_wrap_gegl_node_render': gegl.override:332: error: incompatible type for argument 2 of 'gegl_node_blit' gegl.override:332: error: incompatible type for argument 3 of 'gegl_node_blit' gegl.override:332: warning: passing argument 6 of 'gegl_node_blit' makes integer from pointer without a cast gegl.override: In function 'pygegl_register_classes': gegl.override:139: warning: dereferencing type-punned pointer will break strict-aliasing rules

due to a change in the blitting api.

Tiny patch is attached to fix it. The crash I originally reported still happens; none of the g_free calls seem to be freeing anything other than glib allocated memory.