Bug 114495 - CRASH: A control of tables 'grid' inside a form gives me an error
Summary: CRASH: A control of tables 'grid' inside a form gives me an error
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
5.4.3.2 release
Hardware: All All
: highest critical
Assignee: Not Assigned
URL:
Whiteboard: target:6.1.0 target:6.0.0.2 target:5.4.5
Keywords: bibisected, bisected, haveBacktrace, regression
: 106998 114089 114850 115289 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-12-16 10:20 UTC by jorojmaqui
Modified: 2020-05-13 09:07 UTC (History)
7 users (show)

See Also:
Crash report or crash signature: ["connectivity::odbc::OConnection::getOdbcFunction(ODBC3SQLFunctionId) const"]


Attachments
finca.odb + finca_sqlite.sqlite (3.73 MB, application/x-zip-compressed)
2017-12-16 10:28 UTC, jorojmaqui
Details
ERROR IN THE 1st GROUP OF TABLES (157.81 KB, application/pdf)
2017-12-20 18:04 UTC, jorojmaqui
Details
Error in Libreoffice 5.4.4.2 (665.40 KB, image/png)
2017-12-31 11:54 UTC, jorojmaqui
Details
bt with debug symbols (18.47 KB, text/plain)
2018-01-06 11:52 UTC, Julien Nabet
Details
some bts (4.98 KB, application/x-bzip)
2018-01-06 13:33 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jorojmaqui 2017-12-16 10:20:56 UTC
Description:
I am working with libreoffice and openoffice with sqlite3 odbc and I have noticed that to do a forms and within it to put a table control (grid) in libreoffice I am in the program room or it does not let me go to the registry that is not signaled and in openoffice yes .

That's why I think it could be a bug, if it's not already communicated it would be new.

I posted it in ask Libreoffice in English.

Actual Results:  
I can send you the zip file (finca.odb + sqlite file)

Expected Results:
It takes me out of libreoffice base


Reproducible: Always


User Profile Reset: Yes



Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0
Comment 1 jorojmaqui 2017-12-16 10:28:06 UTC
Created attachment 138473 [details]
finca.odb + finca_sqlite.sqlite
Comment 2 jorojmaqui 2017-12-16 10:39:28 UTC
*** Bug 106998 has been marked as a duplicate of this bug. ***
Comment 3 Robert Großkopf 2017-12-16 17:34:50 UTC
Could you please add a more simple database? 

I hoped to understand the bugdescription by downloading the attached document - but with 17 forms and 16 modules for Basic-code and a connection to SQlite I can't get any hint to understand the description better.
Comment 4 Alex Thurgood 2017-12-18 07:47:59 UTC
So, if I understand this correctly, you are expecting LibreOffice to opent the Windows registry for some reason ?


What reason might that be ?

Which ODBC driver are you using ?

How is the behaviour different with OpenOffice.org ?

Please provide detailed steps as to how to reproduce this, as currently I have no idea of what you are attempting.

Setting to NEEDINFO pending requested information. Please set back to unconfirmed once you have provided the detailed steps and setup.
Comment 5 jorojmaqui 2017-12-20 18:04:40 UTC
Created attachment 138553 [details]
ERROR IN THE 1st GROUP OF TABLES
Comment 6 jorojmaqui 2017-12-20 18:11:57 UTC
In the forms of F2_compras, F2_pagos, F3_sales, F3_cobros in the first group of tables does not allow me to move through it as I do in openoffice and sometimes I get out of the program by just activating this form, in some cases it only allows me to be in the active record and when it happens to others it leaves the program.

I use Sqlite odbc 3.15.2 + windows xp or windows 8 sp

Say that the group of tables has a calculated field of a query + 3 fields listed to obtain data from other tables.

I attached a drawing of F2_compras and the part that gives me problems.
Comment 7 jorojmaqui 2017-12-30 10:51:00 UTC
my libreoffice is 5.4.4.2 Spanish
I do not have the problem in the control table connected to sqlite 3 odbc
thanks for everything
Comment 8 Robert Großkopf 2017-12-30 16:06:42 UTC
I opened the database with disabled macros.
I could confirm a crash when starting the form F2_COMPRAS:
crashreport.libreoffice.org/stats/crash_details/0f63ba8a-525a-41c9-85d4-d9cd8d33dbfe

Sometimes the form will be opened when starting LO again, But there isn't any content shown in the form.

This crash happens with LO Version: 5.4.4.2 under OpenSUSE 42.2 64bit rpm Linux.
I got the same crash with Apache OpenOffice 4.1.3

Please show the content of your
odbc.ini
odbcinst.ini

Write down also the OpenOffice-version, which with you could connect to the database through ODBC and could open the form.

You had assigned yourself for solving this bug - think this is an error and have put it back to default.
Comment 9 Robert Großkopf 2017-12-30 16:24:22 UTC
Have tested a little bit more. Last installed version, which opens the form F2_COMPRAS without a crash and where it is possible to see data is LO 5.4.0.3 on OpenSUSE 42.2 64bit rpm Linux.

First version, which I have installed and which fails is LO 5.4.3.2

So I set this bug to NEW and Keyword "regression".

Content of odbcinst.ini here:
[SQLITE3]
Description=SQLite ODBC 3.X
Driver=/usr/lib64/libsqlite3odbc.so
Setup=/usr/lib64/libsqlite3odbc.so
Threading=2
FileUsage=1
UsageCount=1

Content of odbc.ini
[FINCA_SQLITE]
Description= FINCA Bug
Driver= SQLITE3
Database= /home/<username>/Downloads/FINCA/FINCA_SQLITE.sqlite
Comment 10 jorojmaqui 2017-12-31 11:54:43 UTC
Created attachment 138763 [details]
Error in Libreoffice 5.4.4.2

