LibreOffice crash when entering data in MySQL database

Bug #1972820 reported by J-Paul BERARD
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LibreOffice
Incomplete
Medium
libreoffice (Ubuntu)
New
Undecided
Unassigned

Bug Description

When I try to enter a new record in a MySQL table in LO Base, the new record is accepted but Base close suddenly when I close the table.
MySQL database is connected by the direct connector (embedded).
Same kind of problem with LO 6.4

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: libreoffice 1:7.3.2-0ubuntu2
ProcVersionSignature: Ubuntu 5.15.0-27.28-generic 5.15.30
Uname: Linux 5.15.0-27-generic x86_64
ApportVersion: 2.20.11-0ubuntu82
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Tue May 10 12:29:06 2022
InstallationDate: Installed on 2020-04-10 (759 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Beta amd64 (20200402)
SourcePackage: libreoffice
UpgradeStatus: Upgraded to jammy on 2022-04-09 (30 days ago)

Revision history for this message
In , Allan Kelly (wolasallank) wrote :

Created attachment 173510
Test table use to recreate bug

When using Base (via direct connector) to scroll through a mysql table, or clicking last row, or add new row, Base crashes and starts recovery dialog.

Ubuntu: 5.8.0-59-generic #66~20.04.1-Ubuntu

Libreoffice: Version: 6.4.7.2 Build ID: 1:6.4.7-0ubuntu0.20.04.1

Connector: libreoffice-mysql-connector/focal-updates,now 1:6.4.7-0ubuntu0.20.04.1 amd64 [installed]

mysql: Ver 8.0.25-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))

Using a small test table, scrolling seems is OK up around 150 rows scrolling further crashes.

My work around at the moment is to use jdbc conector

Revision history for this message
In , julien2412 (serval2412-6) wrote :

