Issue 115774

Summary: crash in FR version when typing / as first character
Product: Writer Reporter: jbf.faure
Component: editingAssignee: oliver.bolte
Status: CLOSED FIXED QA Contact: issues@sw <issues>
Severity: Trivial    
Priority: P2 CC: issues, mdxonefour, niklas.nebel, oc, stefan.baltzer, vitriol_vitriol
Version: OOo 3.3 RC6Keywords: regression
Target Milestone: ---   
Hardware: PC   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Issue Depends on:    
Issue Blocks: 111112    

Description jbf.faure 2010-11-24 22:15:41 UTC
Steps to reproduce :
- close all instance of OOo
- open OOo-Writer 3.3.0 RC6 FR
- type a slash ==> crash

This crash has been first found in Calc. It is linked to autocorrection. No
crash in en-US version.
Discussed in FR qa-test mailing list :
http://www.mail-archive.com/qa-test@fr.openoffice.org/msg11894.html

in gdb I get this traceback:
(gdb) run -writer
Starting program: /opt/openoffice.org3/program/soffice.bin -writer
[Thread debugging using libthread_db enabled]
[New Thread 0x7fffeea75710 (LWP 8396)]
[New Thread 0x7fffe3f19710 (LWP 8398)]
[New Thread 0x7fffe3718710 (LWP 8399)]
[New Thread 0x7fffe24eb710 (LWP 8400)]
[New Thread 0x7fffdac70710 (LWP 8401)]
[New Thread 0x7fffd7088710 (LWP 8405)]
[New Thread 0x7fffd640e710 (LWP 8406)]
[New Thread 0x7fffd5bfd710 (LWP 8407)]
[Thread 0x7fffd5bfd710 (LWP 8407) exited]
[Thread 0x7fffe3f19710 (LWP 8398) exited]
[New Thread 0x7fffe3f19710 (LWP 8408)]
[Thread 0x7fffe3f19710 (LWP 8408) exited]

Program received signal SIGSEGV, Segmentation fault.
0x00007fffdd3a8017 in SvxAutoCorrect::FnAddNonBrkSpace(SvxAutoCorrDoc&, String
const&, unsigned short, unsigned short, unsigned short) ()
   from /opt/openoffice.org3/program/../basis-link/program/libeditenglx.so

JBF
Comment 1 jbf.faure 2010-11-24 22:19:31 UTC
regression keyword set.
Comment 2 jbf.faure 2010-11-24 22:26:38 UTC
priority P2 set
Comment 3 vitriol 2010-11-25 07:00:27 UTC
Adding me to CC
Comment 4 stefan.baltzer 2010-11-25 09:19:53 UTC
SBA->OS: Please proceed, thx.
Comment 5 mdxonefour 2010-11-25 11:08:50 UTC
adjusting target to 3.3
Comment 6 Oliver Specht 2010-11-25 12:25:51 UTC
Inserting a slash at the beginning of a French paragraph results in a search for
characters at negative string positions. 

The proposed patch looks like that:

diff -r 3f116e7d913d editeng/source/misc/svxacorr.cxx
--- a/editeng/source/misc/svxacorr.cxx  Tue Nov 23 10:41:33 2010 +0100
+++ b/editeng/source/misc/svxacorr.cxx  Thu Nov 25 13:22:59 2010 +0100
@@ -701,7 +701,7 @@
                     bRunNext = true;
             }
         }
-        else if ( cChar == '/' )
+        else if ( cChar == '/' && nEndPos > 1 && rTxt.Len() > nEndPos )
         {
             // Remove the hardspace right before to avoid formatting URLs
             sal_Unicode cPrevChar = rTxt.GetChar( nEndPos - 1 );

reassigned to obo to apply in master
Comment 7 oliver.bolte 2010-11-26 09:33:29 UTC
Fixed with changeset 272034:12b46f9bb0ec for OOO330_m17.
Comment 8 stefan.baltzer 2010-12-06 14:16:18 UTC
Verified in OOO330_m17.
Comment 9 oliver.bolte 2010-12-15 13:12:24 UTC
closed.