Bug 125381 - Index don't appear in management dialog for odb linked to dBase file (in Windows and in Linux with all renderings except gtk3)
Summary: Index don't appear in management dialog for odb linked to dBase file (in Wind...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
6.2.4.1 rc
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.4.0 target:6.3.0.1 target:6.2.5
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-20 08:11 UTC by Julien Nabet
Modified: 2019-06-13 09:14 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
dBase database which include ndx files (2.33 KB, application/x-zip-compressed)
2019-05-20 08:14 UTC, Julien Nabet
Details
bt ok from ODbaseDetailsPage::implInitControls (7.05 KB, text/plain)
2019-05-20 19:27 UTC, Julien Nabet
Details
bt ko from ODbaseDetailsPage::implInitControls (10.94 KB, text/plain)
2019-05-20 19:34 UTC, Julien Nabet
Details
Index view dialog from Connection Properties dialog (87.17 KB, image/png)
2019-05-22 12:06 UTC, Drew Jensen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Nabet 2019-05-20 08:11:57 UTC
Description:
On pc Debian x86-64 with master sources updated yesterday, I don't see any index in management dialog.
Idem on Win10 with master sources updated some days ago.

However, no pb on Linux with gtk3 rendering.

Steps to Reproduce:
1. Create a brand new odb file related to dBase database which contains at least 1 ndx index file.
2. Menu Edit/Database/Properties
3. Click "Additional Settings" tab
4. Click "Indexes..." button


Actual Results:
Table listbox + 2 panels (Table indexes and Free indexes) are empty

Expected Results:
Table listbox + 2 panels (Table indexes and Free indexes) shouldn't be empty.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
As indicated, ok on Linux with gtk3 rendering but ko with gen rendering or on Windows.
Comment 1 Julien Nabet 2019-05-20 08:14:17 UTC
Created attachment 151525 [details]
dBase database which include ndx files
Comment 2 Julien Nabet 2019-05-20 08:18:57 UTC
Adding some debugging, I found an exception here:
https://opengrok.libreoffice.org/xref/core/dbaccess/source/ui/dlg/dbfindex.cxx?r=3c0003c9#252
246      try
247      {
248          aFile = ::ucbhelper::Content(m_aDSN,Reference< css::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext());
249          bFolder = aFile.isFolder();
250      }
251      catch(Exception&)
252      {
253          return;
254      }
ODbaseIndexDialog::Init caught class com::sun::star::uno::Exception msg: No Content Provider available for URL:
so url is empty.

After more debugging, I noticed https://opengrok.libreoffice.org/xref/core/dbaccess/source/ui/dlg/detailpages.cxx?r=e3e6f43b#201:

198          ::dbaccess::ODsnTypeCollection* pTypeCollection = pTypesItem ? pTypesItem->getCollection() : nullptr;
199          if (pTypeCollection && pUrlItem && pUrlItem->GetValue().getLength())
200              m_sDsn = pTypeCollection->cutPrefix(pUrlItem->GetValue());

At beginning m_sDsn = sdbc:dbase:C:\BLP\bugs\dbase_examples\dbase_ex\template\t3\with_data

but the last time, m_sDsn = ~sdbc:dbase:C:\BLP\bugs\dbase_examples\dbase_ex\template\t3\with_data
Comment 3 Julien Nabet 2019-05-20 19:27:35 UTC
Created attachment 151539 [details]
bt ok from ODbaseDetailsPage::implInitControls

m_sDsn doesn't contain "~" just when accessing "Advanced properties"
Comment 4 Julien Nabet 2019-05-20 19:34:29 UTC
Created attachment 151540 [details]
bt ko from ODbaseDetailsPage::implInitControls

when m_sDsn does contain "~" when accessing the second tab "Additional Settings"

gen rendering in this one and the previous one
Comment 5 Julien Nabet 2019-05-20 19:35:35 UTC
With gtk3, I just noticed there was no sdbc:dbase: or ~sdbc:dbase: parts!

In both cases, I got:
m_sDsn=/home/julien/lo/bugs/dbase_docs/clicketyclick/dbase_ex/template/t3/without_data
Comment 6 Julien Nabet 2019-05-20 19:39:02 UTC
With gtk or kde5 (with or without QT_QPA_PLATFORM=wayland), I got:
first tab:
m_sDsn=/home/julien/lo/bugs/dbase_docs/clicketyclick/dbase_ex/template
/t3/without_data

second tab
m_sDsn=
=> indexes don't appear too.
Comment 7 Julien Nabet 2019-05-20 19:43:33 UTC
dumb me, I mixed pUrlItem->GetValue() and m_sDsn which is the result of cutPrefix.

Except for gtk3 where pUrlItem->GetValue()=sdbc:dbase:/home/julien/lo/bugs/dbase_docs/clicketyclick/dbase_ex/template/t3/without_data in both tabs

for others (gtk, kde5, gen)
pUrlItem->GetValue()=sdbc:dbase:/home/julien/lo/bugs/dbase_docs/clicketyclick/dbase_ex/template/t3/without_data in first tab

and pUrlItem->GetValue()=~sdbc:dbase:/home/julien/lo/bugs/dbase_docs/clicketyclick/dbase_ex/template/t3/without_data in second tab
Comment 8 Drew Jensen 2019-05-22 12:06:16 UTC
Created attachment 151590 [details]
Index view dialog from Connection Properties dialog

Confirmed w/Ubuntu 18.04.1, Version: 6.3.0.0.alpha1+
Build ID: c04169c586ef1d55b1d0ac469bb4fbd4f50bd08a
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: kde5; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2019-05-21_22:59:34

and
Version: 6.2.4.1
Build ID: 170a9c04e0ad25cd937fc7a913bb06bf8c75c11d
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: kde5;

Working properly with 6.0.7 from the Ubuntu repo.

Newly created, with Base, indexes do show up in all three of the LO versions!

Not only are the existing [not created in via the new Base file] indexes missing if you open the property editor for the table and from their open the Indexes dialog. 

If you open the Connection Property dialog and try to view the indexes from the indexes dialog there the table does not show up, so you can't even try to see if it can find the indexes. (see attachment for screen shot)
Comment 9 Commit Notification 2019-06-08 14:44:52 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/d34ed0008f12cfe47dd239672f1941f3c54d97fd%5E%21

tdf#125381: Manage URLs beginning with an "~" in cutPrefix (dbaccess/dsntypes)

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Julien Nabet 2019-06-09 08:18:20 UTC
for 6.3: https://gerrit.libreoffice.org/#/c/73709/
Comment 11 Commit Notification 2019-06-12 10:41:12 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/+/27bd20cf5333a5df29286794b7384520fbc55012%5E%21

tdf#125381: Manage URLs beginning with an "~" in cutPrefix (dbaccess/dsntypes)

It will be available in 6.3.0.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2019-06-13 09:14:06 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/3ddccc28c0893ded5a31e1c1d023af22f6ec160f%5E%21

tdf#125381: Manage URLs beginning with an "~" in cutPrefix (dbaccess/dsntypes)

It will be available in 6.2.5.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.