Bug 106423 - DBF dbase file will not open correctly
Summary: DBF dbase file will not open correctly
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
5.2.5.1 release
Hardware: All All
: high major
Assignee: Julien Nabet
QA Contact:
URL:
Whiteboard: target:6.0.0 target:5.3.5 target:5.4.0.1
Keywords: regression
Depends on:
Blocks:
 
Reported: 2017-03-07 22:10 UTC by onyx
Modified: 2017-07-08 13:10 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Stripped out file for testing (4.03 KB, application/x-dbf)
2017-03-07 22:10 UTC, onyx
Details

Note You need to log in before you can comment on or make changes to this bug.
Description onyx 2017-03-07 22:10:37 UTC
Created attachment 131735 [details]
Stripped out file for testing

A dBase DBF file that has opened correctly in all previous versions refuses to with this version. Rather than the character encoding window it usually brings up, instead it brings up the Filter window, and there is no way to read the file correctly. 
I have the LinuxMint 18.1 AMD64 system LO5.1.6.2 installed and this opens the file correctly. 
I downloaded the 5.3.0.3 from the website as I have to keep up to date with latest version also. This fails on the file.

The file is attached, although it now is only the headers (1st row), it is still a consistent fail on 5.3.0.3. 

ISO 8859-1 is the encoding.
Comment 1 m.a.riosv 2017-03-08 00:18:20 UTC
Seems the file opens if the file type dBASE is selected for open opening from LibreOffice, but not doing double-click on the file for open it, then text filter it's selected for open.

I have tested with some file from
https://github.com/infused/dbf/tree/master/spec/fixtures
and they open fine, so maybe something it's not right on the file.

have you tested with other dbf files?
Comment 2 Alex Thurgood 2017-03-08 08:31:52 UTC
@onyx : 
If I drag and drop this file onto a running LO5251 in OSX 10.12.3, the file is opened in Writer.

I have tested the same manner of opening with some other DBF test files, and these are opened correctly in Calc after being asked which codepage to use. These files contain more than just the column headers though.


I did the same test of your uploaded file against a running LO5162 on MAc OSX 10.12.3 and indeed, as you report, the codepage dialog is displayed, and then after choosing the codepage, the file is correctly opened in Calc.

Thus, confirming, and regression. The earliest version where I can reproduce the problem is LO5251 (so far).
Comment 3 Alex Thurgood 2017-03-08 08:35:26 UTC
Also reproduced in 

Version: 5.2.1.2
Build ID: 31dd62db80d4e60af04904455ec9c9219178d620
Threads CPU : 8; Version de l'OS :Mac OS X 10.12.3; UI Render : par défaut; 
Locale : fr-FR (fr_FR.UTF-8); Calc: group
Comment 4 Alex Thurgood 2017-03-08 08:37:09 UTC
And the problem is also present in my current master build 5400alpha
Comment 5 Alex Thurgood 2017-03-08 08:39:59 UTC
Debug info :

Process 1334 launched: '/Applications/LibreOfficeDev.app/Contents/MacOS/soffice' (x86_64)
Throwing InvalidHeaderException
Throwing InvalidHeaderException
Throwing InvalidHeaderException
Throwing InvalidHeaderException
:1: parser error : Document is empty
?
^
:1: parser error : Document is empty
?
^
:1: parser error : Document is empty
?
^
Throwing InvalidHeaderException
warn:oox.storage:1334:1:oox/source/helper/zipstorage.cxx:66: ZipStorage::ZipStorage exception opening input storage: 
warn:oox.storage:1334:1:oox/source/helper/zipstorage.cxx:66: ZipStorage::ZipStorage exception opening input storage: 
warn:oox.storage:1334:1:oox/source/helper/zipstorage.cxx:66: ZipStorage::ZipStorage exception opening input storage: 
warn:oox.storage:1334:1:oox/source/helper/zipstorage.cxx:66: ZipStorage::ZipStorage exception opening input storage: 
warn:oox.storage:1334:1:oox/source/helper/zipstorage.cxx:66: ZipStorage::ZipStorage exception opening input storage: 
warn:oox.storage:1334:1:oox/source/helper/zipstorage.cxx:66: ZipStorage::ZipStorage exception opening input storage: 
warn:oox.storage:1334:1:oox/source/helper/zipstorage.cxx:66: ZipStorage::ZipStorage exception opening input storage: 
warn:oox.storage:1334:1:oox/source/helper/zipstorage.cxx:66: ZipStorage::ZipStorage exception opening input storage: 
warn:oox.storage:1334:1:oox/source/helper/zipstorage.cxx:66: ZipStorage::ZipStorage exception opening input storage: 
warn:oox.storage:1334:1:oox/source/helper/zipstorage.cxx:66: ZipStorage::ZipStorage exception opening input storage: 
warn:oox.storage:1334:1:oox/source/helper/zipstorage.cxx:66: ZipStorage::ZipStorage exception opening input storage: 
warn:oox.storage:1334:1:oox/source/helper/zipstorage.cxx:66: ZipStorage::ZipStorage exception opening input storage: 
warn:oox.storage:1334:1:oox/source/helper/zipstorage.cxx:66: ZipStorage::ZipStorage exception opening input storage: 
warn:oox.storage:1334:1:oox/source/helper/zipstorage.cxx:66: ZipStorage::ZipStorage exception opening input storage: 
warn:oox.storage:1334:1:oox/source/helper/zipstorage.cxx:66: ZipStorage::ZipStorage exception opening input storage: 
warn:oox.storage:1334:1:oox/source/helper/zipstorage.cxx:66: ZipStorage::ZipStorage exception opening input storage: 
VisioDocument: version 0
Found xml parser severity error Document is empty

