Rui-Xiang Guo <[EMAIL PROTECTED]> writes:
> On Sun, Jan 27, 2002 at 01:29:48PM -0500, Owen Taylor wrote:
> >
> > Owen Taylor <[EMAIL PROTECTED]> writes:
> >
> > > Rui-Xiang Guo <[EMAIL PROTECTED]> writes:
> > >
> > > OK, I was able to reproduce it and figured out the immediate
> > > problem here:
> > >
> > > _XDynamicRegisterIMInstantiateCallback() dlopens 'ximcp.so'
> > > and calls _XimRegisterIMInstantiateCallback
> > >
> > > _XimRegisterIMInstantiateCallback() calls lcd->methods->open_im
> > > which is _XDynamicOpenIM()
> > >
> > > _XDynamicOpenIM() calls _XimOpenIM from ximcp.so, which fails,
> > > dlcloses ximcp.so and returns control to
> > > _XimRegisterInstantiateCallback() which is in a module that
> > > has been unloaded, so *boom*
> > >
> > > The solution here is presumably to add reference counting to
> > > dlopen/dlclose calls in XlcDL.c; at the same time, it would make
> > > sense to fix the problem that someone apparently never
> > > heard that cutting and pasting 30 lines of code over and
> > > over again was a bad idea...
> >
> > OK, here's an attempt at doing this.
> >
> > a) I've done little testing on it. Xcin no longer causes
> > a crash, with it. It's probably a bad idea to commit
> > this without someone giving it a good look over.
<>
> Hi, I have tested it with your patch. Yeah, nor more core dump!
> But... The xcin became unusable. I can't use it as XIM server to
> input chinese. X-)
> (NOTE: xcin would be run from XFree 4.1 to 4.2 without crash.)
> ps:
> I have read some reports about this problem, some Linux distributions
> also get pain with xcin after upgrading XFree to 4.2, includes FreeBSD.
> But Mandrake's users say they don't get this situation.
> Maybe we need some help form them. ;)
I believe the cause and effect was:
- xcin didn't work
- This cause untested code to be run which crashed.
So, the crash was a side effect of xcin not working; I looked
at it a bit and it didn't work with:
XMODIFIERS=@im=xcin
But it worked fine with:
XMODIFIERS=@im=xcin-zh_TW
(At least, I got a status window to pop up.)
If the previous used to work, it probably was because Xlib used to be
less strict about checking the IM server name; xcin doesn't seem to
support 'xcin' as a servername, just xcin-zh_TW and xcin-zh_CN.
Regards,
Owen
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert