Issue 89158 - input with MS pinyin 2003, crash.
Summary: input with MS pinyin 2003, crash.
Alias: None
Product: Calc
Classification: Application
Component: editing (show other issues)
Version: OOo 2.4 RC6
Hardware: All Windows XP
: P2 Trivial (vote)
Target Milestone: ---
Assignee: spreadsheet
QA Contact: issues@sc
Keywords: CJK
Depends on:
Reported: 2008-05-08 07:38 UTC by redflagzhulihua
Modified: 2009-07-12 19:35 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description redflagzhulihua 2008-05-08 07:38:48 UTC
OOo2.4RC6_zh-CN, windowsXP(probobly all the windows OS will occur) 

1. Create a calc document, swith input to MS-pinyin2003;
2. input some Chinese characters, go on input, press backspace to delete some 
pre-input and already input characters. just like we have something wrong with 
the input character and try to correct it. 

After several operation, calc will not response, and after a long term of hang, 
it crashes. with system information tells us Virtual memory low.
Comment 1 pariswang 2008-05-22 09:07:44 UTC
this bug may caused by origin oo version mistake. i find a logic fault in 
function "Font::operator=(const Font& rFont)". the key codes is:

        if ( rFont.mpImplFont->mnRefCount )
	if ( mpImplFont->mnRefCount )
	   if ( mpImplFont->mnRefCount == 1 )
		delete mpImplFont;
	mpImplFont = rFont.mpImplFont;
	return *this;

  if mpImplFont's mnRefCount more than 1, program will dont delete mpImplFont 
memory, and then mpImplFont point to another memory(rFont.mpImplFont) which 
cause memory leak 
Comment 2 pariswang 2008-05-22 09:39:26 UTC
there are no memory leak if i debug step by step , but memory leak be founded 
when run the program no break, i think class Font 's functions lack of 
Comment 3 philipp.lohmann 2008-05-22 09:56:29 UTC
The font assignment operator is correct this way. Impl_Font is a reference
counted structure, meaning many Font objects can point to the same Impl_Font.
Only if the last Font object pointing to a specific Impl_Font releases its
reference on that Impl_Font that Impl_Font instance gets freed. The concept is
similar to what boost::shared_ptr does (e.g. look at )
Comment 4 pariswang 2008-05-27 07:14:47 UTC
during i debug code for this bug, i find class "ImpEditEngine"'s private 
variable - "aParaPortionList" (type: "ParaPortionList") is the key point.
the problem is i don't know the way to initialize or modify this variable 
content in other modules. and obviously some modules have modified it's 
content in some place. can you give some tip about how to observe this variable
("aParaPortionList")'s change? 
Comment 5 pariswang 2008-06-02 10:10:15 UTC
 have debug ooo for this bug several days and find the pImplSVData's content's 
error when the bug occurs , and i find program's message mechanism don't 
consider the special condtion of MS-pinyin2003 input.
when user delete all content of in blue pre-input frame and one already input 
>mbExtTextInput dont equal to NULL which result in a serial logical mistake. I 
cannt understand the  message processing detail part about delete character, 
can you give me some tip about the message processing ? Thanks you.   

Comment 6 philipp.lohmann 2008-06-02 10:43:42 UTC
mbExtTextInput on a window gets set the first time an extended text input event
occurs on a window (that is you changed the preedit buffer or commited text). It
is set to false again when extended input mode is left, that is usually when you
committed text. The windows layer in vcl/win/source/window/salframe.cxx notfies
this by sending a SALEVENT_ENDEXTTEXTINPUT event to the indpendent layer in
Comment 7 pariswang 2008-06-03 04:38:26 UTC
hi pl:
thank you for give me the tip about mbExtTextInput change rule,but i dont find 
mbExtTextInput be set to false when extended input mode is left in ms-pinyin 
input by track the program step by step. in face i find program will receive a 
Event(SALEVENT_ENDEXTTEXTINPUT ) when end of extended input mode by 
click "enter" or double click "backspace"  key,but it dont receive this event 
when click "backspace" key to quit character in  extended input mode in ms-
pinyin input. i guest it is the orgin matter that cause this bug.what's your 
Comment 8 oc 2008-12-09 13:09:38 UTC
still not reproducible - setting worksforme. Please retry with the latest version 
Comment 9 Mechtilde 2009-07-12 19:35:07 UTC
worksforme -> closed