Bug Hunting Session
Bug 112634 - Incorrect/defunct database shown when trying to add further fields after mail merge
Summary: Incorrect/defunct database shown when trying to add further fields after mail...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.1.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.0.0
Keywords: bibisectRequest, implementationError, regression
Depends on:
Blocks: Mail-Merge
  Show dependency treegraph
 
Reported: 2017-09-25 03:29 UTC by Aron Budea
Modified: 2018-09-06 06:27 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Sample address list (10.11 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-09-25 03:29 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2017-09-25 03:29:34 UTC
Created attachment 136519 [details]
Sample address list

The attached spreadsheet is a sample address list that matches with address block fields with US locale.
As a prerequisite, delete any possible unnecessary/bogus leftover database connections. (Options; LibreOffice Base -> Databases)

Save an empty document, which will be the input of the mail merge (so the connection to the address list will be embedded).
Start the mail merge wizard.
At step 3, select the attached sample address list, and tick "This document shall contain an address block."
Move to the last step (don't insert salutation), and click Finish.
Try inserting a field via Insert -> Field -> More Fields...; Database tab.

=> There's a database with the name of the address list, but clicking the [+] results in an endless spinner (LO doesn't freeze, the dialog can be closed).
Note that since it's an embedded datasource, it should probably be called EmbeddedDatabase, as it is normally called in that case... I think?

Observed with LO 6.0 daily build (2017-09-22_22:54:52, 0db08432c69adc36ed464c1f7c8e672acb3752d) / Windows 7.
In 5.4.1.2 both databases are in the list, the one with the file name doesn't work, but the one named EmbeddedDatabase does.
=> partially a regression in 6.0.
Comment 1 Aron Budea 2017-09-25 03:45:24 UTC
So there are two issues:
- The EmbeddedDatabase database isn't there when adding a field, this seems to be a regression in 6.0, possibly due to the fixes to bug 108572,
- There is a defunct one with the data connection name instead (eg. "sample list"), which has been there since 5.1, and was working in 5.0.0.5. This is likely defunct since the introduction of the embedded data source feature in 5.1, and thus an implementation error (it should've been removed at the time).
Comment 2 Commit Notification 2017-09-27 08:26:49 UTC
Szymon Kłos committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=79a425900e31bda83cde1bee150c1234931cb8bd

tdf#112634 Don't remove embedded database before close

It will be available in 6.0.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 3 Commit Notification 2017-09-27 11:24:12 UTC
Szymon Kłos committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=176b161ac654c50eb5c128ebdb681fcf20509b35

tdf#112634 Don't show broken connections in database tree

It will be available in 6.0.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2017-10-05 06:14:21 UTC
Szymon Kłos committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=75a881829f19439245cdb859fc16d59461992f79

tdf#112634 avoid crash

It will be available in 6.0.0.

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

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