Hello again, everybody! :)

YAMAMOTO Mitsuharu's kind and timely help yesterday allowed me to get 
Emacs.app rc3 to build on GNUstep current.

Now, however, when I try to run 'build/Emacs.app/Emacs' from the 
'nextstep' directory after the build completes, we are getting a seg 
fault at line 6703 of xfaces.c.

FWIW, I *can* run 'build/Emacs.app/Emacs --no-windows', and 
everythings seems to be OK.

This time I ran gdb from the 'src' directory, so it could load the 
'.gdbinit' suggested by the Emacs devs.

Here is some of the resulting gdb output:

====================================================
~/GNUstep/Build/emacs-23.0.0_NS-9.0rc3/src$ gdb 
../nextstep/build/Emacs.app/Emacs
GNU gdb 6.3-debian

DISPLAY = :0.0
TERM = linux
Breakpoint 1 at 0x81391f4: file sysdep.c, line 1444.

(gdb) break xfaces.c:6703
Breakpoint 2 at 0x81149ab: file xfaces.c, line 6703.

(gdb) run
Starting program: 
/home/cjh/GNUstep/Build/emacs-23.0.0_NS-9.0rc3/nextstep/build/Emacs.app/Emacs 
-geometry 80x40+0+0
[Thread debugging using libthread_db enabled]
[New Thread -1223024512 (LWP 30047)]
[Switching to Thread -1223024512 (LWP 30047)]

Breakpoint 2, Fdisplay_supports_face_attributes_p 
(attributes=140908901, display=139122972)
     at xfaces.c:6703
6703      def_face = FACE_FROM_ID (f, DEFAULT_FACE_ID);

(gdb) info locals
attributes = 1
display = -1077660624
supports = 1
i = 1
frame = 0
def_face = (struct face *) 0x83ad51c
attrs = {138679945, 138679945, 138679945, 138679945, 138679945, 
138679633,
   138679945 <repeats 12 times>}

(gdb) p f
$1 = (struct frame *) 0x1

(gdb) cont
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x081149b4 in Fdisplay_supports_face_attributes_p 
(attributes=140908901, display=139122972)
     at xfaces.c:6703
6703      def_face = FACE_FROM_ID (f, DEFAULT_FACE_ID);

(gdb) bt full 3
#0  0x081149b4 in Fdisplay_supports_face_attributes_p 
(attributes=140908901, display=139122972)
     at xfaces.c:6703
         attributes = 0
         display = -1077660624
         supports = 0
         i = 0
         frame = 139122968
         def_face = (struct face *) 0x83ad51c
         attrs = {138679945, 138679945, 138679945, 138679945, 
138679945, 138679633,
   138679945 <repeats 12 times>}
#1  0x08197e24 in Ffuncall (nargs=3, args=0xbfc43530) at eval.c:3034
         fun = 139122968
         original_fun = -1077660624
         funcar = -1077660624
         numargs = 2
         lisp_numargs = 139122968
         val = 140908888
         backtrace = {
   next = 0xbfc43660,
   function = 0xbfc43530,
   args = 0xbfc43534,
   nargs = 2,
   evalargs = 0 '\0',
   debug_on_exit = 0 '\0'
}

(gdb) bt
#0  0x081149b4 in Fdisplay_supports_face_attributes_p 
(attributes=140908901, display=139122972)
     at xfaces.c:6703
#1  0x08197e24 in Ffuncall (nargs=3, args=0xbfac13b0) at eval.c:3034
#2  0x081c4228 in Fbyte_code (bytestr=136865075, vector=136865092, 
maxdepth=5) at bytecode.c:679
#3  0x0819826e in funcall_lambda (fun=136865028, nargs=2, 
arg_vector=0xbfac1534) at eval.c:3222
#4  0x08197cbd in Ffuncall (nargs=3, args=0xbfac1530) at eval.c:3088
#5  0x081c4228 in Fbyte_code (bytestr=136865331, vector=136865348, 
maxdepth=4) at bytecode.c:679
#6  0x0819826e in funcall_lambda (fun=136865276, nargs=2, 
arg_vector=0xbfac16a4) at eval.c:3222
#7  0x08197cbd in Ffuncall (nargs=3, args=0xbfac16a0) at eval.c:3088
#8  0x081c4228 in Fbyte_code (bytestr=136865635, vector=136865652, 
maxdepth=6) at bytecode.c:679
#9  0x0819826e in funcall_lambda (fun=136865572, nargs=3, 
arg_vector=0xbfac1824) at eval.c:3222
#10 0x08197cbd in Ffuncall (nargs=4, args=0xbfac1820) at eval.c:3088
#11 0x081c4228 in Fbyte_code (bytestr=136842019, vector=136842036, 
maxdepth=5) at bytecode.c:679
#12 0x0819826e in funcall_lambda (fun=136841948, nargs=5, 
arg_vector=0xbfac19a4) at eval.c:3222
#13 0x08197cbd in Ffuncall (nargs=6, args=0xbfac19a0) at eval.c:3088
#14 0x081c4228 in Fbyte_code (bytestr=145632179, vector=145637700, 
maxdepth=29) at bytecode.c:679
#15 0x08197068 in Feval (form=140909333) at eval.c:2367
#16 0x081ae8d3 in readevalloop (readcharfun=139121545, 
stream=0x8ad4468, sourcename=145584283,
     evalfun=0x8196c60 <Feval>, printflag=0, unibyte=138653505, 
