Issue 118846 - ODBC connection crash AOO
Summary: ODBC connection crash AOO
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: 3.4.0
Hardware: PC All
: P2 Major (vote)
Target Milestone: ---
Assignee: r4zoli
QA Contact:
Keywords: regression, release_blocker
: 119409 (view as issue list)
Depends on:
Reported: 2012-01-29 12:20 UTC by r4zoli
Modified: 2012-05-30 15:01 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---
rbircher: 3.4_release_blocker+


Note You need to log in before you can comment on or make changes to this issue.
Description r4zoli 2012-01-29 12:20:28 UTC
Open any existing database under win7(I tested only under this) with AOO 3.4 build version 1234077, click on Table pane, add your user password, AOO crash imediately.

I tested with postgres 9.1, mysql 5.5, sqlite, firebird 2.5 through ODBC connection. 

Same crash when you try to create new odb file to ODBC connected.
Not happens with OOo 3.4 Beta, regression, release blocker.  

No crash with JDBC connections, or native drivers(postgresql, and mysql).
Comment 1 r4zoli 2012-02-06 14:51:29 UTC
Change version to AOO340-dev.
Comment 2 Mechtilde 2012-02-26 13:59:24 UTC
I can confirm that there are problems with the odbc connection and mysql. I tested it under Debian 64 bit

I installed the ODBC-driber as I published myself some years ago.

It works with the version of 3.4 beta but NOT with the apache version from 29.01.2012

So I can also confirm the regression
Comment 3 Raphael Bircher 2012-02-26 14:12:16 UTC
Add myself to CC
Comment 4 zhao xia 2012-02-27 05:30:31 UTC
3.4 Regression and blocker, I comfirm I can reporudce as well.
Comment 5 Oliver-Rainer Wittmann 2012-03-01 10:17:26 UTC
I want to have a developer look at this issue.
As I am not very familiar with our database module, I need same help:
I have no database at hand. Thus, I would like to use the given use case with a newly created odb file to debug this issue. But, I do not know how a get such a database ODBC connected in our office. Can somebody help me? Thx in advance.
Comment 6 r4zoli 2012-03-01 14:12:18 UTC
A short description how to create ODBC connection to MySQL on localhost server.
First download and install MySQL any version 5.1 or 5.5.
Then download ODBC driver.
Set ODBC connection in Windows control panel, admin tools, data sources.
Open any older version of OOo, create new database, with third option, connecting existing database. Save file.
Instructions, on OOo wiki:

Open same file in AOO 3.4m1, crash.
Comment 7 Olaf Felka 2012-03-07 09:56:29 UTC
Comment 8 Oliver-Rainer Wittmann 2012-03-07 12:27:12 UTC
Ok, now I have time to setup the corresponding environment in order to reproduce this defect and to perform a deeper investigation
Comment 9 Oliver-Rainer Wittmann 2012-03-07 15:58:09 UTC
That was hard work to find out which combinations of MySQL Server and MySQL connector ODBC are needed for my system (Windows 7 Pro, 64bit) to create such a test database document.
I needed the following:
- MySQL Community Server 5.5 (Windows, x86, 64bit)
- MySQL Connector/ODBC (Windows, x84, 64bit)
- MySQL Connector/ODBC (Windows, x84, 32bit)

Now the debugging of the crash can begin.

I can confirm that the defect occurs with AOO 3.4, rev. 1296433, but _not_ with OOo 3.3 and OOo 3.4 Beta
Comment 10 Oliver-Rainer Wittmann 2012-03-08 13:29:49 UTC
So far I have figured out that the stack memory is somehow destroyed on a certain ODBC method call under Windows.

Can someone please check, if this issue also occurs under other platforms - e.g. MacOS X, Linux? Thanks in advance.
Comment 11 Oliver-Rainer Wittmann 2012-03-09 10:16:25 UTC
root cause:
calling convention wrong when calling ODBC functions

changed files:
- main/unixODBC/iodbcunix.h, revision 1298779

Who can verify the fix in the next developer snapshots?
Comment 12 r4zoli 2012-03-09 10:47:39 UTC
I will check it on win7.
Comment 13 Oliver-Rainer Wittmann 2012-03-09 12:21:49 UTC
@r4zoli: That is great. Thx.

Thus, I am assigning this issue to you for the verfication.

May be there are also the one or the other who can check the other Windows platforms.
Comment 14 Mechtilde 2012-03-09 12:31:04 UTC
can you give me a hint where I can find the next developer snapshot?

then I will test it under Debian 64 bit
Comment 15 Oliver-Rainer Wittmann 2012-03-09 13:54:44 UTC
We start a build of our developer snapshots each week. The corresponding revision is announced on ooo-dev mailing list. The installation sets are uploaded by the corresponding volunteers during the week and can be found at
Comment 16 Oliver-Rainer Wittmann 2012-03-09 13:56:22 UTC
One request - can please check in advance of the next developer snapshot builds, if the issue occurs under Debian 64 bit. That would be great.
The fix I have made - kudos were going to hdu - are only for Windows.
Comment 17 r4zoli 2012-03-13 16:04:28 UTC
I verified the fix in AOO Developer version r1299571.
No crash, I can connect to: postgresql 9.1, MySQL 5.1, 5.5, Firebird 2.5, and SQLite 3.3 databases through ODBC connection, under win7.
Comment 18 Oliver-Rainer Wittmann 2012-03-15 11:15:12 UTC
Thanks for the testing.
Closing issue.
Comment 19 2012-05-30 15:01:32 UTC
*** Issue 119409 has been marked as a duplicate of this issue. ***