On Thu, Dec 29, 2016 at 01:17:48AM +0100, Øyvind Kolås wrote: > On Wed, Dec 28, 2016 at 11:34 PM, Vincent > <debian-si...@free-astro.vinvin.tf> wrote: > > gegl_buffer_set(buf, &_rect, 1, format, image_buffer, > > GEGL_AUTO_ROWSTRIDE); > > > The problem is that all I get from this code is segfaults. What did I > > miss? Isn't gegl-gtk supposed to display the image data given by the > > output port of a node? Is something required to transform the gegl > > buffer data to a format that the gegl-gtk widget can understand? > > Without a downloadable buildable code example it is hard to diagnose > what is going wrong, based on reading the provided source there is at > least one other thing going wrong. You should be providing 0 as the > mipmap level/third argument of gegl_buffer_set, if writing directly to > mipmap level 1, display at scales <50% zoom will only read empty > pixels. The side effect of this would be nothing displayed though; not > segfaults. > > /pippin
Thank you both for your answers. I finally made a sample application that reads a FITS file and tries to display the first channel's grey buffer in a gegl-gtk object. The code is here: https://free-astro.org/svn/siril/trunk/src/main_gegl_test.c you may also checkout trunk/deps/gegl-gtk. Compilation instructions are given at the top of the file, dependencies are GTK3, GEGL, gegl-gtk and cfitsio. A sample file is available here: https://free-astro.org/download/scott.fit Stack trace for SIGSEV (sorry I don't have all symbols it has too many dependencies to rebuild shortly): #0 0x00007ffff43a6e1e in __memmove_sse2_unaligned_erms () at /usr/lib/libc.so.6 #1 0x00007ffff617b1a1 in gegl_buffer_set () at /usr/lib/libgegl-0.3.so.0 #2 0x000000000040354a in main (argc=2, argv=0x7fffffffe9b8) at main_gegl_test.c:84 Any ideas? Is there actually a copy of the buffer into GEGL's memory in this function? I would have hoped we could avoid that, to have better performances. Thank you Vincent _______________________________________________ gegl-developer-list mailing list List address: gegl-developer-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gegl-developer-list