LibreOffice is crashing when after searching for a record in a database form. - Open the database form - Click on the "Find Record" Icon - Dialog opens - Click in the column I want to search - Enter the search term in the text field - Press the "Find" Button The search is executed and the found record is marked with a red border. But then after some seconds the Application crashes -> Message: LibreOffice is not working anymore. Database: MySQL Driver: com.mysql.jdbc.Driver
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. (Please note that the attachment will be public, remove any sensitive information before attaching it. See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.) I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
You use an external database with JDBC-connection. Please give more information: - Which connector do you use (version of the connecor)? - Do you set parameter to the connector to autoconnect with the database if connection is lost?
Yes, it's an external database. The connector is mysql-connector-java-5.1.43-bin.jar. I didn't set a parameter for autoconnect. I don't think there isn't such a parameter for that connection. I have to mention that the form I tested first has some subforms with connections to different tables. I just tested the search function with a form without subforms on a single table and it worked without error. Then I used another form with subforms and LibreOffice crashed again.
Created attachment 142559 [details] ZIP file with database document and sql script for database Just created a sample database document and a mysql database for testing. If you open the form and search for a name, LibreOffice is crashing here.
(In reply to Pascal Becker from comment #3) > Yes, it's an external database. The connector is > mysql-connector-java-5.1.43-bin.jar. > I didn't set a parameter for autoconnect. I don't think there isn't such a > parameter for that connection. > I have tested some days ago MariaDB and 5.1.40-JDBC-connector on an external server. Test on my local systems worked, on this external server I have lost the connection very often. So I connected with this parameter: jdbc:mysql://«Host of Database»:3306/«Databasename»?autoReconnect=true (You could create this connection as "JDBC", not "MySQL" and then "JDBC") This seems to work there. Will test your problem here on my local machine.
Could confirm the database crashes immediately. Mark one field in the form. Start "Find Record". Press "Find". It is independent from external or internal server. So you could forget comment5. Tested with Version: 6.0.4.2 Build-ID: 9b0d9b32d5dcda91d2f1a96dc04c645c450872bf CPU-Threads: 4; BS: Linux 4.4; UI-Render: Standard; VCL: kde4; Gebietsschema: de-DE (de_DE.UTF-8); Calc: group
Have tested a little bit more: The bug appears in a form with a subform, when the subform doesn't show any value. If you try to look for 'Name10' there is a value in the subform. The Search-dialog doesn't crash whole LO when searching for 'Name10'.
> It is independent from external or internal server. So you could forget > comment5. > Hi robert, Thanks for investigating this. Any chance you can create a minimal HSQLDB where the issue can be reproduced?
On pc Debian x86-64 with master sources updated today, I opened the file, changed parameters so I could open the tables. Then I tried to open the form and got an error message: Statut SQL: S1009 Parameter index out of range (1 > number of parameters, which is 0). Mysql 5.6.30.1 For the rest, I don't reproduce the crash but perhaps I missed something.
I'm seeing this problem on some of my applications where I have subforms hanging of a main form. Though in my case it seems to have started with 6.1 and not 6.0.4. So might be a different problem. My application is a front end for mariadb. I've converted my application to use hsqldb and can't replicate the problem. I'm bisecting the code at the moment. Hope that will help someone.
Now confirmed that the bug I'm seeing is not the same as reported here. I will open a new ticket.
BTW. I can replicate the bug reported by Pascal Becker using the supplied code and data as seen in the attachment.
Hi Pascal I too get a crash when I search in your form. I also get a crash when I try to edit your form. Try deleting the "Bemerkung" text box to see if you get the same.
Hi Alex, just tried to delete the "Bemerkung" text box as well as the label. Worked perfectly here. When I try to use the find function afterwards, LibreOffice crashes again like before.
Does you get asked for a user and a password when editing the form ?
Yes, I do. As soon I try to open the form for editing, I get a prompt for username and password.
(In reply to Pascal Becker from comment #16) > Yes, I do. As soon I try to open the form for editing, I get a prompt for > username and password. So, how do you reproduce the crash? do you know the user and pass ? could you please share the credentials ?
(In reply to Xisco Faulí from comment #17) > (In reply to Pascal Becker from comment #16) > > Yes, I do. As soon I try to open the form for editing, I get a prompt for > > username and password. > > So, how do you reproduce the crash? do you know the user and pass ? could > you please share the credentials ? It's the username and password to access the database, not for the form itself. So the credentials depend on how you configured the database access on your database server.
@Xisco: you can change properties of connection by using menu Edition, DB, properties. You can even test the connection. If you're on Linux, to reproduce this, you must have a local Mysql server + Apache. You can also install phpmyadmin to check you can see your DB. (you'll got to fill your own credentials) Then import the sql script file with phpmyadmin (there's an import option). Finally, open the odb file and change properties to use your local server with your credentials. It's indeed more long than testing an hsqldb but once you'll got an Apache/Mysql server, it'll be quicker the next time.
Created attachment 142757 [details] gdb bt On pc Debian x86-64 with master sources updated today, I could reproduce this. First, I fixed ParameterNameSubstitution thanks to the Lionel's trick then I followed Robert's comment 6.
Created attachment 142760 [details] bt with debug symbols It seems there are 2 throws of SQLException, the first one is dealt not the second one. Here's the second one. (if I well understood)
I submitted this patch for review: https://gerrit.libreoffice.org/#/c/55836/
Julien Nabet committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=f94292e8c4d469bd3123e1649b0f2a94d4b357b3 tdf#118022: fix crash when searching record in form by handling SQLException It will be available in 6.2.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.
Julien Nabet committed a patch related to this issue. It has been pushed to "libreoffice-6-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=00d244e984589697e9f4d5743ec08e963327e3b9&h=libreoffice-6-1 tdf#118022: fix crash when searching record in form by handling SQLException It will be available in 6.1.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.
For 6.0 branch, patch waiting for review: https://gerrit.libreoffice.org/#/c/55853/
Julien Nabet committed a patch related to this issue. It has been pushed to "libreoffice-6-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=44f72ca3747deb1c8824626f216d295815b5ceff&h=libreoffice-6-0 tdf#118022: fix crash when searching record in form by handling SQLException It will be available in 6.0.6. 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.