Issue 126445 - OpenOffice crashes on 64 bit systems when it tries to open sqlite3 table created with ODBC driver
Summary: OpenOffice crashes on 64 bit systems when it tries to open sqlite3 table cre...
Status: RESOLVED FIXED
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: 4.1.1
Hardware: All All
: P2 Major (vote)
Target Milestone: 4.2.0
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: crash
: 117904 (view as issue list)
Depends on:
Blocks:
 
Reported: 2015-08-04 01:06 UTC by xanadu6291
Modified: 2017-11-19 21:31 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 4.1.4
Developer Difficulty: ---


Attachments
This is one of Ooo crash report related with the issue (73.95 KB, text/plain)
2015-08-04 01:06 UTC, xanadu6291
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description xanadu6291 2015-08-04 01:06:59 UTC
Created attachment 84853 [details]
This is one of Ooo crash report related with the issue

Base environment:
ODBC Administrator.app 1.1.0 by Apple
SQLite ODBC Driver by http://www.ch-werner.de/sqliteodbc/
(Used pre-compiled library, Version 0.93)

The Issue:
1.Using above environment, create BSAE document with ODBC connection.
2.Trial connection always success.
3.Try to open table in BSAE document.
4.Ooo always crash.

Note:
1.LibreOffice can open the same BASE document table without any problem.
2.FileMaker Pro also connect to SQLIte3 database used in above BSAE document.
So the issue is not related with Base environment.
Comment 1 Anton Schults 2015-09-08 09:49:17 UTC
Exactly the same problem under Ubuntu 14.04.

Environment: 

ODBC: libodbc.so.2.0.0
Used precompiled version of UnixODBC at www.unixodbc.org.
Also downloaded sources and succesfull compiled latest version of libraries from source.
Both had the same result

SQLiteODBC driver: libsqlite3odbc-0.9992.s0
Used precompiled version on ch-werner.de/sqliteodbc.
Also downloaded sources and succesfull compiled latest version of libraries from source.
Both had the same result

odbcinst.ini:
[SQLite3]
Description=SQLite3 ODBC Driver
Driver=libsqlite3odbc.so
Setup=libsqlite3odbc.so
UsageCount=1

[sqlite3x]
Description=new compiled
Driver=/usr/local/lib/libsqlite3odbc.so
Driver64=/usr/local/lib/libsqlite3odbc.so
Setup=/usr/local/lib/libsqlite3odbc.so
Setup64=/usr/local/lib/libsqlite3odbc.so
UsageCount=1

Can use both drivers in /.odbc.ini with the same result.

Can open, create tables, insert records, SQL select using odbinst and iusql tools, provided by UnixODBC. All works well.

OObase can open ODBC connection, show tables, make new tables but crashes as soon as a table is opened, either by clicking or making a SQL query.

A good connection between OO and SQLite would be of great use for me and many others, I think.
Comment 2 damjan 2017-11-17 04:56:18 UTC
Let me guess, your Ubuntu 14.04 was 64 bit?

The problem was that:
connectivity::odbc::OResultSet::getResultSetType()
expects a 32 bit integer, but on  64 bit systems it receives a 64 bit integer, that corrupts the next 4 bytes on the stack, resulting in:
*** stack smashing detected ***: terminated

Patch committed in r1815545. Testing shows the problem no longer occurs, tables can be opened. Resolving fixed.
Comment 3 damjan 2017-11-17 05:14:13 UTC
*** Issue 117904 has been marked as a duplicate of this issue. ***
Comment 4 Anton Schults 2017-11-19 21:31:37 UTC
(In reply to damjan from comment #2)
> Let me guess, your Ubuntu 14.04 was 64 bit?
> 
indeed, Thanks!!