Issue 2275 - crash on iODBC datasource when ~/.odbc.ini not present
Summary: crash on iODBC datasource when ~/.odbc.ini not present
Status: CLOSED FIXED
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: 638
Hardware: PC Linux, all
: P5 (lowest) Trivial (vote)
Target Milestone: ---
Assignee: marc.neumann
QA Contact: issues@dba
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-11-26 16:42 UTC by kbrink
Modified: 2006-05-31 14:29 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description kbrink 2001-11-26 16:42:46 UTC
I am connecting to a PostgreSQL DB on linux, using iODBC. If _only_ the
global configuration file /etc/odbc.ini exists, and not the user specific
one in ~/.odbc.ini, then browsing the tables of an ODBC datasource causes OO to
crash. If the global /etc/odbc.ini is simply copied to ~/.odbc.ini (unchanged!)
the crash no longer happens.
This appears to be a problem with iODBC, since the "odbctest" program from that
distribution cannot handle the missing ~/.odbc.ini either. Still, OO should be
able to handle this without crashing.

To reproduce:
- make sure configuration file only exists in /etc/odbc.ini, NOT ~/.odbc.ini
- in OO, choose "Tools | Data sources ..."
- click "New Data Source"
- set "Database type" -> ODBC
- for "Data source url" -> press ".." and choose an ODBC datasource
  (these are listed from the global /etc/odbc.ini)
- under the "ODBC" tab, enter the username
- click "OK" to create the datasource
- in "View | Data sources" mode, expand the new data source
- expand "Tables"

Actual result:
OO aborts with an "unrecoverable error".

Desired result:
It would be nice if OO could handle this situation gracefully, and display
an error message instead of crashing.


My environment:
---------------
OpenOffice.org build 638c
Linux kernel 2.2.19; i686 with 128 MB ram;  glibc 2.1.2 (RedHat 6.1)
PostgreSQL 7.1.3 (built under RH 6.1 from source-RPM on PostgreSQL site)
 - all 76 regression tests passed
 - odbc driver: libpsqlodbc version 0.26 (from PostgreSQL 7.1.3 distribution)
 - installed "ODBC catalog extensions" (from /usr/share/pgsql/odbc.sql)
iODBC 3.0.5 (from binary rpms on http://www.iodbc.org)
 - /usr/lib/libiodbc.so symlinked to libodbc.so
 - my /etc/odbc{,inst}.ini are available if you need them
Comment 1 dirk.grobler 2001-11-30 00:16:34 UTC
Marc,
can you reproduce this problem and if still exists forward it to Ocke?
Comment 2 marc.neumann 2001-12-03 15:43:01 UTC
fixed in 641.
Comment 3 marc.neumann 2001-12-03 15:44:02 UTC
closed
Comment 4 hans_werner67 2004-02-02 12:47:21 UTC
change subcomponent to 'none'