Issue 924 - db browser crashes on opening the tables branch in jdbc database
Summary: db browser crashes on opening the tables branch in jdbc database
Status: CLOSED FIXED
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: 627
Hardware: PC Windows 2000
: P3 Trivial (vote)
Target Milestone: ---
Assignee: ocke.janssen
QA Contact: issues@www
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-05-20 15:02 UTC by schulten
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 schulten 2001-05-20 15:02:04 UTC
I can define a datasource for Interbase/Interclient and I can see the tables on 
the tables tab of the datasource administrator.
However, when I try to open the tables branch (by only clicking the (+) sign in 
front of tables), OOo crashes with unhandled exception in JVM.dll: Access 
violation. 
The callstack:

JVM! 504ab1c2()
JVM! 504ab002()
JVM! 504abac6()
JDBC2! JNIEnv_::CallObjectMethod(class _jobject *,struct _jmethodID *,...) + 39 
bytes
DBA627MI! 03738f6c()
DBA627MI! 036f49f0()
640372e8()
Comment 1 dirk.grobler 2001-05-21 07:53:14 UTC
Responsible engineer is Frank.
Comment 2 Frank Schönheit 2001-05-21 08:44:28 UTC
Dietrich,

could you please try to link the jdbc2.dll (and perhaps the dba.dll) with 
debug? (no need to compile it with debug, only link.)
For windows,
* delete connectivitiy/wntmsci7/misc/jdbc2.def
* go to connectivitiy/source/drivers/jdbc and "dmake debug=1"

This should give you a new jdbc2.dll, which's stack at the moment the office 
crashes should be more meaningfull (should contain method names then).

This would give us some first hints .... (though we still need to investigate 
this further.)

----
reassigned this to Ocke Janssen, 'cause the JDBC driver (and the RowSet above 
the driver) is his part.
Comment 3 schulten 2001-05-21 11:34:03 UTC
This callstack came from the debug version of my jdbc2.dll.
I also tried to link a dba627mi.dll debug version, but with this dll OOo 
crashes during startup with an Access violation in svt627mi.dll. X-(

I couldn't set breakpoints in java_sql_Driver::connect (JDriver.cxx), VCC just 
claims that several breakpoints could not be set and that's it.

X-((

Comment 4 Frank Schönheit 2001-05-21 12:29:51 UTC
I'm near to writing a bug that the sources got from OOo for SRC627 are not 
compatible with the binaries of the same version.
This really is really ... irritating.
Comment 5 schulten 2001-05-21 14:27:52 UTC
At the moment I think it's more likely that your optimizing compiler optimizes 
something which my standard vcc compiler doesn't.
I couldn't fully build 627 because my compiler stopped and complained about 
multiple symbol definition where the optimizing compiler happily grinds on.
Right now I'm downloading the latest service pack. Who knows...

On the other hand, since I have C++ Builder Enterprise and bought VCC standard 
escpecially for SO, I'm not yet ready to buy VCC pro just to see if this is the 
reason of our problem ;-))

Do you have an idea why VCC refuses to use my breakpoint? I added the 
connectivity.../drivers/jdbc path to the workspace sourcefiles. Did I forget 
anything?
Comment 6 schulten 2001-05-21 18:46:47 UTC
Good news. MySql has the same problem. I've installed mySQL, created a new 
table with one row in it, then I defined it as datasource in OOo. I can see my 
table in the administrator, but when I click the (+) in front of the tables 
icon in the browser, OOo asks me for a password and then it crashes.

AFAIR you have mySQL. You should be able to see it :-)

Dietrich
Comment 7 ocke.janssen 2001-05-22 07:10:58 UTC
Hi Dietrich,
when you want to set breakpoints in dlls which aren't loaded so far
open the settings of your VCC project. Under debug you can select
the dlls which should be loaded. Then the breakpoints should work.

Regards,
Ocke
Comment 8 Frank Schönheit 2001-05-22 07:25:11 UTC
Dietrich,

for the breakpoints: If you did not access a lib, yet, you can't set 
breakpoints. In this case you need to preload it as Ocke described.

If you already accessed the lib but can't set the breakpoints anyway, this 
is ... strange.
One reason might be that there is a conflict in the source file names (VC 
sometimes is confused if two files compiled with debug info have the same 
name), but this shouldn't apply to you (the names in drivers/jdbc are rather 
unique).
In addtition, you might want to check where the jdbc2.pdb file (generated while 
compiling/linking) is located. I'm not completely sure, where VC looks for this 
file containing additional debug info, but personally I prefer to copy it into 
the officce/program directory, just to be sure ...
Comment 9 schulten 2001-05-22 08:25:39 UTC
Maybe I have some news on incompatibility between 627 binaries and sources: 
When I use my new optimizing compiler that came with the servicepack, OO no 
longer crashes during startup with a debug version of dba627mi.dll. 
Now when I try to open the datasource administrator, I get 
com.sun.star.sdb.DatabaseContext could not be loaded and an empty administrator 
appears. This could point to an incompatibility between sources and binaries, 
don't you think? Pressing F4 crashes OOo, maybe the db browser doesn't expect 
that there can be no db context.

There is still something wrong with my breakpoints. I have the dlls 
dba627mi.dll and jdbc2.dlls in additional dlls, I have the 
connectivity/source/inc directory in Extras-Optionen-Verzeichnisse-Includefiles 
and likewise I have connectivity/source/drivers/jdbc in Extras-Optionen-
Verzeichnisse-Quellcodedateien.
I've also added the files from connectivity/source/drivers/jdbc to the project. 
I admit this is clearly VCC support, but maybe you know something obvious I 
don't.

Comment 10 schulten 2001-05-28 16:29:00 UTC
Here is my current state:

OOo crashes with mySQL JDBC (mmmySQL) and Interbase JDBC (Interclient 1.6) when 
I do the following:
-Press F4
-Open Datasource
-Click (+) sign in front of table
-Enter password and hit OK.

- I've used the fixed (string handling) jdbc2.dll in two versions, that is, 
built by:
VCC 6
VCC 6, SP 5

- I've used them both in the context of the original binaries from the OOo 
website -> crash
- I've used the jdbc2.dll built by VCC6, SP5 in the context of binaries built 
with VCC6, SP5 (my own build) -> crash

Can you reproduce this problem in your environment, with whatever build you are 
working on? Can your QA reproduce the problem with a 627 installation and a 
jdbc2.dll containing the fixes?

If everything works OK for you, I'll go back to VCC, SP3 and build OOo again. 
But if you can see the problem, I need not go through all that again.
Comment 11 ocke.janssen 2001-05-31 10:00:46 UTC
Hi Dietrich,

there where serveral problems with the jdbc driver of OO. Some calls
to the JNI were simply wrong. (It seems to be CUT&PASTE bugs :-)

When you want to you may have a look at the changes done in the jdbc driver.
I changed many files but the main files should be 
DatabaseMetaData.cxx,
ResultSetMetaData.cxx
and ResultSet.cxx

I hope that I missed nothing :-)

Regards,
Ocke

PS: I just haven't tried it with InterBase only with mysql
Comment 12 ocke.janssen 2001-10-26 15:23:19 UTC
Hi Dietrich,
now I test it with interbase and it works. When you would like to try
it yourself you need simply all files in the jdbc folder.

regards,
Ocke
Comment 13 marc.neumann 2003-03-21 09:27:39 UTC
close
Comment 14 hans_werner67 2004-02-02 13:05:09 UTC
change subcomponent to 'none'