- 
    Bug 
- 
    Resolution: Done
- 
    P1: Critical 
- 
    4.7.0
- 
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
- 
        cb2a108d79b09ec6ea91106e7f33826dceac4a42
with Qt 4.7.0 I get errors when executing a Oracle stored procedure with bind variables. The same works fine for Qt 4.6.3.
Involved products: 
------------------------- 
- Database server: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
- DB-Client used for compiling Qt SQL plugin: Oracle Instant Client Release 10.2.0.3.0
- gcc for compiling Qt 4.7.0 and application: gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
Situation: 
------------ 
A simple QtGui application connects via oci Sql plugin using Oracle Instant Client to an Oracle XE database server and calls a simple stored procedure with 2 bind variables. As a result the client connection aborts with "ORA-03113: end-of-file on communication channel". When using Qt 4.6.3 instead of Qt 4.7.0 in the same constellation it works fine. 
Qt Client-Code: 
--------------------- 
QSqlQuery sqlQuery; 
QString currentVersion = "Version0815"; 
QString response; 
response.resize(200);
sqlQuery.prepare("CALL k3_check_app_version(?, ?)"); 
sqlQuery.addBindValue(currentVersion); 
sqlQuery.addBindValue(response, QSql::Out); 
// Also tried this alternative: 
//sqlQuery.bindValue(0, currentVersion); 
//sqlQuery.bindValue(1, response, QSql::Out); 
sqlQuery.exec();
The called Oracle Stored-Procedure: 
-------------------------------------------------- 
CREATE OR REPLACE PROCEDURE "KARO3"."K3_CHECK_APP_VERSION" 
(v_version IN varchar2, 
v_response OUT varchar2 
) is 
begin 
declare 
v_num number; 
begin 
if v_version IN ('1.10','1.11','1.12') then 
v_response := 'SUPPORTED'; 
else 
v_response := 'UNSUPPORTED'; 
end if; 
exception 
when others then 
v_response := 'UNSUPPORTED'; 
end; 
end; 
/ 
Oracle dump on server side: 
--------------------------------------- 
ORA-07445: exception encountered: core dump [B77FD313] [SIGSEGV] [Address not mapped to object] [0x0] 
PARSING IN CURSOR #2 len=34 dep=0 uid=37 oct=170 lid=37 tim=1255632076547037 hv=1809104850 ad='3a12cbb0' 
CALL k3_check_app_version(:f, :fb) 
END OF STMT 
PARSE #2:c=0,e=2138,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,tim=1255632076547003 
BINDS #2: 
kkscoacd 
Bind#0 
oacdty=01 mxl=32(22) mxlc=00 mal=00 scl=00 pre=00 
oacflg=01 fl2=1000000 frm=02 csi=2000 siz=2032 off=0 
kxsbbbfp=b70fc7c8 bln=32 avl=22 flg=05 
value="" 
Bind#1 
oacdty=01 mxl=2000(492) mxlc=00 mal=00 scl=00 pre=00 
oacflg=03 fl2=1000000 frm=02 csi=2000 siz=0 off=32 
kxsbbbfp=b70fc7e8 bln=2000 avl=00 flg=01 
Exception signal: 11 (SIGSEGV), code: 1 (Address not mapped to object), addr: 0x0, PC: [0xb786a313, B786A313] 
It seems that the first bind value (variable version) is not filled at all. But it also may crash for another reason (???)