#251 seg-fault when saving prefernces

development
closed-fixed
nobody
5
2003-04-10
2003-04-07
No

I am getting in-consistent crashes with source grabbed
from CVS at about 5pm Apr 05, 2003 US Eastern Time. The
crash happens with no file loaded, no settings changed
and when invoking save preferences. I have not tried
any other combination.

I tried poking in the source and found that when
RangesetTableUpdatePos is called, buf->rangesetTable
should have been a NULL pointer, but it is not. I was
able to find the place where it was set to NULL, but
could not find any place where this pointer could have
been set to something else. After several debug
attempts, I got the seg-fault not when forming the
hightlight string (backtrace below), but when forming
the language modes string. After some more debug
attempts, I can't make the seg-fault happen anymore. Oh
well. A bunch of useful info is below.

Thanks for a wonderful editor.
Vinod
----------------------------------------------------
VERSION_STRING :

NEdit release of Mar 14, 2003

Built on: Linux, 386, GNU C
Built at: Apr 6 2003, 17:27:35
With Motif: 2.1.30 [@(#)Motif Version 2.1.30]
Running Motif: 2.1 [unknown]
Server: Mandrake Linux (XFree86 4.2.1, patch
level 3mdk) 40201000
Visual: 24-bit TrueColor (ID 0x23, Default)
Locale: en_US

SEG_FAULT_LINE_IN_SOURCE :

#0 0x080b077e in RangesetTableUpdatePos (tab=0x2900,
pos=0, ins=3, del=0) at rangeset.c:987
987 for (i = 0; i < tab->n_set; i++) {

BACKTRACE :

(gdb) backtrace
#0 0x080b077e in RangesetTableUpdatePos (tab=0x2900,
pos=0, ins=3, del=0) at rangeset.c:987
#1 0x080b07cc in RangesetBufModifiedCB (pos=0,
nInserted=3, nDeleted=0, nRestyled=0, deletedText=0x0,
cbArg=0x8420010) at rangeset.c:1001
#2 0x08098103 in callModifyCBs (buf=0x8420010, pos=0,
nDeleted=0, nInserted=3, nRestyled=0, deletedText=0x0)
at textBuf.c:2063
#3 0x08095cc3 in BufInsert (buf=0x8420010, pos=0,
text=0x8356348 "Ada") at textBuf.c:324
#4 0x0809db34 in WriteHighlightString () at
highlightData.c:1162
#5 0x0806cbea in SaveNEditPrefs (parent=0x838c138,
quietly=0) at preferences.c:1285
#6 0x08058383 in savePrefCB (w=0x83f0c08,
window=0x8420010, callData=0x8420010 "\003") at menu.c:2308
#7 0x4005742e in XtCallCallbackList () from
/usr/X11R6/lib/libXt.so.6
#8 0x080f3487 in BtnUp ()
#9 0x40094e57 in XtOverrideTranslations () from
/usr/X11R6/lib/libXt.so.6
#10 0x40093fba in XtOverrideTranslations () from
/usr/X11R6/lib/libXt.so.6
#11 0x40093083 in _XtTranslateEvent () from
/usr/X11R6/lib/libXt.so.6
#12 0x400647f4 in XtDispatchEventToWidget () from
/usr/X11R6/lib/libXt.so.6
#13 0x40067068 in _XtExtensionSelect () from
/usr/X11R6/lib/libXt.so.6
#14 0x40064f3f in XtDispatchEvent () from
/usr/X11R6/lib/libXt.so.6
#15 0x40065ea4 in XtAppMainLoop () from
/usr/X11R6/lib/libXt.so.6
#16 0x0805165a in main (argc=2, argv=0xbffff804) at
nedit.c:569
#17 0x401ca082 in __libc_start_main () from
/lib/i686/libc.so.6

Discussion

  • Vinodh Cuppu

    Vinodh Cuppu - 2003-04-07

    Logged In: YES
    user_id=730969

    That should be Apr 06, not Apr 05. Sorry about that.

     
  • Eddy De Greef

    Eddy De Greef - 2003-04-07

    Logged In: YES
    user_id=73597

    I cannot reproduce this crash nor can I explain this stack
    trace with the current CVS sources.
    Possibly, you are linking with object files that are out of
    data (have you tried make clean first ?). Otherwise, your
    source files don't match the current CVS sources (mistake
    during merging?). The buf->rangesetTable pointer is set to
    NULL at line 177 of textBuf.c.

     
  • Eddy De Greef

    Eddy De Greef - 2003-04-07
    • labels: --> 355502
     
  • Vinodh Cuppu

    Vinodh Cuppu - 2003-04-10

    Logged In: YES
    user_id=730969

    Thanks for the pointer.

    My coredumps were caused by rangeset.c not getting
    recompiled after a change to the textBuffer structure in
    textBuf.h. The dependencies of rangeset.c is missing from
    Makefile.depedencies.

     
  • Eddy De Greef

    Eddy De Greef - 2003-04-10

    Logged In: YES
    user_id=73597

    I've regenerated the dependencies. They were out of date indeed.

     
  • Eddy De Greef

    Eddy De Greef - 2003-04-10
    • labels: 355502 --> Build/Install
    • status: open --> closed-fixed
     

Log in to post a comment.