<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - Base Freezes on DB Connect() macro"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=114676">114676</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Base Freezes on DB Connect() macro
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>6.0.0.1 rc
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Base
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>sgrekow@yahoo.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Description:
This does work on:

Version: 5.4.3.2
Build ID: 92a7159f7e4af62137622921e809f8546db437e5
CPU threads: 4; OS: Linux 4.8; UI render: default; VCL: gtk2; 
Locale: en-US (en_US.UTF-8); Calc: group

and previous versions using a variety of databases (split, PostGreSQL, MySQL,
MariaDB).

This will not work in:

Version: 6.0.0.1
Build ID: d2bec56d7865f05a1003dc88449f2b0fdd85309a
CPU threads: 4; OS: Linux 4.8; UI render: default; VCL: gtk2; 
Locale: en-US (en_US.UTF-8); Calc: group


This problem only occurs under specific conditions.


Steps to Reproduce:
Testing:

Using LO v5.4.3.2 (or prior) opening the Base file asks for a PW (click OK -
none needed) then opens a form.  This is what should happen.

Using LO v6.0.0.1 with same Base file just locks up.  Notice there isn't even a
menu bar displayed.  Only way to is to click upper right 'x', wait, then click
force quit.  Only recovery is to open with v5.4.3.2 or older to recover.

Some points worthy of notice.  With PW required turned OFF the split file works
in v6.0 (haven't tested others as pain setting up various user PW scenarios;
also not typical to require no password).  Also, with the two lines noted above
commented out, all work OK in v6.0 (various DB's)


Actual Results:  
Base file just locks up.  Notice there isn't even a menu bar displayed.  Only
way to is to click upper right 'x', wait, then click force quit.  Only recovery
is to open with v5.4.3.2 or older to recover.
So it appears there is a timing problem with signing in and executing
"ThisDataBaseDocument.CurrentController.Connect()".


Expected Results:
The objective is to open a specific form when starting the Base file.



Reproducible: Always


User Profile Reset: No



Additional Info:
The following macro is attached to the "Open Document" of the .odb (in
Standard->Module1):

SUB OpeningForm
  Dim ObjTypeWhat
  Dim ObjName As String
  Setup  
  ObjName = "MultiForm"
  ObjTypeWhat = com.sun.star.sdb.application.DatabaseObject.FORM
  If ThisDatabaseDocument.FormDocuments.hasbyname(ObjName) Then 'Check the form
exists'
     ThisDataBaseDocument.CurrentController.Connect() 'If the form exists
connect to the database'
     ThisDatabaseDocument.CurrentController.loadComponent(ObjTypeWhat, ObjName,
FALSE) 'Open the form'
  Else
      MsgBox "Error! Wrong form name used. " & ObjName
  End if
End Sub


These are the problem lines:
     ThisDataBaseDocument.CurrentController.Connect() 'If the form exists
connect to the database'
     ThisDatabaseDocument.CurrentController.loadComponent(ObjTypeWhat, ObjName,
FALSE) 'Open the form'


Attached is a sample (zipped split Base HSQL DB) where "Password Required" is
set ON.  There is no password involved but this is when the problem happens. 
By the way, the only way to turn this off now is by editing the 'content.xml'
file in the .odb root - See <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Editing: Database password properties in ODB file not re-settable via UI"
   href="show_bug.cgi?id=97416">Bug #97416</a>.



User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/63.0.3239.108 Safari/537.36</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>