#659 nedit crashes on double click when loading a file with FSB

development
open
nobody
Program (402)
5
2010-01-14
2010-01-14
No

Here is my version:
5.6 [Under Development] HEAD
Jan 14, 2010

Built on: Linux, 386, GNU C
Built at: Jan 14 2010, 12:05:06
With Motif: 2.3.0 [@(#)Motif Version 2.3.0]
Running Motif: 2.3 [unknown]
Server: The X.Org Foundation 10502000
Visual: 24-bit TrueColor (ID 0x21, Default)
Locale: en_US.UTF-8

Both Nedit and OpenMotif 2.3 are build from latest CVS sources (December 2009).

I also compiled it with debug flags, and I can't reproduce the bug with ddd, mabe because it is a timing bug and it runs slower in ddd.
I can reproduce the bug while running nedit with intel debugger (idb), but I only get:
Starting program: /home/dusan/src/nedit/source/nedit
(idb)
Program received signal SIGSEGV
(idb) XtWidgetToApplicationContext () in /usr/lib/libXt.so.6.0.0

I also ran it with valgrind, which is a little more informative:

==12899== Memcheck, a memory error detector.
==12899== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==12899== Using LibVEX rev 1854, a library for dynamic binary translation.
==12899== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==12899== Using valgrind-3.3.1, a dynamic binary instrumentation framework.
==12899== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==12899== For more details, rerun with: -v
==12899==
==12899== Conditional jump or move depends on uninitialised value(s)
==12899== at 0x44C8F23: mblen (in /lib/libc-2.9.so)
==12899== by 0x4148DC8: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x412FAD7: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x412FC31: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x412FE55: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x4132DFE: _XmTextEnableRedisplay (in /usr/lib/libXm.so.4.0.1)
==12899== by 0x4152AD2: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x41D09FC: _XmTextReplace (in /usr/lib/libXm.so.4.0.1)
==12899== by 0x41D0CFA: XmTextReplace (in /usr/lib/libXm.so.4.0.1)
==12899== by 0x8061ED1: UpdateStatsLine (window.c:2758)
==12899== by 0x8053ECC: EditNewFile (file.c:155)
==12899== by 0x805077D: main (nedit.c:780)
==12899==
==12899== Conditional jump or move depends on uninitialised value(s)
==12899== at 0x44C8F23: mblen (in /lib/libc-2.9.so)
==12899== by 0x4149114: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x412FAD7: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x412FC31: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x412FE55: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x4132DFE: _XmTextEnableRedisplay (in /usr/lib/libXm.so.4.0.1)
==12899== by 0x4152AD2: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x41D09FC: _XmTextReplace (in /usr/lib/libXm.so.4.0.1)
==12899== by 0x41D0CFA: XmTextReplace (in /usr/lib/libXm.so.4.0.1)
==12899== by 0x8061ED1: UpdateStatsLine (window.c:2758)
==12899== by 0x8053ECC: EditNewFile (file.c:155)
==12899== by 0x805077D: main (nedit.c:780)
==12899==
==12899== Conditional jump or move depends on uninitialised value(s)
==12899== at 0x41C4EF7: _XmXftDrawCreate (in /usr/lib/libXm.so.4.0.1)
==12899== by 0x41C5063: _XmXftSetClipRectangles (in /usr/lib/libXm.so.4.0.1)
==12899== by 0x40E86FB: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x40E8C46: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x40EAF7F: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x40F009D: XmListReplaceItemsPos (in /usr/lib/libXm.so.4.0.1)
==12899== by 0x80D716F: sortWidgetList (getfiles.c:1120)
==12899== by 0x80D7646: replacementFileSearchProc (getfiles.c:1100)
==12899== by 0x40CCFC6: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x40CE82C: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x4316E41: (within /usr/lib/libXt.so.6.0.0)
==12899== by 0x4317219: XtSetValues (in /usr/lib/libXt.so.6.0.0)
==12899==
==12899== Conditional jump or move depends on uninitialised value(s)
==12899== at 0x41C4F91: _XmXftDrawCreate (in /usr/lib/libXm.so.4.0.1)
==12899== by 0x41C5063: _XmXftSetClipRectangles (in /usr/lib/libXm.so.4.0.1)
==12899== by 0x40E86FB: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x40E8C46: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x40EAF7F: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x40F009D: XmListReplaceItemsPos (in /usr/lib/libXm.so.4.0.1)
==12899== by 0x80D716F: sortWidgetList (getfiles.c:1120)
==12899== by 0x80D7646: replacementFileSearchProc (getfiles.c:1100)
==12899== by 0x40CCFC6: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x40CE82C: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x4316E41: (within /usr/lib/libXt.so.6.0.0)
==12899== by 0x4317219: XtSetValues (in /usr/lib/libXt.so.6.0.0)
==12899==
==12899== Conditional jump or move depends on uninitialised value(s)
==12899== at 0x44C8F23: mblen (in /lib/libc-2.9.so)
==12899== by 0x4142F4B: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x4143104: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x414A7CF: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x412E82C: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x42FE9C2: (within /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FEEFD: XtDispatchEventToWidget (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FF5E4: (within /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FE526: XtDispatchEvent (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x430BDE0: XtAppProcessEvent (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x80D7C88: HandleCustomExistFileSB (getfiles.c:416)
==12899== by 0x80D802E: GetExistingFilename (getfiles.c:317)
==12899==
==12899== Conditional jump or move depends on uninitialised value(s)
==12899== at 0x44C8F23: mblen (in /lib/libc-2.9.so)
==12899== by 0x4142F4B: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x41430EE: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x414A7CF: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x412E82C: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x42FE9C2: (within /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FEEFD: XtDispatchEventToWidget (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FF5E4: (within /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FE526: XtDispatchEvent (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x430BDE0: XtAppProcessEvent (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x80D7C88: HandleCustomExistFileSB (getfiles.c:416)
==12899== by 0x80D802E: GetExistingFilename (getfiles.c:317)

==12899==
==12899== Invalid read of size 4
==12899== at 0x42FAECA: XtWidgetToApplicationContext (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FA70E: XtDestroyWidget (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x41A5C39: _XmImFreeShellData (in /usr/lib/libXm.so.4.0.1)
==12899== by 0x41ADB70: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x42FA8E9: (within /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FA2B3: (within /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FA41A: (within /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FA6CA: _XtDoPhase2Destroy (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FE5E6: XtDispatchEvent (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FE6EB: XtAppMainLoop (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x80507FA: main (nedit.c:798)
==12899== Address 0x4e6fda4 is 4 bytes inside a block of size 116 free'd
==12899== at 0x4026BFA: free (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==12899== by 0x42EFF40: XtFree (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FA98D: (within /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FA2B3: (within /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FA278: (within /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FA41A: (within /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FA6CA: _XtDoPhase2Destroy (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FE5E6: XtDispatchEvent (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FE6EB: XtAppMainLoop (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x80507FA: main (nedit.c:798)
==12899==
==12899== Invalid read of size 4
==12899== at 0x42FAED3: XtWidgetToApplicationContext (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FA70E: XtDestroyWidget (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x41A5C39: _XmImFreeShellData (in /usr/lib/libXm.so.4.0.1)
==12899== by 0x41ADB70: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x42FA8E9: (within /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FA2B3: (within /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FA41A: (within /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FA6CA: _XtDoPhase2Destroy (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FE5E6: XtDispatchEvent (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FE6EB: XtAppMainLoop (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x80507FA: main (nedit.c:798)
==12899== Address 0x4e6fdf8 is 88 bytes inside a block of size 116 free'd
==12899== at 0x4026BFA: free (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==12899== by 0x42EFF40: XtFree (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FA98D: (within /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FA2B3: (within /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FA278: (within /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FA41A: (within /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FA6CA: _XtDoPhase2Destroy (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FE5E6: XtDispatchEvent (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FE6EB: XtAppMainLoop (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x80507FA: main (nedit.c:798)
==12899==
==12899== Invalid read of size 1
==12899== at 0x42FA727: XtDestroyWidget (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x41A5C39: _XmImFreeShellData (in /usr/lib/libXm.so.4.0.1)
==12899== by 0x41ADB70: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x42FA8E9: (within /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FA2B3: (within /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FA41A: (within /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FA6CA: _XtDoPhase2Destroy (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FE5E6: XtDispatchEvent (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FE6EB: XtAppMainLoop (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x80507FA: main (nedit.c:798)
==12899== Address 0x4e6fdb0 is 16 bytes inside a block of size 116 free'd
==12899== at 0x4026BFA: free (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==12899== by 0x42EFF40: XtFree (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FA98D: (within /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FA2B3: (within /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FA278: (within /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FA41A: (within /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FA6CA: _XtDoPhase2Destroy (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FE5E6: XtDispatchEvent (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x42FE6EB: XtAppMainLoop (in /usr/lib/libXt.so.6.0.0)
==12899== by 0x80507FA: main (nedit.c:798)
==12899==
==12899== Conditional jump or move depends on uninitialised value(s)
==12899== at 0x41C4EF7: _XmXftDrawCreate (in /usr/lib/libXm.so.4.0.1)
==12899== by 0x41C5063: _XmXftSetClipRectangles (in /usr/lib/libXm.so.4.0.1)
==12899== by 0x40E86FB: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x40E8E84: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x40F3532: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x40F36C4: XmListSelectPos (in /usr/lib/libXm.so.4.0.1)
==12899== by 0x40CA8AA: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x80D7666: replacementDirSearchProc (getfiles.c:1076)
==12899== by 0x40CCE0F: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x40CE82C: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x4316E41: (within /usr/lib/libXt.so.6.0.0)
==12899== by 0x4317219: XtSetValues (in /usr/lib/libXt.so.6.0.0)
==12899==
==12899== Conditional jump or move depends on uninitialised value(s)
==12899== at 0x41C4F91: _XmXftDrawCreate (in /usr/lib/libXm.so.4.0.1)
==12899== by 0x41C5063: _XmXftSetClipRectangles (in /usr/lib/libXm.so.4.0.1)
==12899== by 0x40E86FB: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x40E8E84: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x40F3532: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x40F36C4: XmListSelectPos (in /usr/lib/libXm.so.4.0.1)
==12899== by 0x40CA8AA: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x80D7666: replacementDirSearchProc (getfiles.c:1076)
==12899== by 0x40CCE0F: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x40CE82C: (within /usr/lib/libXm.so.4.0.1)
==12899== by 0x4316E41: (within /usr/lib/libXt.so.6.0.0)
==12899== by 0x4317219: XtSetValues (in /usr/lib/libXt.so.6.0.0)

I see in the bug is somewhere in getfiles.c, which plays some tricks on FSB and tries to avoid some motif bug in widget destruction.
Maybe this Motif bug was corrected in the latest OpenMotif, and this in turn breaks the nedit?

I have other motif programs, which use FSB in a more tradiitional way (without any advanced hacks) and it works OK on those other programs.

Any hints or ideas how to fix this?
Please, no OpenMotif vs. LessTiff flames.

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks