Issue 125991 - Fatal Error "index out of bounds" on Gtk
Summary: Fatal Error "index out of bounds" on Gtk
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: 4.1.1
Hardware: PC Linux, all
: P3 Normal (vote)
Target Milestone: 4.1.2
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
: 126151 (view as issue list)
Depends on:
Blocks:
 
Reported: 2015-01-01 15:05 UTC by hanya
Modified: 2016-08-30 21:41 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---
pescetti: 4.1.2_release_blocker+


Attachments
Proposed patch to catch the exception (1.69 KB, patch)
2015-01-04 15:49 UTC, hanya
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description hanya 2015-01-01 15:05:47 UTC
How to reproduce: 
- Gtk GUI on Linux environment.
1. Create new Writer document. 
2. Push Enter key many times to leach the view cursor is entering the hidden part of the page. 
- When the shown part of the page is automatically changed, the following error is shown and the office is shutting down. No crash.: 
 Fatal Error "index out of bounds"

With this error, Writer is almost unusable.
Similar issue for Mac OSX is issue 125672.
Comment 1 hanya 2015-01-01 15:14:51 UTC
The IndexOutOfBoundsException is raised in SwAccessibleContext::getAccessibleChild method. 
The method is called in "for" statement of FindFocus function in gtkframe.cxx for Gtk environment. 
The getAccessibleChild method is called with illegal index and uncaught exception is reported as the fatal error. 
The number of valid accessible children is changed while the transition of the 
shown part of the page.

Here is the part of backtrace: 
#0  SwAccessibleContext::getAccessibleChild (this=0x7fffcc398d38, nIndex=29)
    at /mnt/hd/aoo/main/sw/source/core/access/acccontext.cxx:634
#1  0x00007fffbe7936fe in SwAccessibleDocumentBase::getAccessibleChild (
    this=0x7fffcc398d38, nIndex=29)
    at /mnt/hd/aoo/main/sw/source/core/access/accdoc.cxx:183
#2  0x00007fffec6674dc in FindFocus (xContext=...)
    at /mnt/hd/aoo/main/vcl/unx/gtk/window/gtkframe.cxx:3754
#3  0x00007fffec667732 in lcl_GetxText ()
    at /mnt/hd/aoo/main/vcl/unx/gtk/window/gtkframe.cxx:3776
#4  0x00007fffec6677e3 in GtkSalFrame::IMHandler::signalIMRetrieveSurrounding (
    pContext=0x943f90) at /mnt/hd/aoo/main/vcl/unx/gtk/window/gtkframe.cxx:3782
#5  0x00007fffebb1772d in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#6  0x00007fffeae663b8 in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#7  0x00007fffeae77d3d in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#8  0x00007fffeae7f6f9 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#9  0x00007fffeae80212 in g_signal_emit_by_name ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#10 0x00007fffebaffe5a in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
Comment 2 Regina Henschel 2015-01-01 19:09:47 UTC
Hi hanya, I cannot reproduce the problem on Windows 7, but I remember the similar issue 125971. Besides using Linux, are there other special settings or applied technology?
Comment 3 hanya 2015-01-03 12:39:06 UTC
I could not reproduce the problem on Xubuntu 14.04 64bit installed in VirtualBox 
without any input method installed.
After I installed "fcitx" input method framework, I could reproduce the problem. 
When I set to not use any input method through im-config, not reproduced.
Comment 4 hanya 2015-01-04 15:49:41 UTC
Created attachment 84369 [details]
Proposed patch to catch the exception

The problem is happen if input method is enabled like described in the above comment. 
IsAccessible state can be changed even in the loop, the exception have to be caught. 
With this patch, the input method should work well on Writer document.
Comment 5 SVN Robot 2015-01-14 08:20:05 UTC
"hanya" committed SVN revision 1651591 into trunk:
#i125991# catch IndexOutOfBoundsException to avoid fatal error happen when in...
Comment 6 vo1d 2015-02-09 05:59:00 UTC
I get this error every few minutes [MacOS 10.10.2, OO 4.1.1]; makes OO unusable.
Comment 7 hanya 2015-03-04 09:17:12 UTC
*** Issue 126151 has been marked as a duplicate of this issue. ***
Comment 8 Andrea Pescetti 2015-08-30 13:57:22 UTC
Reviewed, accepted as blocker, fixes a fatal error and also has duplicates.

@hanya: feel free to port this from trunk to the AOO410 branch for OpenOffice 4.1.2. I can do it too, of course; as you prefer.
Comment 9 SVN Robot 2015-09-29 20:31:51 UTC
"kschenk" committed SVN revision 1705924 into branches/AOO410:
#i125991# merged to AOO410
Comment 10 Andrea Pescetti 2015-10-06 22:48:16 UTC
Setting RESOLVED FIXED, patch is already applied both to trunk and AOO410.
Comment 11 Kay 2016-08-30 21:41:49 UTC
Closing.