Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4894530
Votes 2
Synopsis ResultSet.updateString("") (empty String) causes VM crash
Category jdbc:jdbc_odbc_bridge
Reported Against 1.4.2
Release Fixed
State 11-Closed, Will Not Fix, bug
Priority: 3-Medium
Related Bugs
Submit Date 22-JUL-2003
Description




FULL PRODUCT VERSION :
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)

FULL OS VERSION :
Windows XP SR-1

EXTRA RELEVANT SYSTEM CONFIGURATION :
MS ACCESS 2.0
- Table: AllPersons

if I write:
      myResultSet.updateString( 9, null); // ( FirstName, "")
instead of:
      myResultSet.updateString( 9, ""); // ( FirstName, "")
, the VM crash becomes very rare.



A DESCRIPTION OF THE PROBLEM :
The VM crashes on the last line of the code. If you want, I can send You the releavant Access-DB.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Start the program

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
New values are stored.


ERROR MESSAGES/STACK TRACES THAT OCCUR :
VM crash

ERROR MESSAGES/STACK TRACES THAT OCCUR :
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x3F1472
Function=Java_sun_jdbc_odbc_JdbcOdbc_bindColBinary+0x10B
Library=C:\j2sdk1.4.2\jre\bin\JdbcOdbc.dll

Current Java thread:
    at sun.jdbc.odbc.JdbcOdbc.bindColBinary(Native Method)
    at sun.jdbc.odbc.JdbcOdbc.SQLBindColBinary(JdbcOdbc.java:240)
    at
sun.jdbc.odbc.JdbcOdbcResultSet.bindBinaryCol(JdbcOdbcResultSet.java:5157)
    at sun.jdbc.odbc.JdbcOdbcResultSet.bindCol(JdbcOdbcResultSet.java:4893)
    at sun.jdbc.odbc.JdbcOdbcResultSet.updateRow(JdbcOdbcResultSet.java:4164)
    at
de.CoSoCo.bugs.VmCrashAfterUpdateWithResultSet.main(VmCrashAfterUpdateWithResultSet.java:39)

Dynamic libraries:
0x00400000 - 0x00406000     C:\j2sdk1.4.2\jre\bin\java.exe
0x77F40000 - 0x77FEE000     C:\WINDOWS\System32\ntdll.dll
0x77E40000 - 0x77F38000     C:\WINDOWS\system32\kernel32.dll
0x77DA0000 - 0x77E3C000     C:\WINDOWS\system32\ADVAPI32.dll
0x78000000 - 0x7807F000     C:\WINDOWS\system32\RPCRT4.dll
0x77BE0000 - 0x77C33000     C:\WINDOWS\system32\MSVCRT.dll
0x08000000 - 0x08136000     C:\j2sdk1.4.2\jre\bin\client\jvm.dll
0x77D10000 - 0x77D96000     C:\WINDOWS\system32\USER32.dll
0x77C40000 - 0x77C80000     C:\WINDOWS\system32\GDI32.dll
0x76AF0000 - 0x76B1D000     C:\WINDOWS\System32\WINMM.dll
0x5D100000 - 0x5D107000     C:\WINDOWS\System32\serwvdrv.dll
0x5B420000 - 0x5B427000     C:\WINDOWS\System32\umdmxfrm.dll
0x10000000 - 0x10007000     C:\j2sdk1.4.2\jre\bin\hpi.dll
0x00390000 - 0x0039E000     C:\j2sdk1.4.2\jre\bin\verify.dll
0x003A0000 - 0x003B8000     C:\j2sdk1.4.2\jre\bin\java.dll
0x003C0000 - 0x003CD000     C:\j2sdk1.4.2\jre\bin\zip.dll
0x003F0000 - 0x003FC000     C:\j2sdk1.4.2\jre\bin\JdbcOdbc.dll
0x1F7B0000 - 0x1F7E1000     C:\WINDOWS\System32\ODBC32.dll
0x77310000 - 0x7739B000     C:\WINDOWS\system32\COMCTL32.dll
0x76350000 - 0x76396000     C:\WINDOWS\system32\comdlg32.dll
0x772A0000 - 0x77304000     C:\WINDOWS\system32\SHLWAPI.dll
0x773A0000 - 0x77B9C000     C:\WINDOWS\system32\SHELL32.dll
0x78090000 - 0x78174000
C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.10.0_x-ww_f7fb5805\comctl32.dll
0x1F850000 - 0x1F868000     C:\WINDOWS\System32\odbcint.dll
0x1F8F0000 - 0x1F932000     C:\WINDOWS\System32\ODBCJT32.DLL
0x1B000000 - 0x1B16F000     C:\WINDOWS\System32\msjet40.dll
0x1B5C0000 - 0x1B655000     C:\WINDOWS\System32\mswstr10.dll
0x02F80000 - 0x030A1000     C:\WINDOWS\system32\ole32.dll
0x770F0000 - 0x7717B000     C:\WINDOWS\system32\OLEAUT32.dll
0x1F8E0000 - 0x1F8EF000     C:\WINDOWS\System32\odbcji32.dll
0x1B2C0000 - 0x1B2CD000     C:\WINDOWS\System32\msjter40.dll
0x1B2D0000 - 0x1B2FD000     C:\WINDOWS\System32\MSJINT40.DLL
0x76F50000 - 0x76F60000     C:\WINDOWS\System32\Secur32.dll
0x1B200000 - 0x1B267000     C:\WINDOWS\System32\msrd2x40.dll
0x76F90000 - 0x77008000     C:\WINDOWS\System32\CLBCATQ.DLL
0x77010000 - 0x770E3000     C:\WINDOWS\System32\COMRes.dll
0x77BD0000 - 0x77BD7000     C:\WINDOWS\system32\VERSION.dll
0x1B7F0000 - 0x1B82A000     C:\WINDOWS\System32\msjtes40.dll
0x0F9A0000 - 0x0F9AB000     C:\WINDOWS\System32\VBAJET32.DLL
0x0F9C0000 - 0x0FA22000     C:\WINDOWS\System32\expsrv.dll
0x76C50000 - 0x76C72000     C:\WINDOWS\system32\imagehlp.dll
0x6DA00000 - 0x6DA7D000     C:\WINDOWS\system32\DBGHELP.dll
0x76BB0000 - 0x76BBB000     C:\WINDOWS\System32\PSAPI.DLL

