Issue 86443 - Gnome Accessibility "on" causes OOo Writer to crash on new doc from
Summary: Gnome Accessibility "on" causes OOo Writer to crash on new doc from
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: ui (show other issues)
Version: OOo 2.4.1
Hardware: All Linux, all
: P2 Trivial (vote)
Target Milestone: ---
Assignee: timrichardson
QA Contact: issues@sw
URL:
Keywords: accessibility
Depends on:
Blocks:
 
Reported: 2008-02-25 14:09 UTC by timrichardson
Modified: 2013-08-07 14:44 UTC (History)
9 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description timrichardson 2008-02-25 14:09:03 UTC
forwarded from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=430599
a back trace of the crash is included there. Seems to crash in the package
called openoffice.org-gtk

Writer crashes if accessibility is activated, when a user tries to use a
template to make a new document.
Comment 1 nospam4obr 2008-02-26 05:54:45 UTC
I will try to reproduce this one soon ..
Comment 2 nospam4obr 2008-04-11 12:40:51 UTC
While I can easily reproduce the crash with the OOo 2.3 that comes with my ubuntu system, I can not with 
the Sun provided OOo 2.4 of the DEV300_m5 development build on the same system.

Does go-oo.org apply any patches in this area ?
Comment 3 nospam4obr 2008-04-21 06:20:49 UTC
I am still unable to reproduce this with vanilla OOo ..
Comment 4 mmeeks 2008-04-21 11:08:47 UTC
We don't patch any a11y bits that I can recall as of 2.3. I tried too to repeat
this with 2.4, but while I saw one crash, frustratingly I couldn't repeat it &
couldn't catch it.

One thing we do is to use the system allocator instead of the mhu allocator:
that in turn tends to re-use memory much more and show up various memory
corruption related issues. Possibly this is related - though valgrind shows no
problems here in 2.4.

Tim - if you can reproduce this, can you do so in the debugger & get a trace ?
Comment 5 Mechtilde 2008-11-07 19:54:08 UTC
close the WORKSFORME issue
Comment 6 timrichardson 2008-12-27 00:37:07 UTC
This bug also happens in 3.0.1

This is the 2.4.1 gdb info: 
Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread 0xb4fce8d0 (LWP 30ls83)]
0xb79b62af in ViewTabListBox_Impl::GetAccessibleObjectDescription ()
   from /usr/lib/openoffice/program/libsvt680li.so


this is the 3.0.1 output 
Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread 0xb4e5db00 (LWP 11214)]
0xb720e6ff in ViewTabListBox_Impl::GetAccessibleObjectDescription ()
   from /usr/lib/openoffice/program/../basis-link/program/libsvtli.so

Here is how I reproduce this bug: 

*** Please type your report below this line ***
When accessibility is turned on, OOo Writer crashes when trying to create a new
document from a template. 
This bug is long-standing and exists in the v3 packages. 
I'm reporting it here because I think that a fix may be easy and perhaps a
Debian patch is something ok for Lenny.
I will also see if I can reproduce it in the standard ooo build although I
wonder if the standard builds will interract with gnome accessibility,

To reproduce:

1. Turn on accessibility: System -> Preferences -> Accessibility and then log
off and log on to activate accessibility

2. Start Writer, choose File => New -> Templates and Documents

3. Click on the icon for Templates

This causes the crash.

I'll include the other stuff from Debian reportbug in-case it helps. This is
from a system tracking "lenny", which is why it's ooo 2.4.1 although I also get
this bug in 3.0.1 as packaged by Debian. 

I would like to know if the is is Debian-specific issue or an openoffice issue. 
Perhaps this extra information helps? 

I am confused about who "owns" the integration with Gnome's accessibility feature.



