Martin Simmons wrote:
> >>>>> On Tue, 11 Jul 2006 10:48:07 +1000, raf said:
> >
> > Danny Backx wrote:
> >
> > > I just downloaded vim 7.0 and compiled it against my LessTif sources.
> > >
> > > I don't see a problem when running e.g.
> > > vim -g /etc/passwd
> > > In which way does it crash for you, do you have a backtrace from a
> > > debugger ?
> > >
> > > Danny
> >
> > it crashes before the window appears.
> >
> > i have two backtraces: one from vim's test16 and one from
> > just starting vim in gui mode with no file. here they are.
>
> The backtraces are too minimal to be useful. I think you'll need to:
>
> 1. Build a version of libXm with debugging mode (configure --enable-debug).
> That should make gdb show function arguments.
>
> 2. Run the crashing vim under gdb directly, rather than letting it dump core.
> The problem is that vim's signal handler is obscuring the real location of
> the crash.
>
> __Martin
hi. sorry about the delay.
i've done this but i'm not familiar with running programs
inside gdb and what i saw looked useless so i don't think i
did it correctly. it just contained the last function in the
trace before vim's signal handler takes over (as seen when
run outside of gdb) so it's probably just the signal handler
itself with no reference to the preceding stack. what did i
do wrong?
i've included the previously mentioned stack traces using a
lesstif that was configured with --enable-debug as well as
the useless trace from when running vim inside gdb. they
are at the end of this message.
it seems in both cases, it crashed at Primitive.c:1443
which makes me think that (*extptr)->widget_baseline,
while non-zero, might have been corrupted earlier?
using the core dumps, i printed all of the values mentioned
on the line of code where it crashed:
(gdb) up
#7 0x28130805 in XmWidgetGetBaselines (w=0x82403d8, baselines=0x77ace888,
line_count=0x77ace884)
at Primitive.c:1443
1443 return ((*extptr)->widget_baseline) (w, baselines,
line_count);
(gdb) print extptr
$1 = (XmPrimitiveClassExt *) 0x81c076c
(gdb) print *extptr
$2 = (XmPrimitiveClassExt) 0x823a6f8
(gdb) print (*extptr)->widget_baseline
$3 = (XmWidgetBaselineProc) 0x4741545f
(gdb) print w
$4 = (Widget) 0x82403d8
(gdb) print baselines
$5 = (Dimension **) 0x77ace888
(gdb) print line_count
$6 = (int *) 0x77ace884
(gdb) print *baselines
$7 = (Dimension *) 0x77ace8c8
(gdb) print **baselines
$8 = 59656
(gdb) print *line_count
$9 = 675194796
does any of this look wrong?
cheers,
raf
$ CCFLAGS=-g ./configure \
--with-x \
--enable-gui=motif \
--enable-max-features \
--enable-multibyte
$ make
$ make test
...
../vim -u unix.vim -U NONE --noplugin -s dotest.in test16.in
Vim: Caught deadly signal SEGV
Vim: Finished.
make[2]: *** [test16.out] Segmentation fault (core dumped)
rm -rf X* test.ok viminfo
Test results:
test16 NO OUTPUT
ALL DONE
make[2]: Leaving directory `/usr/local/src/gui/vim70/src/testdir'
make[1]: Leaving directory `/usr/local/src/gui/vim70/src'
raf:eccles:vim70> gdb src/vim src/testdir/core
GNU gdb 6.4-debian
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...Using host libthread_db library
"/lib/tls/i686/cmov/libthread_db.so.1".
Core was generated by `../vim -u unix.vim -U NONE --noplugin -s dotest.in
test16.in'.
Program terminated with signal 11, Segmentation fault.
warning: Can't read pathname for load map: Input/output error.
Reading symbols from /usr/lib/libXmu.so.6...done.
Loaded symbols for /usr/lib/libXmu.so.6
Reading symbols from /usr/lib/libXext.so.6...done.
Loaded symbols for /usr/lib/libXext.so.6
Reading symbols from /usr/local/lib/libXm.so.2...done.
Loaded symbols for /usr/local/lib/libXm.so.2
Reading symbols from /usr/lib/libncurses.so.5...done.
Loaded symbols for /usr/lib/libncurses.so.5
Reading symbols from /lib/libacl.so.1...done.
Loaded symbols for /lib/libacl.so.1
Reading symbols from /usr/lib/libgpm.so.1...done.
Loaded symbols for /usr/lib/libgpm.so.1
Reading symbols from /lib/tls/i686/cmov/libc.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /usr/lib/libXt.so.6...done.
Loaded symbols for /usr/lib/libXt.so.6
Reading symbols from /usr/lib/libX11.so.6...done.
Loaded symbols for /usr/lib/libX11.so.6
Reading symbols from /usr/lib/libSM.so.6...done.
Loaded symbols for /usr/lib/libSM.so.6
Reading symbols from /usr/lib/libICE.so.6...done.
Loaded symbols for /usr/lib/libICE.so.6
Reading symbols from /lib/tls/i686/cmov/libdl.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libdl.so.2
Reading symbols from /usr/lib/libXau.so.6...done.
Loaded symbols for /usr/lib/libXau.so.6
Reading symbols from /usr/lib/libXp.so.6...done.
Loaded symbols for /usr/lib/libXp.so.6
Reading symbols from /usr/lib/libfreetype.so.6...done.
Loaded symbols for /usr/lib/libfreetype.so.6
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /lib/libattr.so.1...done.
Loaded symbols for /lib/libattr.so.1
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/lib/libXcursor.so.1...done.
Loaded symbols for /usr/lib/libXcursor.so.1
Reading symbols from /usr/lib/libXrender.so.1...done.
Loaded symbols for /usr/lib/libXrender.so.1
Reading symbols from /usr/lib/libXfixes.so.3...done.
Loaded symbols for /usr/lib/libXfixes.so.3
Reading symbols from /lib/tls/i686/cmov/libnss_compat.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libnss_compat.so.2
Reading symbols from /lib/tls/i686/cmov/libnsl.so.1...done.
Loaded symbols for /lib/tls/i686/cmov/libnsl.so.1
Reading symbols from /lib/tls/i686/cmov/libnss_nis.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libnss_nis.so.2
Reading symbols from /lib/tls/i686/cmov/libnss_files.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libnss_files.so.2
#0 0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0 0xffffe410 in __kernel_vsyscall ()
#1 0x28298df6 in kill () from /lib/tls/i686/cmov/libc.so.6
#2 0x081139c3 in may_core_dump () at os_unix.c:2900
#3 0x08118e7b in mch_exit (r=1) at os_unix.c:2865
#4 0x080e6142 in preserve_exit () at misc1.c:8263
#5 <signal handler called>
#6 0x4741545f in ?? ()
#7 0x28130805 in XmWidgetGetBaselines (w=0x82403d8, baselines=0x77ace888,
line_count=0x77ace884) at Primitive.c:1443
#8 0x2814caee in constraint_initialize (request=0x77ace948, new_w=0x82403d8,
args=0x77acedec, num_args=0x77ace914) at RowColumn.c:2865
#9 0x280b3f83 in InitializeLeafWrapper (request=0x77ace948, new_w=0x82403d8,
args=0x77acedec, num_args=0x77ace914) at BaseClass.c:1512
#10 0x283b4745 in XtInitializeWidgetClass () from /usr/lib/libXt.so.6
#11 0x283b4bdc in XtInitializeWidgetClass () from /usr/lib/libXt.so.6
#12 0x283b4f99 in _XtCreateWidget () from /usr/lib/libXt.so.6
#13 0x283b52b5 in XtCreateManagedWidget () from /usr/lib/libXt.so.6
#14 0x08181990 in gui_mch_add_menu_item (menu=0x8227988, idx=0)
at gui_motif.c:1380
#15 0x080d65c8 in gui_create_initial_menus (menu=0x8227988) at menu.c:1779
#16 0x080d65ab in gui_create_initial_menus (menu=0x82278f0) at menu.c:1776
#17 0x0817b53d in gui_init () at gui.c:507
#18 0x081696a5 in set_termname (term=0x81dca48 "gui") at term.c:1844
#19 0x0817c938 in gui_start () at gui.c:91
#20 0x0817cb4c in ex_gui (eap=0x77acf8a4) at gui.c:4694
#21 0x0809ae15 in do_one_cmd (cmdlinep=0x77acfd28, sourcing=0,
cstack=0x77acf9f8, getline=0x80a86b9 <getexline>, cookie=0x0)
at ex_docmd.c:2609
#22 0x0809bde7 in do_cmdline (cmdline=0x0, getline=0x80a86b9 <getexline>,
cookie=0x0, flags=<value optimized out>) at ex_docmd.c:1095
#23 0x080f95ff in nv_colon (cap=0x77acfda8) at normal.c:5149
#24 0x080fce55 in normal_cmd (oap=0x77acfe0c, toplevel=1) at normal.c:1137
#25 0x080c5064 in main_loop (cmdwin=0, noexmode=0) at main.c:1144
#26 0x080c8bff in main (argc=136578008, argv=0x77ad0004) at main.c:934
$ src/vim -g -u NONE -U NONE
Vim: Caught deadly signal SEGV
Vim: Finished.
zsh: 8263 segmentation fault (core dumped) src/vim -g -u NONE -U NONE
$ gdb src/vim src/testdir/core
GNU gdb 6.4-debian
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...Using host libthread_db library
"/lib/tls/i686/cmov/libthread_db.so.1".
Core was generated by `../vim -u unix.vim -U NONE --noplugin -s dotest.in
test16.in'.
Program terminated with signal 11, Segmentation fault.
warning: Can't read pathname for load map: Input/output error.
Reading symbols from /usr/lib/libXmu.so.6...done.
Loaded symbols for /usr/lib/libXmu.so.6
Reading symbols from /usr/lib/libXext.so.6...done.
Loaded symbols for /usr/lib/libXext.so.6
Reading symbols from /usr/local/lib/libXm.so.2...done.
Loaded symbols for /usr/local/lib/libXm.so.2
Reading symbols from /usr/lib/libncurses.so.5...done.
Loaded symbols for /usr/lib/libncurses.so.5
Reading symbols from /lib/libacl.so.1...done.
Loaded symbols for /lib/libacl.so.1
Reading symbols from /usr/lib/libgpm.so.1...done.
Loaded symbols for /usr/lib/libgpm.so.1
Reading symbols from /lib/tls/i686/cmov/libc.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /usr/lib/libXt.so.6...done.
Loaded symbols for /usr/lib/libXt.so.6
Reading symbols from /usr/lib/libX11.so.6...done.
Loaded symbols for /usr/lib/libX11.so.6
Reading symbols from /usr/lib/libSM.so.6...done.
Loaded symbols for /usr/lib/libSM.so.6
Reading symbols from /usr/lib/libICE.so.6...done.
Loaded symbols for /usr/lib/libICE.so.6
Reading symbols from /lib/tls/i686/cmov/libdl.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libdl.so.2
Reading symbols from /usr/lib/libXau.so.6...done.
Loaded symbols for /usr/lib/libXau.so.6
Reading symbols from /usr/lib/libXp.so.6...done.
Loaded symbols for /usr/lib/libXp.so.6
Reading symbols from /usr/lib/libfreetype.so.6...done.
Loaded symbols for /usr/lib/libfreetype.so.6
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /lib/libattr.so.1...done.
Loaded symbols for /lib/libattr.so.1
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/lib/libXcursor.so.1...done.
Loaded symbols for /usr/lib/libXcursor.so.1
Reading symbols from /usr/lib/libXrender.so.1...done.
Loaded symbols for /usr/lib/libXrender.so.1
Reading symbols from /usr/lib/libXfixes.so.3...done.
Loaded symbols for /usr/lib/libXfixes.so.3
Reading symbols from /lib/tls/i686/cmov/libnss_compat.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libnss_compat.so.2
Reading symbols from /lib/tls/i686/cmov/libnsl.so.1...done.
Loaded symbols for /lib/tls/i686/cmov/libnsl.so.1
Reading symbols from /lib/tls/i686/cmov/libnss_nis.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libnss_nis.so.2
Reading symbols from /lib/tls/i686/cmov/libnss_files.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libnss_files.so.2
#0 0xffffe410 in __kernel_vsyscall ()
#0 0xffffe410 in __kernel_vsyscall ()
#1 0x28298df6 in kill () from /lib/tls/i686/cmov/libc.so.6
#2 0x081139c3 in may_core_dump () at os_unix.c:2900
#3 0x08118e7b in mch_exit (r=1) at os_unix.c:2865
#4 0x080e6142 in preserve_exit () at misc1.c:8263
#5 <signal handler called>
#6 0x4741545f in ?? ()
#7 0x28130805 in XmWidgetGetBaselines (w=0x82403d8, baselines=0x77ace888,
line_count=0x77ace884) at Primitive.c:1443
#8 0x2814caee in constraint_initialize (request=0x77ace948, new_w=0x82403d8,
args=0x77acedec, num_args=0x77ace914) at RowColumn.c:2865
#9 0x280b3f83 in InitializeLeafWrapper (request=0x77ace948, new_w=0x82403d8,
args=0x77acedec, num_args=0x77ace914) at BaseClass.c:1512
#10 0x283b4745 in XtInitializeWidgetClass () from /usr/lib/libXt.so.6
#11 0x283b4bdc in XtInitializeWidgetClass () from /usr/lib/libXt.so.6
#12 0x283b4f99 in _XtCreateWidget () from /usr/lib/libXt.so.6
#13 0x283b52b5 in XtCreateManagedWidget () from /usr/lib/libXt.so.6
#14 0x08181990 in gui_mch_add_menu_item (menu=0x8227988, idx=0)
at gui_motif.c:1380
#15 0x080d65c8 in gui_create_initial_menus (menu=0x8227988) at menu.c:1779
#16 0x080d65ab in gui_create_initial_menus (menu=0x82278f0) at menu.c:1776
#17 0x0817b53d in gui_init () at gui.c:507
#18 0x081696a5 in set_termname (term=0x81dca48 "gui") at term.c:1844
#19 0x0817c938 in gui_start () at gui.c:91
#20 0x0817cb4c in ex_gui (eap=0x77acf8a4) at gui.c:4694
#21 0x0809ae15 in do_one_cmd (cmdlinep=0x77acfd28, sourcing=0,
cstack=0x77acf9f8, getline=0x80a86b9 <getexline>, cookie=0x0)
at ex_docmd.c:2609
#22 0x0809bde7 in do_cmdline (cmdline=0x0, getline=0x80a86b9 <getexline>,
cookie=0x0, flags=<value optimized out>) at ex_docmd.c:1095
#23 0x080f95ff in nv_colon (cap=0x77acfda8) at normal.c:5149
#24 0x080fce55 in normal_cmd (oap=0x77acfe0c, toplevel=1) at normal.c:1137
#25 0x080c5064 in main_loop (cmdwin=0, noexmode=0) at main.c:1144
#26 0x080c8bff in main (argc=136578008, argv=0x77ad0004) at main.c:934
$ gdb
GNU gdb 6.4-debian
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
(gdb) exec-file src/vim
(gdb) run -g -u NONE -U NONE
Starting program: /usr/local/src/gui/vim70/src/vim -g -u NONE -U NONE
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
Program received signal SIGSEGV, Segmentation fault.
0x4741545f in ?? ()
(gdb) bt
#0 0x4741545f in ?? ()
(gdb)
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Lesstif-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lesstif-discuss