Hi I had xterm crash quite consistently after applying the i18n patch whenever not using -u8 and viewing a hebrew (iso-8859-8) character.
Only recently I have had the time to look into this. See the forwarded message below. I couldn't exactly figure out what is 'ltag' used for, as the code consists of huge funtions and is short of comments. I haven't recieved any reply from Robert Brady for this yet. The most annoying thing is that I can't find his original patch, as his site (http://www.susu.org.uk/~robertp/) seems unavailable. What I need to reproduce this is to run: LANG=he_IL.ISO-8859-8 xterm -fn heb6x13 and there run 'date' or whatever command to display a hebrew string (This assumes that the he_IL locale is installed) I don't get much more information from running it under gdb (e.g: whenever I get to drawXtermText I don't see anything in the backtrae, and I have no idea who are the callers. I tried enabling trace (I needed a trivial patch to fontutils.c: s/wfs/F(wfs)/ around line 710). Here is a trace: UTF-8 count 0, char 0000 input 29/29 bytes READ 05D0 0027 0020 05E0 05D5 05D1 0020 0020 0034 0020 0032 0032 003A 0035 0039 003A 0031 0033 0020 0049 0053 0054 0020 0032 0030 0030 0031 000D 000A WriteText ( 1, 0) (0) 27:\u+05D0' \u+05E0\u+05D5\u+05D1 4 22:59:13 IST 2001 ./charproc.c @5676, HideCursor calling drawXtermText cur(1,0) drawtext*[ 15, 17] (0) 1: ./charproc.c @3174, calling drawXtermText (0,1) xtermMissingChar 0x5d0 (row) DRAW_BOX(1488) cell 13x8 at 15,17-BAD xtermMissingChar 0x5e0 (row) drawtext [ 15, 25] (0) 2:' What is this BAD here? Thanks Tzafrir ---------- Forwarded message ---------- Date: Tue, 30 Oct 2001 00:42:20 +0200 (IST) From: Tzafrir Cohen <[EMAIL PROTECTED]> To: Robert Brady <[EMAIL PROTECTED]> Subject: xterm crash: ltag argument Hi I noticed that I can get xterm to crash quite consistently when not using -u8 -lc and displaying hebrew ISO-8859-8 text. Yesterday I finally had the time to look into this. It seems that there is a crash when trying to access the variable 'ltag' in drawXtermText . It seems that it recieved some garbage value. Then I looked at the your patch I saw that the definition of drawXtermText was modified (from 27.patch as modified by Pablo for Mandrake (as http://susu.org.uk/~robert/ seems to be unavailable now), in util.c) @@ -1431,13 +1466,27 @@ int x, int y, int chrset, - PAIRED_CHARS(Char *text, Char *text2), + TRI_CHARS(Char *text, Char *text2, Char *text3), +#if OPT_WIDE_CHARS + TRI_CHARS(Char *comb1l, Char *comb1h, Char *comb1p), + TRI_CHARS(Char *comb2l, Char *comb2h, Char *comb2p), +#endif + Char *ltag, Cardinal len, - int on_wide) + int on_wide +#if OPT_WIDE_CHARS + , wchar_t prior, + wchar_t after +#endif + ) but its usage was not modified accordingly: @@ -1567,15 +1621,31 @@ while (len--) { x = drawXtermText(screen, flags, gc2, x, y, 0, - PAIRED_CHARS(text++, text2++), - 1, on_wide); + TRI_CHARS(text++, text2++, text3 ++), +#if OPT_WIDE_CHARS + TRI_CHARS(NULL, NULL, NULL), + TRI_CHARS(NULL, NULL, NULL), +#endif + 1, on_wide +#if OPT_WIDE_CHARS +, 0, 0 +#endif +); x += FontWidth(screen); } } else { x = drawXtermText(screen, flags, gc2, x, y, 0, - PAIRED_CHARS(text, text2), - len, on_wide); + TRI_CHARS(text, text2, text3), +#if OPT_WIDE_CHARS + TRI_CHARS(NULL, NULL, NULL), + TRI_CHARS(NULL, NULL, NULL), +#endif + len, on_wide +#if OPT_WIDE_CHARS +, 0, 0 +#endif + ); x += len * FontWidth(screen); } That is: in both cases the 'ltag' argument was not added. drawXtermText is called in a number of other places, and it seems that in some of them this parameter is missing, whereas in others it is NULL or has another value. In charproc.c I see: __FILE__, __LINE__, screen->cur_col, screen->cur_row)); + + did_drawing = 1; + + /* We need to disable this in the case of bidi */ + drawXtermText(screen, flags, currentGC, CurCursorX(screen, screen->cur_row, screen->cur_ col), CursorY(screen, screen->cur_row), curXtermChrSet(screen->cur_row), - PAIRED_CHARS(str, str2), len, 0); - + TRI_CHARS(str, str2, str3), +#if OPT_WIDE_CHARS + TRI_CHARS(NULL, NULL, NULL), + TRI_CHARS(NULL, NULL, NULL), + NULL, +#endif + /* We know for certain there is no ZWNJ */ + len, 0 +#if OPT_WIDE_CHARS + , getXtermJoiner(screen, screen->cur_row, screen->cur_col+BIDI(1)), + getXtermCell(screen, screen->cur_row, scre en->cur_col-BIDI(len)) +#endif + ); resetXtermGC(screen, flags, False); That is, this time 'ltag' is inside #if OPT_WIDE_CHARS Am I reading this incorrectly? -- Tzafrir Cohen mailto:[EMAIL PROTECTED] http://www.technion.ac.il/~tzafrir _______________________________________________ I18n mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/i18n