Could you give a try to LO 7.1.4 from LO ppa (see https://launchpad.net/~libreoffice/+archive/ubuntu/ppa)?

Indeed 6.X branch is EOL and there won't be any new LO version on 7.0 branch after the released 7.0.6 version.

Revision history for this message
In , Allan Kelly (wolasallank) wrote :

I have upgraded using the PPA

LO is now
Version: 7.1.4.2 / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 12; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-GB
Ubuntu package version: 1:7.1.4~rc2-0ubuntu0.20.04.1~lo1
Calc: threaded

libreoffice-mysql-connector/focal,now 1:7.1.4~rc2-0ubuntu0.20.04.1~lo1 amd64 [installed]

Problem still occurs. Second page forward browsing the test table results in Base crashing and recovery dialog starts.

It has also introduced authentication issues for my jdbc connection so I will will have to revert to previous version as this is not a testing system.

Revision history for this message
In , Iplaw67-h (iplaw67-h) wrote :

The test SQL dump has a collation "utf8mb4_0900_ai_ci" which unfortunately fails to get imported into my version 5 server.

Revision history for this message
In , Iplaw67-h (iplaw67-h) wrote :

Copied and pasted the SQL manually and removed the collation statement via the mysql CLI.

No crash for me when scrolling through result set in Table browse mode with

Version: 7.1.4.2 / LibreOffice Community
Build ID: a529a4fab45b75fefc5b6226684193eb000654f6
CPU threads: 8; OS: Mac OS X 10.16; UI render: default; VCL: osx
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Calc: threaded

I scrolled from the first record to the last record with no crash.

This sounds like a bug that is specific to the Ubuntu version, whether it is GTK3 or some other handling error causing a crash.

Revision history for this message
In , Nv4y-robert (nv4y-robert) wrote :

Couldn't confirm the buggy behavior.

Tested with the attached table, also with a table with 8000 rows and 12 columns and a table with 30000 rows and 15 columns. Scrolled though the table to the end and back to the start. Couldn't reproduce a crash with direct connection - here to MariaDB - and LO 7.2.0.1 VCL:kf5 on OpenSUSE 15.2 64bit rpm Linux.

Think it is a special bug of Ubuntu version of LO and direct connection. Please try the packages from LO directly. You could install these packages parallel as a user-defined installation. If you need help for this: Send me a private mail.

Revision history for this message
In , Allan Kelly (wolasallank) wrote :

The problem is occurring on a system I have just migrated from Ubuntu 18.04 with mysql 5 which connected fine, to Ubuntu 20.04 with mysql 8. Mysql 8 seems less supported in 20.04. odbc and jdbc drivers are no longer in Ubuntu repositories and needed to be obtained from mysql community. Have any of these attempts to reproduce issue been against a mysql 8 server?

Revision history for this message
In , julien2412 (serval2412-6) wrote :

On pc Debian x86-64 with master sources updated today, I don't reproduce this.
However since I use MariaDB server, I couldn't create the table with utf8mb4_0900_ai_ci since I had an unknown collation error.
I used utf8mb4_general_ci instead.

Also have in mind that the native connector used by LO is in fact MariaDB not Mysql one. (mariadb-connector-c-3.1.8-src.tar.gz)

Revision history for this message
In , Allan Kelly (wolasallank) wrote :

Created attachment 178884
soffice --backtrace gdbtrace.log

Revision history for this message
In , Allan Kelly (wolasallank) wrote :

I have revisited this problem after upgrading LO to 7.1 from backports

Base still crashes when I scroll through the t_table1 table (second pgdn)

Current software releases:

Ubuntu 5.13.0-35-generic #40~20.04.1-Ubuntu

LibreOffice 7.1.7.2 10(Build:2)
libreoffice/focal-backports,now 1:7.1.7-0ubuntu0.21.04.1~bpo20.04.1 amd64 [installed]
libreoffice-mysql-connector/focal-backports,now 1:7.1.7-0ubuntu0.21.04.1~bpo20.04.1 amd64 [installed]

mysql Ver 8.0.28-0ubuntu0.20.04.3 for Linux on x86_64 ((Ubuntu))
mysql-client/focal-updates,focal-updates,focal-security,focal-security 8.0.28-0ubuntu0.20.04.3 all

Have reproduced the problem while running with --backtrace option see attached gdbtrace.log

Revision history for this message
In , Nv4y-robert (nv4y-robert) wrote :

If you are using the special Ubuntu packages for LO and the special connection to a MySQL 8.0-connection please report this bug to Ubuntu.

See https://wiki.documentfoundation.org/ReleaseNotes/6.2#Base
MySQL C++ connector has been removed and MariaDB C connector is used since LO 6.2 (LGPL).

You database is working without problems with LO directly installed from the packages of LO and MariaDB.

If the direct connector for MariaDB doesn't work well with your MySQL database please use JDBC or ODBC for the connection.
You could get the JDBC connector from here:
https://dev.mysql.com/downloads/connector/j/
You will only need mysql-connector-java-8.0.27.jar for the connection.
The driver should be added in the class path for java (directly in LO).
Connection to the driver will be set by com.mysql.cj.jdbc.Driver

Revision history for this message
In , Allan Kelly (wolasallank) wrote :

I am not using any special packages or extensions.

I am not using MariaDB, this is a mysql installation.

My understanding is that direct connection just requires installation of libreoffice-mysql-connector package.

I had problems with dependencies trying to install the ODBC Connector deb package from MySQL communities. I did not pursue.

The JDBC connector from communities is a functioning workaround, but not that easy to configure.
mysql-connector-java/now 8.0.28-1ubuntu20.04 all [installed,local]

Revision history for this message
In , Nv4y-robert (nv4y-robert) wrote :

(In reply to AJ from comment #11)
>
> My understanding is that direct connection just requires installation of
> libreoffice-mysql-connector package.

I have looked through all packages, which are part of LO. There is no package like "libreoffice-mysql-connector" part of the *.deb or *.rpm packages. The connection is included in the package for base.

Could it be you installed an old connector, which worked in versions before LO 6.2? Since LO 6.2 the connector is included and couldn't be separately installed with packages from LO.

When reading about your installation you are using special packages from Ubuntu, not from LO. Please download the packages from
https://www.libreoffice.org/download/download/
and test this packages. You will get an installation like this:
Version: 7.3.1.3 / LibreOffice Community
Build ID: a69ca51ded25f3eefd52d7bf9a5fad8c90b87951
CPU threads: 6; OS: Linux 5.3; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded

Have a look at the Build ID. This is an ID from LO. The Ubuntu packages are packed and combined by Ubuntu, not by LO.

Revision history for this message
In , Allan Kelly (wolasallank) wrote :

Sorry didn't mean to mislead about special.
All my installs have been from Ubuntu repositories.

I tried removing the libreoffice-mysql-connector package.

Base seems to connect directly successfully without it.

Still get the crash though.

This problem does not seem to be affecting any one else, I think I will park it here for he moment as I have a workaround.

I will probably be upgrading ubuntu when 22.04 releases with LO 7.2 I think and will test again.

Revision history for this message
J-Paul BERARD (arverne) wrote :
Changed in df-libreoffice:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
In , Nv4y-robert (nv4y-robert) wrote :

(In reply to AJ from comment #13)

You couldn't get it working, because the direct connection from LO is a connection to MariaDB. So newer versions of MySQL might be not supported with direct connection.

Again: JDBC connection will work. Have a look at Base Guide
https://books.libreoffice.org/en/BG73/BG7302-CreatingADatabase.html#toc9

Revision history for this message
In , J-Paul BERARD (arverne) wrote :

So, this answer is really interesting and not well documented yet.

With my LO version 7.5, when you create a new LO Base file and choose a direct connection to MySQL/MariaDB, the next dialog box offer "Using MariaDB C Connector" : so already, we understand it's more for MariaDB.
But it's not clearly written anywhere ! Even, in the webpage you report https://books.libreoffice.org/en/BG73/BG7302-CreatingADatabase.html#toc9 the direct connection to MySQL looks possible !
I will update the french documentation of Ubuntu about this issue. The Libreoffice documentation should be updated as well (by a good english writer !).
Thanks

Revision history for this message
In , julien2412 (serval2412-6) wrote :

Could you try this:
- please uninstall any LO version you got
- upgrade to Ubuntu 23.10 (or 22.04 if you want to stick to LTS)
- install LO version from https://launchpad.net/~libreoffice/+archive/ubuntu/ppa to have recent LO version
- rename your LO directory profile (see https://wiki.documentfoundation.org/QA/FirstSteps#Corrupted_user_profile)

Changed in df-libreoffice:
status: New → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.