readfun=138653505, start=138653505,
     end=138653505) at lread.c:1765
#17 0x081ad704 in Fload (file=145584123, noerror=138653505, 
nomessage=138653505,
     nosuffix=138653505, must_suffix=138653505) at lread.c:1226
#18 0x081970c7 in Feval (form=140869885) at eval.c:2375
#19 0x081ae8d3 in readevalloop (readcharfun=139121545, 
stream=0x860c468, sourcename=140541227,
     evalfun=0x8196c60 <Feval>, printflag=0, unibyte=138653505, 
readfun=138653505, start=138653505,
     end=138653505) at lread.c:1765
#20 0x081ad704 in Fload (file=140541035, noerror=138653505, 
nomessage=138653505,
     nosuffix=138653505, must_suffix=138653505) at lread.c:1226
#21 0x081970c7 in Feval (form=138637701) at eval.c:2375
#22 0x0811f334 in top_level_2 () at keyboard.c:1410
#23 0x08195b3c in internal_condition_case (bfun=0x811f310 
<top_level_2>, handlers=139036201,
     hfun=0x811eee0 <cmd_error>) at eval.c:1497
#24 0x0811f38a in top_level_1 () at keyboard.c:1418
#25 0x08195699 in internal_catch (tag=139031049, func=0x811f340 
<top_level_1>, arg=138653505)
     at eval.c:1233
#26 0x0811f26a in command_loop () at keyboard.c:1373
#27 0x0811ea97 in recursive_edit_1 () at keyboard.c:989
#28 0x0811ec3f in Frecursive_edit () at keyboard.c:1051
#29 0x0811cb94 in main (argc=3, argv=0xbfac2fa4) at emacs.c:1862

Lisp Backtrace:
"display-supports-face-attributes-p" (0xbfac13b4)
"face-spec-set-match-display" (0xbfac1534)
"face-spec-choose" (0xbfac16a4)
"face-spec-set" (0xbfac1824)
"custom-declare-face" (0xbfac19a4)
"byte-code" (0xbfac1af0)
"load" (0xbfac21d0)
"load" (0xbfac28b0)

(gdb)
=================================================


XFRAME macro is defined in 'src/frame.h' at line 492:


=================================================
#define XFRAME(p) (eassert (FRAMEP(p)),(struct frame *) XPNTR (p))
=================================================


FACE_FROM_ID macro is defined in 'src/dispextern.c' at line 1669:


=================================================
/* Return a pointer to the face with ID on frame F, or null if such a
    face doesn't exist.  */

#define FACE_FROM_ID(F, ID)                             \
      (((unsigned) (ID) < FRAME_FACE_CACHE (F)->used)   \
       ? FRAME_FACE_CACHE (F)->faces_by_id[ID]          \
       : NULL)
=================================================


Does this make any sense to anybody?

Chris Hall

P.S.  I tried to use the 'pr' command loaded by '.gdbinit' to print 
the 'Lisp_Object's 'frame' and 'attrs'.  Here is what happened:

=================================================
(gdb) info locals
attributes = 1
display = -1076949792
supports = 1
i = 1
frame = 0
def_face = (struct face *) 0x83ad51c
attrs = {138679945, 138679945, 138679945, 138679945, 138679945, 
138679633,
   138679945 <repeats 12 times>}

(gdb) p f
$1 = (struct frame *) 0x1

(gdb) pr frame

Program received signal SIGSEGV, Segmentation fault.
0x081a915d in print_object (obj=1, printcharfun=140421865, 
escapeflag=1) at print.c:1780
1780            register unsigned char *p = SDATA (SYMBOL_NAME (obj));
The program being debugged was signaled while in a function called 
from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on"
Evaluation of the expression containing the function (debug_print) 
will be abandoned.
(gdb)
=================================================



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Emacs-app-dev- mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emacs-app-dev-

Reply via email to