Heap at VM Abort:
Heap
 def new generation   total 576K, used 321K [0x10010000, 0x100b0000,
0x104f0000)
  eden space 512K,  50% used [0x10010000, 0x100505e8, 0x10090000)
  from space 64K, 100% used [0x100a0000, 0x100b0000, 0x100b0000)
  to   space 64K,   0% used [0x10090000, 0x10090000, 0x100a0000)
 tenured generation   total 1408K, used 188K [0x104f0000, 0x10650000,
0x14010000)
   the space 1408K,  13% used [0x104f0000, 0x1051f040, 0x1051f200,
0x10650000)
 compacting perm gen  total 4096K, used 1623K [0x14010000, 0x14410000,
0x18010000)
   the space 4096K,  39% used [0x14010000, 0x141a5d28, 0x141a5e00,
0x14410000)

Local Time = Fri Jul 04 00:59:59 2003
Elapsed Time = 1
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2-b28 mixed mode)
#



REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import java.sql.*;

/**
 *
 * @author  Ulf Zibis
 */
class VmCrashAfterUpdateWithResultSet_1 {
  
  /** Creates a new instance of Main */
  public VmCrashAfterUpdateWithResultSet_1() {
  }
  
  /**
   * @param args the command line arguments
   */
  public static void main(String[] args) {
    try {
      Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
//      Connection con = DriverManager.getConnection("jdbc:odbc:Test-Adressen");
      Connection con = DriverManager.getConnection(
          "jdbc:odbc:Driver={MicroSoft Access Driver(*.mdb)};"
          + "DBQ=de/CoSoCo/bugs/VmCrash-TESTADR.MDB");
      String viewName = "AllPersons";
      PreparedStatement queryAllStatement = 
          con.prepareStatement("SELECT * FROM "+viewName+" ORDER BY id",
          ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
      ResultSet rs = queryAllStatement.executeQuery();
      
      // A normal update must be executed first to reproduce the VM crash
      rs.next();
      rs.updateString( 9, "first update"); // FirstName
      rs.updateRow();
      
      rs.next();
      rs.updateString( 9, ""); // FirstName
      // rs.updateString( 9, null); // workaround
      // in next line VM crash occurs, 
      // regardless of if empty Strings are allowed in DB
      rs.updateRow();
      
    }
    catch (SQLException se) {
      System.out.println( se+", "+se.getErrorCode()+", "+se.getSQLState());
      se.printStackTrace();
    }
    catch (Throwable t) {
      System.out.println( t);
      t.printStackTrace();
    }
  }
  
}


---------- END SOURCE ----------
(Incident Review ID: 192157) 
======================================================================
Work Around
N/A
Evaluation
Will not fix. No resources at this time.

  xxxxx@xxxxx   2003-11-05
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang