Bug 73206 - NoSuchElementException from acceleratorconfiguration.cxx:126
Summary: NoSuchElementException from acceleratorconfiguration.cxx:126
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
4.3.0.0.alpha0+ Master
Hardware: Other Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: haveBacktrace
Depends on:
Blocks:
 
Reported: 2014-01-01 18:25 UTC by Terrence Enger
Modified: 2015-05-28 19:58 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
typescript with backtrace with symbols (22.80 KB, text/plain)
2014-01-01 18:30 UTC, Terrence Enger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Terrence Enger 2014-01-01 18:25:31 UTC
Steps to reproduce:

(1) Open a new Writer document.

(2) Open the Basic IDE and navigate to the source code of a module of
    the current file:

    (2.1) Take menu options Tools > Macros > "Organize macros" >
          "LibreOfficeDev Basic...".  Program presents dialog
          "LibreOfficeDev Basic Macros".

    (2.2) In the left pane, "Macro from", click "Untitled 1" and then
          click <New>.  LibreOffice presents dialog "New Module" with Name
          defaulted to "Module1".

    (2.3) Click <OK>.  Program presents window "Untitled 1.Standard"

(3) Into the source pane paste:

        sub crash
            dim price as double
            price = 8.6
            print price
        end sub 'crash

(4) Place the caret on the line "sub crash" and type <F5> to run the macro.
    Result expected : message box saying "8.6"
    Result observed : SIGABRT.


These observations are on master commit 480c7c2, fetched 2013-12-127
02:33 UTC, configured as:
    --enable-option-checking=fatal
    --enable-dbgutil
    --enable-crashdump
    --without-system-postgresql
    --without-myspell-dicts
    --with-extra-buildid
    --without-doxygen
    --with-external-tar=/home/terry/lo_hacking/git/src
built and running on debian-wheezy 64-bit.

Note for comparison that version 4.2.0.1 displays the message box that
I expected.  I cannot tell whether the difference is a recent commit
to master or my debug build.


I shall soon attach a typescript with a backtrace obtained from the
above steps.  Note that the throw comes from
framework::XMLBasedAcceleratorConfiguration::getCommandByKeyEvent,
framework/source/accelerators/acceleratorconfiguration.cxx:126.


Just as an aside, and to head off those who would ask me to attach a
document demonstrating the crash ... I tried to prepare a Writer
document with a button invoking the macro 'crash'.  It only crashed
sometimes, and when it did crash it crashed after different numbers of
throws executed and with different backtraces.  The STR above, by
contrast have produced essentially identical results three times in a
row; I lack the courage to try for a fourth time <grin />.
Comment 1 Terrence Enger 2014-01-01 18:30:04 UTC
Created attachment 91395 [details]
typescript with backtrace with symbols

Some line numbers within the typescript:
  24: start of messages from Libreoffice
 114: backtrace from the last `throw`
 154: backtrace from catch
 196: backtrace frm SIGABRT
Comment 2 Winfried Donkers 2014-03-18 11:29:03 UTC
I observe the error message (BASIC-runtime-error [...] com.sun.star.container.NoSuchElementException, message: .)
with version 4.2.2.1 when saving a writer document that has BASIC macros.

Error message does not occur with version 4.1.5.
Error message does occur with version 4.3.0.0-alpha0+ (master, last pull yesterday).

I cannot reproduce the error with the steps in comment#1, neither with version 4.2.2 nor with master. Both give 8.6 when running the macro.
Comment 3 Winfried Donkers 2014-03-19 10:20:51 UTC
(In reply to comment #2)
> I observe the error message (BASIC-runtime-error [...]
> com.sun.star.container.NoSuchElementException, message: .)
> with version 4.2.2.1 when saving a writer document that has BASIC macros.
> 
> Error message does not occur with version 4.1.5.
> Error message does occur with version 4.3.0.0-alpha0+ (master, last pull
> yesterday).
> 
> I cannot reproduce the error with the steps in comment#1, neither with
> version 4.2.2 nor with master. Both give 8.6 when running the macro.

Our problem has been 'fixed' by changing the macro, which was looking for a table with a non-existing name. As the problem did not occur with version 4.1.5 (and doesn't with the modified macro), something has changed in Writer. But FWIW that may also be an improvement, i.e. detecting a mismatch that was disrearded before.
BTW, the macro -which just puts a version number in a table in the page footer- works on all versions.
Comment 4 Julien Nabet 2015-04-17 22:11:02 UTC
On pc Debian x86-64 with master sources updated today, I don't reproduce this.

I also tried with LO Debian package 4.3.3, I don't reproduce this.

Terrence/Winfried: could you give a new try with recent LO versions?
Comment 5 Winfried Donkers 2015-04-18 16:02:54 UTC
(In reply to Julien Nabet from comment #4)
> On pc Debian x86-64 with master sources updated today, I don't reproduce
> this.
> 
> I also tried with LO Debian package 4.3.3, I don't reproduce this.
> 
> Terrence/Winfried: could you give a new try with recent LO versions?

I can't reproduce this on master (source from yesterday afternoon) on openSUSE 13.2, nor on version 4.3.6.2 (openSUSE distribution).
Comment 6 Julien Nabet 2015-04-18 17:03:44 UTC
Let's put WFM then.

Terrence: don't hesitate to reopen this tracker if you can still reproduce this.
Comment 7 Terrence Enger 2015-05-28 19:20:33 UTC
Note to self: try this again when tdf#91702 "Assertion `mnRefCnt>0'
failed" at include/vcl/outdev.hxx:342" is fixed.