<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - thisComponent is not valid during "Open Document" at startup in non-document macro"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=92770#c12">Comment # 12</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - thisComponent is not valid during "Open Document" at startup in non-document macro"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=92770">bug 92770</a>
              from <span class="vcard"><a class="email" href="mailto:lionel@mamane.lu" title="Lionel Elie Mamane <lionel@mamane.lu>"> <span class="fn">Lionel Elie Mamane</span></a>
</span></b>
        <pre>Nah, using SAL_USE_VCLPLUGIN=gtk does not make it disappear.

My local build is with --enable-dbgutil... Is that the difference? But the
Debian package that I test is a release build...

Reproduced with

(TDF build)
Version: 5.2.7.2
Build ID: 2b7f1e640c46ceb28adf43ee075a6e8b8439ed10
CPU Threads: 8; OS Version: Linux 4.9; UI Render: default; VCL: gtk2; 
Locale: en-GB (en_GB.utf8); Calc: group

I tried again several times with

Version: 5.3.2.2
Build ID: 6cd4f1ef626f15116896b1d8e1398b56da0d0ee1
CPU Threads: 8; OS Version: Linux 4.9; UI Render: default; VCL: gtk2; Layout
Engine: new; 
Locale: en-GB (en_GB.utf8); Calc: group


Often it works, sometimes not. So it definitely smells like a race condition.

Ah, now reproduced with

Version: 5.5.0.0.alpha0+
Build ID: d880df3a44497cdec49017538a9d38d48e543bad
CPU threads: 8; OS: Linux 4.9; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time:
2017-05-19_07:51:21
Locale: en-GB (en_GB.utf8); Calc: group

after several tries... like 10.

Ah, I found a way to reproduce each time:


settings: medium security, giving a warning and a choice "enable macros" or
"disable macros".

$ /opt/libreofficedev5.5/program/soffice attachment_117261
# give focus to another non-LibreOffice window
# give focus back to security warning window WITHOUT GOING THROUGH focus to
LibreOffice main window (which would "pass" its focus to the security warning
window)
# click "Enable Macros"


On the other hand, this *always* works (bug does not appear):

$ /opt/libreofficedev5.5/program/soffice attachment_117261
# give focus to another non-LibreOffice window
# give focus back LibreOffce main window; it "passes" its focus to the security
warning window
# click "Enable Macros"</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>