-- System Information:
Debian Release: 5.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages openoffice.org depends on:
ii  openoffice.org-base           1:2.4.1-15 OpenOffice.org office suite - data
ii  openoffice.org-calc           1:2.4.1-15 OpenOffice.org office suite - spre
ii  openoffice.org-core           1:2.4.1-15 OpenOffice.org office suite archit
ii  openoffice.org-draw           1:2.4.1-15 OpenOffice.org office suite - draw
ii  openoffice.org-filter-mobiled 1:2.4.1-15 Mobile Devices Filters for OpenOff
ii  openoffice.org-impress        1:2.4.1-15 OpenOffice.org office suite - pres
ii  openoffice.org-java-common    1:2.4.1-15 OpenOffice.org office suite Java s
ii  openoffice.org-math           1:2.4.1-15 OpenOffice.org office suite - equa
ii  openoffice.org-officebean     1:2.4.1-15 OpenOffice.org Office Bean
ii  openoffice.org-report-builder 1:2.4.1-15 OpenOffice.org Report Builder exte
ii  openoffice.org-writer         1:2.4.1-15 OpenOffice.org office suite - word
ii  openoffice.org-writer2latex   0.5-8      Writer/Calc to LaTeX/XHTML convert
ii  ttf-dejavu                    2.25-3     Metapackage to pull in ttf-dejavu-
ii  ttf-liberation                1.04.93-1  Free fonts with the same metrics a