I send you an image of the error that I have
Comment 11 Robert Großkopf 2017-12-31 16:03:56 UTC
You could try to install LO 5.3.7.2 instead. Works here with the form without crash.
Let's hope it will be bibisected.
Comment 12 Robert Großkopf 2018-01-02 10:04:26 UTC
Have set Hardware back to ALL. See comment 8 and comment 9. Isn't specific to Windows. Appears also under Linux 64bit.
Comment 13 Xisco Faulí 2018-01-04 12:31:53 UTC
Regression introduced by:

author	Julien Nabet <serval2412@yahoo.fr>	2017-10-07 22:58:34 +0200
committer	Julien Nabet <serval2412@yahoo.fr>	2017-10-08 07:47:21 +0200
commit 12d5e57dcac22c288ef23075b82e3e3e87929912 (patch)
tree 40320ef42a368ab5735d99309483ca52f9d895b7
parent 4d94541a7b88b76d856e30dba7f8a3de48260eda (diff)
tdf#112947: fix write to free'd memory (odbc)

Bisected with: bibisect-linux64-6.0

Adding Cc: to Julien Nabet
Comment 14 Julien Nabet 2018-01-06 11:25:36 UTC
On pc Debian x86-64 with master sources updated some days ago, I fail to install odbc env.
Here what I did:
- installed unixodbc
- installed libsqliteodbc

/etc/odbcinst.ini contains:
[SQLITE]
Description=SQLite ODBC Driver
Driver=libsqliteodbc.so
Setup=libsqliteodbc.so
Threading=2
FileUsage=1
UsageCount=1

[SQLITE3]
Description=SQLite3 ODBC Driver
Driver=libsqlite3odbc.so
Setup=libsqlite3odbc.so
Threading=2
FileUsage=1
UsageCount=1

I can create a brand new odb and open tables of the sqllite file, so it's not a pb of drivers.

In ~/.odbc.ini, I got:
[bug_114495]
Description= FINCA Bug
Driver= SQLITE3
Database= /home/julien/lo/bugs/114495_odbcreg/FINCA_SQLITE.sqlite

Here's the error:
The connection to the data source "FINCA_SQLITE" could not be established
SQL Status: IM002

[unixODBC][Driver Manager]Data source name not found, and no default driver specified
Comment 15 Julien Nabet 2018-01-06 11:35:11 UTC
Ok I found it:
I must put in ~/.odbc.ini 
[FINCA_SQLITE]
Description= FINCA Bug
Driver= SQLITE3
Database= /home/julien/lo/bugs/114495_odbcreg/FINCA_SQLITE.sqlite
Comment 16 Julien Nabet 2018-01-06 11:52:57 UTC
Created attachment 138913 [details]
bt with debug symbols
Comment 17 Julien Nabet 2018-01-06 13:33:41 UTC
Created attachment 138915 [details]
some bts

I put a trace when connections were created and released.

I noticed one which was cleared but was used afterwards.
So I put in the tar.bz2, the 3:
- connection creating
- connection disposing
- wrong connection using

It's indeed a regression but I think too that the patch I had pushed revealed an existing bug.
Of course, it must be fixed ASAP.
Comment 18 Julien Nabet 2018-01-06 13:34:51 UTC
Lionel: thought you may be interested be interesting in this one.
Meanwhile, I'll keep on digging on this one too.
Comment 19 Julien Nabet 2018-01-06 14:44:56 UTC
I submitted a patch to review on gerrit here:
https://gerrit.libreoffice.org/#/c/47496/
Comment 20 Commit Notification 2018-01-06 18:54:17 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=89e354eff9d99d05461e2892fb1af56d186b8653

tdf#114495: fix crash in odbc resultset dtr

It will be available in 6.1.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 21 Commit Notification 2018-01-06 19:43:33 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9dfd1f62ab0cf22d1f8550f64d03bcd3b94669c0

Revert "tdf#114495: fix crash in odbc resultset dtr"

It will be available in 6.1.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 22 Xisco Faulí 2018-01-06 20:42:58 UTC
*** Bug 114850 has been marked as a duplicate of this bug. ***
Comment 23 Commit Notification 2018-01-07 07:11:33 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=964cc98794941dbf7dccce526c4fa88c16b3a26c

tdf#114495 ODBC: clear row status buffer *before* we throw away the statement

It will be available in 6.1.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 24 Commit Notification 2018-01-07 10:36:18 UTC
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=1572c3bde7fd30fc2e019ec3d7c6c629343b18e9&h=libreoffice-6-0

tdf#114495 ODBC: clear row status buffer *before* we throw away the statement

It will be available in 6.0.0.2.

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 25 Xisco Faulí 2018-01-08 10:12:50 UTC
Verified in

Version: 6.1.0.0.alpha0+
Build ID: 0ef0740298b45379bbf8d00d50beffee7a2f812a
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded

Thanks Julien for fixing this issue!
Comment 26 Xisco Faulí 2018-01-10 11:14:21 UTC
*** Bug 114089 has been marked as a duplicate of this bug. ***
Comment 27 Commit Notification 2018-01-10 14:37:20 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=1cb3e8f328dafffbe2449043894526f8d79405fb&h=libreoffice-5-4

tdf#114495 ODBC: clear row status buffer *before* we throw away the statement

It will be available in 5.4.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 28 jorojmaqui 2018-01-13 13:28:47 UTC
I have installed the libreoffice 6.0.0.2 and it is appreciated that the error is fixed

windows 8.1
sqlite odbc
Comment 29 Julien Nabet 2018-02-05 07:45:23 UTC
*** Bug 115289 has been marked as a duplicate of this bug. ***