Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » UPP && Oracle OCCI && VC 2010
UPP && Oracle OCCI && VC 2010 [message #39303] Mon, 11 March 2013 16:33 Go to next message
wqcmaster is currently offline  wqcmaster
Messages: 37
Registered: March 2013
Member
Hello,

I've encountered serious problems with the following code under windows:

#include <Core/Core.h>
#include <occi.h>

CONSOLE_APP_MAIN
{
   std::string rs;
   {
      oracle::occi::Environment *env = oracle::occi::Environment::createEnvironment(oracle::occi::Environment::DEFAULT);
      oracle::occi::Connection* con = env->createConnection("Scott", "Tiger", 
      	"(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.1)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=test.upp)))");
      oracle::occi::Statement* stmt = con->createStatement("SELECT 'ABC' FROM DUAL");
      oracle::occi::ResultSet* rset = stmt->executeQuery();
      if (rset->next()) {
         rs = rset->getString(1);
      } // LEAVING THIS SCOPE LEADS TO ERROR!
      stmt->closeResultSet(rset);
      env->terminateConnection(con);
      oracle::occi::Environment::terminateEnvironment(env);   
   }
   if (rs.length()) {
      
   }
}


ERROR (running in debug):
index.php?t=getfile&id=4094&private=0
index.php?t=getfile&id=4095&private=0

This test-scenario only fails in debug actually; I haven't found a simple version for release mode until now.

What am I doing wrong here?
Why tries Ultimate to free memory, that the occi library created using the msvc crt??
Am I missing something? Can you give me some hints?

Kind regards
wqcmaster

P.S.: Using UPP version 5485; Visual Studio 2010; Oracle OCCI Library 11.2 with VC10
Re: UPP && Oracle OCCI && VC 2010 - SOLVED [message #39481 is a reply to message #39303] Wed, 20 March 2013 22:09 Go to previous message
wqcmaster is currently offline  wqcmaster
Messages: 37
Registered: March 2013
Member
We found the solution ourselves:

You need to disable UPP_HEAP with USEMALLOC in main package configuration and compile against the right CRT; so most likely with link mode set to "USE SHARED LIBS".

UPP_HEAP is counterproductive in this constellation of libraries (VC & OCCI) needed for this project. UPP_HEAP should most likely never interfere in allocation/deallocation process across dll boundaries.

Second problem was, that the occi library is linked against shared VC-CRT (/MD or /MDd), and UPP uses as default /MT or /MTd.
Previous Topic: A few bugs in Core/Rpc
Next Topic: Vector < Report >
Goto Forum:
  


Current Time: Thu Mar 28 16:57:49 CET 2024

Total time taken to generate the page: 0.02613 seconds