Subject: Re: bug#38774: crash in image_pix_context_get_pixel

From: Eli Zaretskii <[email-masked]>
Date: Sat, 28 Dec 2019 19:20:21 +0200

> From: Madhu <[email-masked]>
> Date: Sat, 28 Dec 2019 19:57:06 +0530
> 
> Recent emacs configured with
> 
> configure -C --without-all --with-xml2 --with-dbus --with-m17n-flt
>  --with-libotf --with-xft --with-x-toolkit=athena
>  --with-toolkit-scroll-bars --with-xaw3d --with-cairo --with-harfbuzz
>  --with-png
> 
> crashes on startup.

Thanks.

Assuming that you sync with the Git repository from time to time, what
was the last development version that worked for you?  Was that
version configured the same?  Did you update your system's libraries
since the last time Emacs worked?

> Program received signal SIGSEGV, Segmentation fault.
> 0x00000000005bf574 in image_pix_context_get_pixel (y=<optimized out>, x=0, 
>     image=0xb3a210) at /7/gtk/emacs/src/image.c:183

Please show the contents of the 'image' argument, like this:

 (gdb) p *image

And btw, why are the arguments shown in reverse order?  The signature
of image_pix_context_get_pixel is this:

  image_pix_context_get_pixel (Emacs_Pix_Context image, int x, int y)

And also:

  #0  0x00000000005bf574 in image_pix_context_get_pixel (y=<optimized out>, 
      x=0, image=0xb3a210) at /7/gtk/emacs/src/image.c:183
  #1  image_pix_context_get_pixel (image=0xb3a210, x=0, y=<optimized out>)
      at /7/gtk/emacs/src/image.c:180

This claims that image_pix_context_get_pixel calls itself on line 180
of image.c, which is false.  I guess the optimized build makes the
backtrace corrupted.

Can you build Emacs without optimizations and show the backtrace in
that build?  (Assuming the crash doesn't disappear if you do that.)

> [BTW
> Composing main Info directory...done
> user-error: Info file emacs does not exist
> 	;; What nonsense! Of course it exists! in /7/gtk/emacs/info/emacs.info
> ]

Why did you assume Emacs will know to look in that directory?