warn:unotools.config:1334:1:unotools/source/config/configitem.cxx:431: ignoring XHierarchicalNameAccess to /org.openoffice.Office.Compatibility// Exception: 
warn:unotools.config:1334:1:unotools/source/config/configitem.cxx:431: ignoring XHierarchicalNameAccess to /org.openoffice.Office.Compatibility// Exception: 
warn:legacy.osl:1334:1:sw/source/filter/ascii/parasc.cxx:273: Autodetect of text import without nag dialog must have failed
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-zu/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-lv/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-af/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-ne/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-sv/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-sl/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-ru/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-pt-PT/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-uk/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-lo/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-gl/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-hu/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-te/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-pl/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-it/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-vi/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-sw/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-no/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-sr/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-nl/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-si/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-cs/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-kmr-Latn/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-ro/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-is/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-hi/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-he/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-et/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-br/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-gu/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-sk/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-el/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-ar/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-da/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-be/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-hr/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-de/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-bs/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-gd/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-th/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-pt-BR/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-ca/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-oc/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-lt/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-bn/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-bg/META-INF/manifest.xml>
warn:desktop.deployment:1334:1:desktop/source/deployment/registry/package/dp_package.cxx:1430: cannot create UCB Content for <file:///Applications/LibreOfficeDev.app/Contents/Resources/../Resources/extensions/dict-an/META-INF/manifest.xml>
warn:sal.osl:1334:14:sal/osl/unx/socket.cxx:932: undefined address
warn:ucb.ucp.webdav:1334:14:ucb/source/ucp/webdav-neon/NeonSession.cxx:1843: Neon returned NE_ERROR, http response status code was: 0 'Could not read status line: connection was closed by server'
Comment 6 Alex Thurgood 2017-03-08 08:41:36 UTC
Seems like the parser is barfing on the input - file detection code problem ?
Comment 7 onyx 2017-03-08 08:45:53 UTC
After going back to an older version of this file, I find that all both LO versions open file as expected. The strange thing is that I used LO5.1.6.2 to remove all but the header row, and save as DBF...so obviously if there is something funky with the sample file LO is just carrying on with the funkiness.

I also know that DBF files have hidden records, those that have been deleted but not expunged. "Packing" is the standard method of removing the dead space. I don't have the necessary tools at hand to perform that on this file, but wondered if the need for packing was the cause of the issue.
Comment 8 Lionel Elie Mamane 2017-03-08 09:07:10 UTC
(In reply to Alex Thurgood from comment #6)
> Seems like the parser is barfing on the input - file detection code problem ?

Probably file type detection code, indeed. As far as Base is concerned, it accesses the file correctly (but then Base is informed beforehand it should expect a DBase file), which shows that the DBase-format reading code handles the file just fine once it is launched on it.
Comment 9 Julien Nabet 2017-06-11 11:01:32 UTC
The problem was indeed in detection part.
dbf file can indeed have no record.
I submitted a patch on gerrit for master sources:
https://gerrit.libreoffice.org/#/c/38660/
Comment 10 Michael Stahl 2017-06-12 10:57:28 UTC
yes its a regression from this commit, couldn't imagine that anybody
uses a database with 0 records:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=4e3ff19b33c84557fd20e68960499933b4e52638

thanks Julien for the patch
Comment 11 Commit Notification 2017-06-12 10:57:55 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=57ae8834c8313354477117b65d87c86407f6bf82

tdf#106423: dbase file can have no records

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 12 Commit Notification 2017-06-12 14:01:26 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d2353a5a8afa5aa0a760b0e6412c2f77aa3a6df6&h=libreoffice-5-3

tdf#106423: dbase file can have no records

It will be available in 5.3.5.

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 13 Commit Notification 2017-06-12 14:31:08 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3c453321813b538d575ce35f9e980dd7dad68679&h=libreoffice-5-4

tdf#106423: dbase file can have no records

It will be available in 5.4.0.1.

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 14 krishna [:kr1shna] 2017-07-08 13:10:54 UTC
file does not
list in libreoffice viewer file browser
open in libreoffice viewer

verified:
version: 6.0.0.0.alpha0+
Build ID: 643da8ec4e721d33dfdf8d78bedd50a915f1188d TinderBox: Android-ARM@24-Bytemark-Hosting, Branch: Master, Time: June 26, 2017 01:29:17

device: lyf flame 3 [ ls-4001 ]
os: android 5.1