Home » Developer & Programmer » Precompilers, OCI & OCCI » Problem with C++ STL string, getString() and VARCHAR...
Problem with C++ STL string, getString() and VARCHAR... [message #254245] Thu, 26 July 2007 05:04 Go to next message
Messages: 1
Registered: July 2007
Location: ITALY
Junior Member
I've an incredible problem with memory when I try to extract a string from Oracle by means of OCCI.

The problem occurs when the method ends. Example:

void function(){
string _str;
//... the connection...
//... the executeQuery...


//... It's ok.
//...close result set and other...


...but when the method ends, the runtime language crashes because it doesn't can free the string object (_str).
This problem doesn't occour with CHAR type (in the DB). Only with VARCHAR.

The stack trace is:

*** glibc detected *** /home/marco/workspace2/Runtime/bin/ConfMgr: munmap_chunk(): invalid pointer: 0x08099dc0 ***
======= Backtrace: =========

In the debug mode I can see that is the free of _str that produces the problem.

The Environment is GCC 4.1.2, Eclipse CDT and OCCI for Oracle 10.1.2

Re: Problem with C++ STL string, getString() and VARCHAR... [message #273086 is a reply to message #254245] Tue, 09 October 2007 01:25 Go to previous message
Messages: 28
Registered: July 2005
Junior Member
OCCI 10.1 is not supported with gcc4.1. You can try 10.2 OCCI libraries which support gcc4.
Previous Topic: lclntst10 not found error
Next Topic: Unicode Support - CreateEnvironment
Goto Forum:

Current Time: Wed Jan 20 14:43:09 CST 2021