Bug 73126 - IDE: attempt to advance a dereferenceable iterator outside its valid range
Summary: IDE: attempt to advance a dereferenceable iterator outside its valid range
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
(earliest affected) Master
Hardware: Other Linux (All)
: medium normal
Assignee: Not Assigned
Keywords: haveBacktrace
Depends on:
Reported: 2013-12-29 18:37 UTC by Terrence Enger
Modified: 2015-04-21 19:40 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:

workbook with two macro definitions (15.39 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-12-29 18:40 UTC, Terrence Enger
typescript with backtrace (29.50 KB, text/plain)
2013-12-29 18:41 UTC, Terrence Enger

Note You need to log in before you can comment on or make changes to this bug.
Description Terrence Enger 2013-12-29 18:37:59 UTC

(1) Enable macro recording in your LibreOffice (Tools > LibreOfficeDev
    > Advanced > "Optional (unstable) options" > "Enable Macro
    recording (limited)") and enable macro security at least as
    permissive as High (Tools > Options > LibreOfficeDev > Security >
    "Macro Security").  I do not *know* that enabling macro recording
    is necessary; it is just the way my LibreOffice is set up.

(2) Open the (soon-to-be) attached file with_macros.odt.  If the
    program presents warning "This document contains macros. ...",
    click <OK>.  Program displays window with_macros.odt; the sheet
    has words in the first five columns of three rows.

(3) Take menu options Tools > Macros > "Organize Macros" >
    "LibreOfficeDev Basic...".  Program presents window
    "LibreOfficeDev Basic Macros".

(4) In the pane "Macro from" expand with_macros.ods > Standard >
    Module1.  Click on that Module1.  Program shows two macros in the
    pane "Existing macros in: Module1"; macro Main is selected.

(5) Cllick <Edit>.  Program presents window

(6) Click in the right pane and type <ctrl>+<End>.  Status bar shows
    <Ln 53, Col 1>.

(7) Select the definition of del_2b2_cells by typing 33 times
    <shift>+<up-arrow>.  The program hightlights text from the line
    "sub del_2b2_cells to the end of the source; status bar shows "Ln
    20, Col 1".

(8) Type <Delete>, Program aborts.  The interesting messages in the

        /usr/include/c++/4.7/debug/safe_iterator.h:359:error: attempt to advance a 
            dereferenceable (start-of-sequence) iterator 21 steps, which falls     
            outside its valid range.

        Objects involved in the operation:
        iterator @ 0x0x7fffe0abb9f0 {
        type = N11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPN13accessibility13ParagraphInfoENSt9__cxx19986vectorIS4_SaIS4_EEEEENSt7__debug6vectorIS4_S8_EEEE (mutable iterator);
          state = dereferenceable (start-of-sequence);
          references sequence with type `NSt7__debug6vectorIN13accessibility13ParagraphInfoESaIS2_EEE' @ 0x0x7fffe0abb9f0
        Application Error

My LibreOffice is master commit 480c7c2, fetched 2013-12-27 02:33 UTC,
configured as:
built and running on debian-wheezy 64-bit.
Comment 1 Terrence Enger 2013-12-29 18:40:15 UTC
Created attachment 91297 [details]
workbook with two macro definitions
Comment 2 Terrence Enger 2013-12-29 18:41:52 UTC
Created attachment 91299 [details]
typescript with backtrace

Some line numbers within the typescript:
   4: Messages from LibreOffice
 161: Start of step (8)
 275: gdb backtrace from the core file
Comment 3 Julien Nabet 2013-12-30 13:15:55 UTC
On pc Debian x86-64 (testing) with master sources updated today, I don't reproduce this.

Terrence: I don't have --enable-option-checking=fatal in my autogen.input but for the rest, it should be ok:

I tried a gdb session but didn't even enter there:
 2333     ::sal_Int32 ret = getSelectionType(nNewFirstPara, nNewFirstPos, nNewLastPara, nNewLastPos);
(see http://opengrok.libreoffice.org/xref/core/accessibility/source/extended/textwindowaccessibility.cxx#2333)

Did you enable something so we enter accessibility part?
Comment 4 Terrence Enger 2013-12-30 15:22:17 UTC
I think that I have not done anything explicit about accessibility
since I installed debian-wheezy.  ORCA is on the menu Applications.

In LibreOffice Tools > Options > Accessibility, I see the following
options checked:
(*) Allow animated graphics
(*) Allow animated text
(*) Help tips disappear after 4 seconds
(*) Use system colors for page previews

In system preferences "Universal Access", all options are Normal or

Alas, my ignorance about accessibility issues is profound.  Can you
suggest what I should look at or try?  Is it time to invite V Stuart
Foote in to the conversation?
Comment 5 Julien Nabet 2013-12-30 15:57:32 UTC
Ok when I enable "Screen reader" in "Universal Access", I can reproduce the problem.
Comment 6 QA Administrators 2015-04-19 03:20:22 UTC
** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

   *Test to see if the bug is still present on a currently supported version of LibreOffice (4.4.1 or later)

   *If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior
   *If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System

Please DO NOT

   *Update the version field
   *Reply via email (please reply directly on the bug tracker)
   *Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 

1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3)


2. Test your bug 
3. Leave a comment with your results. 
4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 
4b. If the bug was not present in 3.3 - add "regression" to keyword

Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa

Thank you for your help!

-- The LibreOffice QA Team This NEW Message was generated on: 2015-04-18
Comment 7 Terrence Enger 2015-04-21 19:40:21 UTC
Thank you for the reminder of this bug report.

The bug seems to be gone with my build of master commit 69262e4,
fetched 2015-04-15 21:42Z, configured
    --enable-option-checking=fatal --enable-dbgutil --enable-crashdump
    --without-system-postgresql --without-myspell-dicts
    --with-extra-buildid --without-doxygen
    --enable-online-update --disable-gstreamer-1-0
built and running on debian wheezy.