Versions of packages openoffice.org recommends:
ii  openoffice.org-filter-binfilt 1:2.4.1-15 Legacy filters (e.g. StarOffice 5.

Versions of packages openoffice.org suggests:
ii  cups-bsd [cupsys-bsd]      1.3.8-1lenny4 Common UNIX Printing System(tm) - 
ii  cupsys-bsd                 1.3.8-1lenny4 Common UNIX Printing System (trans
pn  graphicsmagick-imagemagick <none>        (no description available)
ii  gstreamer0.10-ffmpeg       0.10.4-3      FFmpeg plugin for GStreamer
pn  gstreamer0.10-plugins-bad  <none>        (no description available)
ii  gstreamer0.10-plugins-base 0.10.20-1     GStreamer plugins from the "base" 
ii  gstreamer0.10-plugins-good 0.10.8-4      GStreamer plugins from the "good" 
ii  gstreamer0.10-plugins-ugly 0.10.8-1      GStreamer plugins from the "ugly" 
pn  hunspell-dictionary        <none>        (no description available)
ii  iceweasel                  3.0.5-1       lightweight web browser based on M
ii  java-gcj-compat            1.0.78-2      Java runtime environment using GIJ
ii  libgl1-mesa-glx [libgl1]   7.0.3-7       A free implementation of the OpenG
pn  libpaper-utils             <none>        (no description available)
ii  libsane                    1.0.19-23     API library for scanners
ii  libxrender1                1:0.9.4-2     X Rendering Extension client libra
ii  menu                       2.1.41        generates programs menu for all me
ii  myspell-en-us [myspell-dic 1:2.4.0-4     English_american dictionary for my
pn  openclipart-openoffice.org <none>        (no description available)
ii  openoffice.org-gnome       1:2.4.1-15    GNOME Integration for OpenOffice.o
ii  openoffice.org-help-en-us  1:2.4.1-15    English_american help for OpenOffi
pn  openoffice.org-hyphenation <none>        (no description available)
pn  openoffice.org-l10n-2.4    <none>        (no description available)
pn  openoffice.org2-thesaurus  <none>        (no description available)
pn  pstoedit                   <none>        (no description available)
ii  sun-java6-jre              6-10-2        Sun Java(TM) Runtime Environment (
ii  unixodbc                   2.2.11-16     ODBC tools libraries

Versions of packages openoffice.org-core depends on:
ii  fontconfig             2.6.0-3           generic font configuration library
ii  libc6                  2.7-16            GNU C Library: Shared libraries
ii  libcairo2              1.6.4-7           The Cairo 2D vector graphics libra
ii  libcurl3               7.18.2-7          Multi-protocol file transfer libra
ii  libdb4.6               4.6.21-12         Berkeley v4.6 Database Libraries [
ii  libexpat1              2.0.1-4           XML parsing C library - runtime li
ii  libfreetype6           2.3.7-2           FreeType 2 font engine, shared lib
ii  libgcc1                1:4.3.2-1         GCC support library
ii  libglib2.0-0           2.16.6-1          The GLib library of C routines
ii  libgstreamer-plugins-b 0.10.20-1         GStreamer libraries from the "base
ii  libgstreamer0.10-0     0.10.20-1         Core GStreamer libraries and eleme
ii  libgtk2.0-0            2.12.11-4         The GTK+ graphical user interface 
ii  libhunspell-1.2-0      1.2.6-1           spell checker and morphological an
ii  libhyphen0             2.4-4             ALTLinux hyphenation library - sha
ii  libice6                2:1.0.4-1         X11 Inter-Client Exchange library
ii  libicu38               3.8.1-3           International Components for Unico
ii  libjpeg62              6b-14             The Independent JPEG Group's JPEG 
ii  libldap-2.4-2          2.4.11-1          OpenLDAP libraries
ii  libneon27              0.28.2-6.1        An HTTP and WebDAV client library
ii  libnspr4-0d            4.7.1-4           NetScape Portable Runtime Library
ii  libnss3-1d             3.12.0-5          Network Security Service libraries
ii  libpam0g               1.0.1-4           Pluggable Authentication Modules l
ii  libpango1.0-0          1.20.5-3          Layout and rendering of internatio
ii  libsm6                 2:1.0.3-2         X11 Session Management library
ii  libssl0.9.8            0.9.8g-14         SSL shared libraries
ii  libstdc++6             4.3.2-1           The GNU Standard C++ Library v3
ii  libstlport4.6ldbl      4.6.2-3.2         STLport C++ class library
ii  libx11-6               2:1.1.5-2         X11 client-side library
ii  libxaw7                2:1.0.4-2         X11 Athena Widget library
ii  libxext6               2:1.0.4-1         X11 miscellaneous extension librar
ii  libxinerama1           2:1.0.3-2         X11 Xinerama extension library
ii  libxml2                2.6.32.dfsg-5     GNOME XML library
ii  libxrender1            1:0.9.4-2         X Rendering Extension client libra
ii  libxslt1.1             1.1.24-2          XSLT processing library - runtime 
ii  libxt6                 1:1.0.5-3         X11 toolkit intrinsics library
ii  libxtst6               2:1.0.3-1         X11 Testing -- Resource extension 
ii  openoffice.org-common  1:2.4.1-15        OpenOffice.org office suite archit
ii  ttf-opensymbol         1:2.4.1-15        The OpenSymbol TrueType font
ii  zlib1g                 1:1.2.3.3.dfsg-12 compression library - runtime

Versions of packages openoffice.org-writer depends on:
ii  libc6                  2.7-16            GNU C Library: Shared libraries
ii  libgcc1                1:4.3.2-1         GCC support library
ii  libicu38               3.8.1-3           International Components for Unico
ii  libstdc++6             4.3.2-1           The GNU Standard C++ Library v3
ii  libstlport4.6ldbl      4.6.2-3.2         STLport C++ class library
ii  libwpd8c2a             0.8.14-1          Library for handling WordPerfect d
ii  libwps-0.1-1           0.1.2-1           Works text file format import filt
ii  libxml2                2.6.32.dfsg-5     GNOME XML library
ii  openoffice.org-base-co 1:2.4.1-15        OpenOffice.org office suite -- lib
ii  openoffice.org-core    1:2.4.1-15        OpenOffice.org office suite archit
ii  zlib1g                 1:1.2.3.3.dfsg-12 compression library - runtime

Versions of packages openoffice.org-calc depends on:
ii  libc6                        2.7-16      GNU C Library: Shared libraries
ii  libgcc1                      1:4.3.2-1   GCC support library
ii  libstdc++6                   4.3.2-1     The GNU Standard C++ Library v3
ii  libstlport4.6ldbl            4.6.2-3.2   STLport C++ class library
ii  libsuitesparse-3.1.0         1:3.1.0-3.1 collection of libraries for comput
ii  lp-solve                     5.5.0.10-10 Solve (mixed integer) linear progr
ii  openoffice.org-base-core     1:2.4.1-15  OpenOffice.org office suite -- lib
ii  openoffice.org-core          1:2.4.1-15  OpenOffice.org office suite archit

Versions of packages openoffice.org-base depends on:
ii  java-gcj-compat               1.0.78-2   Java runtime environment using GIJ
ii  libc6                         2.7-16     GNU C Library: Shared libraries
ii  libgcc1                       1:4.3.2-1  GCC support library
ii  libhsqldb-java                1.8.0.10-1 Java SQL database engine
ii  libstdc++6                    4.3.2-1    The GNU Standard C++ Library v3
ii  libstlport4.6ldbl             4.6.2-3.2  STLport C++ class library
ii  openoffice.org-base-core      1:2.4.1-15 OpenOffice.org office suite -- lib
ii  openoffice.org-core           1:2.4.1-15 OpenOffice.org office suite archit
ii  openoffice.org-java-common    1:2.4.1-15 OpenOffice.org office suite Java s
ii  sun-java6-jre                 6-10-2     Sun Java(TM) Runtime Environment (

Versions of packages openoffice.org-impress depends on:
ii  libc6                         2.7-16     GNU C Library: Shared libraries
ii  libgcc1                       1:4.3.2-1  GCC support library
ii  libstdc++6                    4.3.2-1    The GNU Standard C++ Library v3
ii  libstlport4.6ldbl             4.6.2-3.2  STLport C++ class library
ii  openoffice.org-core           1:2.4.1-15 OpenOffice.org office suite archit
ii  openoffice.org-draw           1:2.4.1-15 OpenOffice.org office suite - draw

Versions of packages openoffice.org-math depends on:
ii  libc6                         2.7-16     GNU C Library: Shared libraries
ii  libgcc1                       1:4.3.2-1  GCC support library
ii  libstdc++6                    4.3.2-1    The GNU Standard C++ Library v3
ii  libstlport4.6ldbl             4.6.2-3.2  STLport C++ class library
ii  openoffice.org-core           1:2.4.1-15 OpenOffice.org office suite archit

-- no debconf information




Comment 7 timrichardson 2008-12-27 05:34:46 UTC
I haven't worked out yet how to get the source code for openoffice.org in a
format I can read. 

However, thanks to
http://svn.services.openoffice.org/opengrok/xref/Current/svtools/source/contnr/fileview.cxx

I see only one reference to ViewTabListBox_Impl::GetAccessibleObjectDescription


 1055 ::rtl::OUString ViewTabListBox_Impl::GetAccessibleObjectDescription(
::svt::AccessibleBrowseBoxObjType _eType, sal_Int32 _nPos ) const
   1056 {
   1057 	::rtl::OUString sRet =
SvHeaderTabListBox::GetAccessibleObjectDescription( _eType, _nPos );
   1058     if ( ::svt::BBTYPE_TABLECELL == _eType )
   1059 	{
   1060 		sal_Int32 nRow = _nPos / GetColumnCount();


I am getting an "arithmetic error"; I guess a divide by zero in line 1060 .


Comment 8 nospam4obr 2009-01-05 08:44:52 UTC
We probably should check the return value of GetColumnCount() for >0 anyway.
Comment 9 mmeeks 2009-01-05 10:18:27 UTC
Great catch - unfortunately there are a number of other places doing just the
same thing; eg. in the parent class:

svtabbx.cxx also has two instances of this construct:
				sal_uInt16 nColumnCount = GetColumnCount();
				sal_Int32 nRow = _nPos / nColumnCount;

Perhaps a better question is -- why is there a header there with no columns in
it ? it seems to me that returning 0 from GetColumnCount is prolly closer to the
bug than adding lots of special cases for this around the place eg.

void SvHeaderTabListBox::RecalculateAccessibleChildren()
{
    if ( !m_aAccessibleChildren.empty() )
    {
        sal_uInt32 nCount = ( GetRowCount() + 1 ) * GetColumnCount();
        if ( m_aAccessibleChildren.size() < nCount )
            m_aAccessibleChildren.resize( nCount );

is going to horribly malfunction with 0 GetColumnCount as well - ditto many of
the multiplies in there.
Comment 10 pb 2009-01-05 12:18:31 UTC
pb: should be fixed in 3.2.
Comment 11 Mathias_Bauer 2009-02-02 13:02:43 UTC
Thomas, please take over
Comment 12 thomas.lange 2009-02-23 15:41:41 UTC
.
Comment 13 thomas.lange 2009-03-10 15:23:11 UTC
TL->timrichardson: I was told that the main reason for the different behavior of
the platforms is that with Windows the calls to the Accessibility API are
synchronous while for UNIX they are not. Thus the respective functions will
usually get called at different states of the running Office, thus resulting
often enough in different variable values and even different call trees.

The office code not yet taken into account that GetColumnCount() may return 0 is
of course a bug in itself. On the other hand one could argue that the function
is called to early under Gnome. Especially if (after the crash is fixed) it may
turn out later on that the office does not crash anymore but the accessibility
tools still do not work as expected.

Thus I will change the code so it will be safe to have 0 returned by that
function. And then it has to be checked if accessibility is working as it should.
Comment 14 thomas.lange 2009-03-10 16:04:55 UTC
Files changed:
- svtools\source\contnr\fileview.cxx
- svtools\source\contnr\svtabbx.cxx

Effect on accessibility still needs to be tested.
Comment 15 thomas.lange 2009-04-01 12:39:45 UTC
.
Comment 16 mdxonefour 2009-04-27 14:43:47 UTC
MD: Re-targeting to 3.1.1 as discussed in release status meeting on 2009-04-27.
Comment 17 rene 2009-04-28 12:23:12 UTC
means: this issue should either be reopened or a new issue done for 3.1.1
Comment 18 mdxonefour 2009-04-29 08:08:35 UTC
MD: Setting target back to 3.2 release for this issue. For the 3.1.1 release  I
filed a separate issue 101420.
Comment 19 pmladek 2009-05-06 18:05:33 UTC
JFYI, I was able to reproduce the crash with a11y enabled here. The fix really
helped.
Comment 20 thomas.lange 2009-06-25 12:01:35 UTC
Forgot to mention this: Fixed in CWS swa11y32
Comment 21 eric.savary 2009-07-10 14:49:10 UTC
@timrichardson/pmladek and others: sorry but I am in charge of verifying this
issue for 3.1.1 (issue 101420) and I cannot reproduce the crash so I cannot verify.

Please tell us if can still reproduce it in the current build and tell us your
current exact platform/system. We will then provide you with the CWS containing
the fix.

Thanx you!
Comment 22 pmladek 2009-07-21 19:43:34 UTC
Verified in CWS swa11y32.

I was able to reproduce it with my build. I applied the fix from CWS swa11y32
and it started to work. Also the diff looks reasonable. I hope that it is enough
to verify it.
Comment 23 thomas.lange 2009-07-31 10:15:48 UTC
tl->timrichardson: Hi, can you please once more verify the fix inCWS swa11y32_2nd? 
(The original cws was deleted due to messed up svn info)
If you need a specific build drop me a note.
Thanks in advance!

Comment 24 malte_timmermann 2010-01-08 09:12:12 UTC
Fixed and integrated => closing now..