existence of XIM will crash mozilla in startup

VERIFIED FIXED

Status

()

Core
Internationalization
P2
critical
VERIFIED FIXED
18 years ago
8 years ago

People

(Reporter: Shanjian Li, Assigned: Shanjian Li)

Tracking

({inputmethod})

Trunk
HP
HP-UX
inputmethod
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: nsbeta3+, fix checked in)

Attachments

(2 attachments)

(Assignee)

Description

18 years ago
Login through CDE and choose a japanese locale. When system prompt for IM, select XIM or ATOK.
You will hit a bus error before mozilla bring up any window.
(Assignee)

Comment 1

18 years ago
call stack shows the crash happens inside gdk call: gdk_im_begin.
I am wondering if this is a gtk/gdk problem on HPUX. I need to find 
a verification application to verify this.
(Assignee)

Updated

18 years ago
Blocks: 52139
(Assignee)

Comment 2

18 years ago
To be more specific, this crash happen when using on-the-spot input method
style. As suggested by toshi, putting 
user_pref("xin.input_style", "over-the-spot"); 
into prefs.js will provide a temporary workaround. Lower its severity.
Severity: blocker → critical
(Assignee)

Comment 3

18 years ago
We have 4 kinds of input style available on X, They are "on-the-spot",
"over-the-spot", "separate", "none". Input style can be further defined
using preedit style and status style. From my testing, "over-the-spot" is
the only input style working on HP at this time. ( I did not test various
combination of preedit and status style.)

Since "on-the-spot" is the default IME style, I would suggest to check in
following fix to stop crash:

Index: nsGtkIMEHelper.cpp
===================================================================
RCS file: /cvsroot/mozilla/widget/src/gtk/nsGtkIMEHelper.cpp,v
retrieving revision 1.14
diff -r1.14 nsGtkIMEHelper.cpp
1150a1151,1167
> #ifdef HPUX
>   prefered_preedit_style = (GdkIMStyle) GDK_IM_PREEDIT_POSITION;
>   prefered_status_style = (GdkIMStyle) GDK_IM_STATUS_NOTHING;
>   style = gdk_im_decide_style((GdkIMStyle)(prefered_preedit_style |
prefered_status_style));
>   if (style) {
>     gInputStyle = style;
>   } else {
>     style = gdk_im_decide_style((GdkIMStyle) (SUPPORTED_PREEDIT |
SUPPORTED_STATUS));
>     if (style) {
>       gInputStyle = style;
>     } else {
>       gInputStyle = (GdkIMStyle)(GDK_IM_PREEDIT_NONE|GDK_IM_STATUS_NONE);
>     }
>   }
>   return gInputStyle;
> #endif
>

(Assignee)

Comment 4

18 years ago
nominate nsbeta3
Keywords: nsbeta3

Comment 5

18 years ago
add tajima san to the cc list
shanjian- please provide context diff. no one know where you want to put that 
part of code into the file.
tajima- please review the code. 
shanjian- you need to follow the new review rule. Read tinderbox for details.


Comment 6

18 years ago
Shanjian's patch seems to be okay as far as whole codes are ifdefed for hpux
only and hp agrees that on-the-spot does not work well with their XIMs. Another
comment is, GDK_IM_STATUS_AREA might be preferable to GDK_IM_STATUS_NOTHING
if that combination works.

Comment 7

18 years ago
nsbeta3+ since this is low risk for other platform. Please do the proper new 
code review and approval process before check in.
Whiteboard: nsbeta3+

Updated

18 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 8

18 years ago
Just comfirm the bug.

Comment 9

18 years ago
This is a P2 for HP-UX. 
Priority: P3 → P2
(Assignee)

Comment 10

18 years ago
Created attachment 15126 [details] [diff] [review]
A better context diff

Comment 11

18 years ago
Shanjian, I'm reviewing the proposed patch, but it seems to me that it
should be enough to change primary inputstyle to over-the-spot
for hpux, since the rest of the codes inside ifdef HPUX is duplicated to
the original. I'm going to attach a new code diff, which I tested on linux
and Solaris.

Comment 12

18 years ago
Created attachment 15139 [details] [diff] [review]
Use over-the-spot as default input style - hpux only.
(Assignee)

Comment 13

18 years ago
fix has been checked in.
Status: NEW → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED
Whiteboard: nsbeta3+ → nsbeta3+, fix checked in

Comment 14

18 years ago
Shanjian, you seemed to check in your original.
I'm fine if you have checked mine and then decide to
use yours. But just for sure.
(Assignee)

Comment 15

18 years ago
toshi, I didn't noticed your comment when I did the check in. Since it does not 
make much difference, I will stick to mine. I am still working on on-the-spot
problem. If that can be resolve, those fix will be backed out. Otherwise, I may 
try the combination as you suggested and finalize it after PR3.

Comment 16

18 years ago
shanjian, no problem.

Comment 17

18 years ago
Verified.
Status: RESOLVED → VERIFIED
Keywords: inputmethod
You need to log in before you can comment on or make changes to this bug.