Closed
Bug 184599
Opened 22 years ago
Closed 21 years ago
[gtk2] moz+gtk2 crashes with --enable-ctl
Categories
(Core :: Internationalization, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: iamawalrus, Assigned: Louie.Zhao)
References
Details
(Keywords: crash, Whiteboard: review+)
Attachments
(1 file)
73.48 KB,
patch
|
Louie.Zhao
:
review+
|
Details | Diff | Splinter Review |
1. build mozilla with --enable-default-toolkit=gtk2 --enable-ctl 2. launch the mozilla 3. type some words in the url bar 4. use shift-arrow to select the word you have typed result: mozilla crashes the stack is: Program ./dist/bin/mozilla-bin (pid = 15022) received Segmentation fault signal.Stack: nsProfileLock::FatalSignalHandler(int, siginfo*, void*)+0x0000010C [/home/robin/nodes/trunk/mozilla1.2/buildctl/dist/bin/components/libprofile.so +0x0002D534] UNKNOWN [/lib/i686/libpthread.so.0 +0x0000C516] UNKNOWN [./dist/bin/mozilla-bin +0x00028C40] UNKNOWN [/usr/lib/pango/1.1.0/modules/pango-basic-x.so +0x00001B7A] UNKNOWN [/usr/lib/pango/1.1.0/modules/pango-basic-x.so +0x00001CAE] nsULE::GetCtlData(unsigned short const*, unsigned, _PangoGlyphString*, char const*)+0x00000094 [/home/robin/nodes/trunk/mozilla1.2/buildctl/dist/bin/components/libctl.so +0x00004EAC] nsULE::PrevCluster(unsigned short const*, unsigned, int, int*)+0x00000129 [/home/robin/nodes/trunk/mozilla1.2/buildctl/dist/bin/components/libctl.so +0x0000536D] nsTextFrame::PeekOffset(nsIPresContext*, nsPeekOffsetStruct*)+0x0000091A [/home/robin/nodes/trunk/mozilla1.2/buildctl/dist/bin/components/libgklayout.so +0x0020B738] nsSelection::MoveCaret(unsigned, int, nsSelectionAmount)+0x00000BA1 [/home/robin/nodes/trunk/mozilla1.2/buildctl/dist/bin/components/libgkcontent.so +0x005C31A7] nsSelection::CharacterMove(int, int)+0x0000003F [/home/robin/nodes/trunk/mozilla1.2/buildctl/dist/bin/components/libgkcontent.so +0x005C7007] ... Module ctl uses a native pangolite. The problem seems like the confilct between the real pango in the system with the native pangolite. My question is: since gtk2 has already based on pango, do we still need to enable the ctl module?
Comment 1•22 years ago
|
||
> My question is: since
> gtk2 has already based on pango, do we still need to enable the ctl module?
AFAIK yes, since Mozilla CTL support sits partially in the crossplatform layout
code (e.g. mozilla/layout/), not in the device-spefific layer (e.g.
mozilla/gfx/).
Since the CTL code should work (some day :) on all platforms we need our own
copy of pango within the tree (we can't use the native pango library since
Mozilla's Pango version is a modified&cut-down version).
then our next task is to porting ctl to gtk2? I suggest to use pango in platform instead of pangolite in mozilla source tree at least for moz+gtk2.
Comment 3•22 years ago
|
||
Robin Lu write:
> then our next task is to porting ctl to gtk2?
> I suggest to use pango in platform instead of pangolite in mozilla source tree
> at least for moz+gtk2.
I am not sure whether this is wise. This would mean dependicy to another library
and another set of possible Linux/GTK2-only bugs.
It's better to use a "all or nothing"-way in this case. Either all platforms
should use the normal Pango library (doing that may require another bunch of
Gnome-only libs to be compiled with Mozilla - and I doubt people are much happy
with that...) or all platforms stay with the use of the builtin PangoLite
version.
Assignee | ||
Comment 4•22 years ago
|
||
mozilla/intl/ctl/pangolite code is directly copy from www.pango.org. when mozilla is based on gtk2, the name of functions defined in "mozilla/intl/ctl/pangolite" is same to pango in gtk2. But there are little difference between them, such as parameters of functions. When invoking such functions, mozilla will be confused since it don't know which one to use. Following Roland's advice, in gtk2 build, mozilla still use "mozilla/intl/ctl/pangolite", not pango in gtk2. So we must change the names of functions of mozilla's pangolite to make it not to confict with gtk2 pango. This patch changes the name of datatypes and functions to meet this requirement. It works ok on linux. I will test it on solaris tomorrow.
Assignee | ||
Updated•22 years ago
|
Attachment #109992 -
Flags: review?(prabhat.hegde)
Assignee | ||
Comment 5•22 years ago
|
||
I have tested the patch both on linux and on Solaris, it works well. Roland and katakai, I want to confirm 1 thing since you are familiar with CTL. During my investigation, I found the displaying of Thai language has no relation to CTL code in mozilla(mozilla/intl/ctl/), which is only related to "selection". If don't enable ctl, I can only select 1 Thai char each time; if enable ctl, I can't select Thai char seperately. I can only select the whole glyph(some glyphs include 2 Thai chars) instead. Is that the function of CTL module in mozilla? I have made 4 buildings(gtk, gtk+ctl, gtk2, gtk2+ctl). The comparison of them demonstrates that CTL is only related to "selection". Is my conclustion correct? With my patch, the behavior of "selection" of Thai language in "gtk2+ctl" is same to gtk+ctl.
Comment 6•22 years ago
|
||
louie, CTL code also affects rendering (Thai font-encoding is standard [enabled in intl/ctl code via nsUnicodeToTIS620.* with a hook in nsFontMetrics* for tis620-2(thai) and sun.unicode.india-0(devanagari) font encoding] of thai and devanagari characters. This is to enable shaping based on font encoding. I've r= the patch, but i don't have resource to test it at the moment. I will be back from vacation on 01/01/03 and will look at it again then. prabhat
Comment 7•22 years ago
|
||
prabhat: Is there any public place where people can download "sun.unicode.india-0"-encoded X11 fonts from ?
Comment 8•22 years ago
|
||
I'll try the patch but I have a problem around gmodule checking at configure, checking LIBIDL_CFLAGS... -I/usr/include/libIDL-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include checking LIBIDL_LIBS... -lIDL-2 -lglib-2.0 configure: error: Cannot build ctl without gmodule support in glib. Can anyone tell me the exact build option?
Assignee | ||
Comment 9•22 years ago
|
||
There is no special option needed for "ctl". I just use "./configure --enable-default-toolkit=gtk2 --enable-ctl" on Linux for my workspace.
Comment 10•22 years ago
|
||
hi Louie, I tested the patch on RedHat8.0 and it works fine. On Solaris9 with GNOME2.0, i have problems in building it. Problem is as Masaki mentioned earlier. GLIB_CFLAGS is not set when --enable-default-toolkit=gtk2 is set. This breaks gmodule checking in SUNCTL configure option. Can you look at it? I am no expert in configure. DOn't have the same problem when --enable-default-toolkit is not set. For Roland: Free font that supports 8 Indian language scripts (sun.unicode.india-0) encoding is at http://www.sun.com/developers/gadc/tools/. Any problem with the font, pl let me know. prabhat
Comment 11•22 years ago
|
||
Louie - pl correct the SUNCTL configure option for gmodule checking. Possibly replace current checking with pkg-config checking.
Assignee: prabhat.hegde → Louie.Zhao
Assignee | ||
Comment 12•22 years ago
|
||
There is an configure bug when both --enable-default-toolkit=gtk2 --enable-ctl, I file bug 189433 to deal with it. Prabhat Hegde: You can delete the CTL checking code for glib in "configure" (line 14651 - line 14685) just like mozilla1.2. This checking is for some glib on win32, which may not support gmodule. The glib2.0 does support gmodule.
Comment 13•22 years ago
|
||
Verified that patch 109992 above works on Solaris + Gnome2.0 after building it using workarounds. To test the Hindi portion on Linux requires additional work. (Downloading and installing "sun.unicode.india-0" encoded fonts from http://www.sun.com/developers/gadc/tools/ You will also require an input method that supports Hindi. r=for the pangolite portion.
Assignee | ||
Updated•21 years ago
|
Attachment #109992 -
Flags: review?(prabhat.hegde) → review+
Comment 15•21 years ago
|
||
Patch checked-in by louie.zhao@sun.com (http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=mozilla%2F&filetype=match&who=&whotype=match&sortby=Who&hours=2&date=explicit&mindate=03%2F05%2F2003+00%3A35&maxdate=03%2F05%2F2003+00%3A39&cvsroot=%2Fcvsroot), marking bug as FIXED.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Comment 16•21 years ago
|
||
*** Bug 198519 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•