Ok, I've added the code necessary to do cleanup after widget destroy,
to make sure unneeded XIM's get freed.
However, as you can see below, doing the XCloseIM call crashes nedit,
not having the XCloseIM call doesn't crash nedit.
The first line in the new version of XmIm.c triggers the difference.
To reproduce :
- start nedit
- Control-O
- select a file by double-clicking
This'll crash in the destruction of the file selection box.
As the proof below says this is really a memory corruption,
we're not in XCloseIM any more.
Sigh. Any clues anyone ?
Danny
XmTextField FilterText: XmImRegister: InputMethodString '(null)'
XmTextField FilterText: XOpenIM -> 0x81ceb08
XmTextField FilterText: We have an IC
(null widget): XmImSetValues()
Arg[0] : background (not handled FIX ME)
Arg[1] : foreground (not handled FIX ME)
XmTextField Text: XmImRegister: InputMethodString '(null)'
XmTextField Text: XmImGetXIC: reuse XIM 0x81ceb08 (count 2)
XmTextField Text: XOpenIM -> 0x81ceb08
XmTextField Text: We have an IC
(null widget): XmImSetValues()
Arg[0] : background (not handled FIX ME)
Arg[1] : foreground (not handled FIX ME)
XmText statsLine: XmImSetFocusValues (no IC found)
XmText statsLine: XmImSetFocusValues (no IC found)
XmTextField Text: XmImUnregister is not implemented yet.
XmTextField Text: XmImCloseXIM(0x81ceb08), count -> 1
XmTextField FilterText: XmImUnregister is not implemented yet.
XmTextField FilterText: XCloseIM(0x81ceb08)
Program received signal SIGSEGV, Segmentation fault.
0x403853df in chunk_free () from /lib/libc.so.6
(gdb) where
#0 0x403853df in chunk_free () from /lib/libc.so.6
#1 0x40385253 in free () from /lib/libc.so.6
#2 0x401cb4c3 in XtFree () from /usr/X11R6/lib/libXt.so.6
#3 0x4012503b in _XmStringFree () from /usr/lesstif/lib/libXm.so.2
#4 0x400b1f48 in _XmListFreeItems () from /usr/lesstif/lib/libXm.so.2
#5 0x400b4d57 in destroy () from /usr/lesstif/lib/libXm.so.2
#6 0x401d3d90 in Phase2Destroy () from /usr/X11R6/lib/libXt.so.6
#7 0x401d3b9e in Recursive () from /usr/X11R6/lib/libXt.so.6
#8 0x401d3b52 in Recursive () from /usr/X11R6/lib/libXt.so.6
#9 0x401d3b52 in Recursive () from /usr/X11R6/lib/libXt.so.6
#10 0x401d40f9 in XtPhase2Destroy () from /usr/X11R6/lib/libXt.so.6
#11 0x401d41fd in _XtDoPhase2Destroy () from /usr/X11R6/lib/libXt.so.6
#12 0x401d8bba in XtDispatchEvent () from /usr/X11R6/lib/libXt.so.6
#13 0x401d8fd5 in XtAppMainLoop () from /usr/X11R6/lib/libXt.so.6
#14 0x804d95f in main ()
#15 0x4032fbaf in __libc_start_main () from /lib/libc.so.6
--
Danny Backx ([EMAIL PROTECTED] [EMAIL PROTECTED])
Home page : http://users.skynet.be/danny.backx
Projects: LessTif (http://www.lesstif.org)
Oleo (http://www.gnu.org/software/oleo/oleo.html)