Memory leak in "get property value (string)" ?

Hi,
I'm not sure which forum to post this to because it involves a combination of labview and teststand.  The error I'm getting is more teststand related so it is here.
In our application, we have a labview queued state machine launched by a teststand step using "launch vi asynchronously".  In one of the states of this state machine, we are looping grabbing frames from a camera, querying a teststand using "get property value (string)", to overylay on the video on each frame.  This is so when we post process the video, we can tell what step(s) teststand was performing (we are writing a status string to a property from teststand as well).  Since this string has to be overlayed on the video for each frame to be visible when played back, this happens many many thousands of times over the multi hour test runs of the platform.  
My problem is, after 22 hours or so of running, I get an error generated from the "get property value (string)", saying cannot create any more threads.  The only thing wired to this tool in our vi is sequence context, which is passed in when the vi is launched from teststand.  When opening the "get property value (string)" vi itself, it is very simple, consisting of a "aspropertyvalue" casting, reading of the string from the proprety, closing the aspropertyvalue reference, and exiting.  It does not seem like there should be any "threads" being created here, except for perhaps the vi itself executing. But in that case I would assume the OS itself would clean up after itself. 
BTW, the OS I am testing on is win7 x64.  I did see this though running on our xp box once as well though, same amount of time.  It is very repeatable.  My next plan is to disable this get property value using a disable case, and run again, but I"m still wondering why this error is occurring.  Any help or insight will be appreciated.
Thanks
David Jenkinson
Hi,I'm not sure which forum to post this to because it involves a combination of labview and teststand.  The error I'm getting is more teststand related so it is here.
In our application, we have a labview queued state machine launched by a teststand step using "launch vi asynchronously".  In one of the states of this state machine, we are looping grabbing frames from a camera, querying a teststand using "get property value (string)", to overylay on the video on each frame.  This is so when we post process the video, we can tell what step(s) teststand was performing (we are writing a status string to a property from teststand as well).  Since this string has to be overlayed on the video for each frame to be visible when played back, this happens many many thousands of times over the multi hour test runs of the platform.  My problem is, after 22 hours or so of running, I get an error generated from the "get property value (string)", saying cannot create any more threads.  The only thing wired to this tool in our vi is sequence context, which is passed in when the vi is launched from teststand.  When opening the "get property value (string)" vi itself, it is very simple, consisting of a "aspropertyvalue" casting, reading of the string from the proprety, closing the aspropertyvalue reference, and exiting.  It does not seem like there should be any "threads" being created here, except for perhaps the vi itself executing.  There seems to be something going on behind the scenes of this get property value tool that isn't cleaning up after itself?
BTW, the OS I am testing on is win7 x64.  I did see this though running on our xp box once as well though, same amount of time.  It is very repeatable.  My next plan is to disable this get property value using a disable case, and run again, but I"m still wondering why this error is occurring.  Any help or insight will be appreciated.
Thanks
David Jenkinson

Hi David,
Have you tried just using property node | Method Nodes instead of using the VI. There should be no difference but I think that VI is polymorphic ie the input with change depending on what's wired to it eg string, double etc.
Regards
Ray Farmer

Similar Messages

  • HibernateSystemException: exception getting property value with CGLIB

    I am getting a hibernate exception error
    HibernateSystemException: exception getting property value with CGLIB
    does anyone know what it means?

    check the setter method for the property LANG_CD in com.dst.fourx.model.codeModel.CodeGroupDisplay.
    it must be like -
    setNlsLanguage(CodesGroup xyz) { ... }
    The paremeters must be objects, not the type of the database column. We can specify the actual field in CodesGroup which acts as the foreign key in CodeGroupDisplay in the "property-ref" attribute of <many-to-one> element in the mapping file for CodeGroupDisplay.
    This worked for me. Hope it works for you too.

  • How works Get Property Value / Type Automatic?

    Hi,
    I need to get in Labview some variables from Teststand. The VI I wrote use "Get Property Value" from Teststand and works fine... when I specify the type of variable I whant from Teststand (Boolean, I32,...).
    But I need a VI which retrieve the value of my variable independently of the variable type.
    I tried to set the type option "Automatic" but the "Get Property Value" always give back an empty array of boolean....
    How works the "Automatic" option by the "Get Property Value"?
    Is there a possibility in Labview to get the type of a Teststand variable?
    Cheers,
    Risotto

    Risotto,
    the "automatic" feature is no feature but an entry made because of the
    polymorphic design of the "get property value" VI. if you would change
    the order of the VIs contained in the polymorphic VI, you would
    retrieve other kind of values.
    therefore never use the automatic setting of this VI. the
    simplest way to solve such thing is to pass the data in variant and an
    additional numeric value for identifying the type of the value.
    Norbert B.
    - NI Germany
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • ADO memory leak when getting Recordset from an Oracle stored procedure?

    I am programming in C++ (VC 6) and using ADO 2.7 to
    access Oracle 9i database. My connection string looks
    like this:
    Provider=MSDAORA.1;Persist Security Info=True;User ID=scott;Password=tiger;Data Source=blahblah
    I have Oracle stored procedure that returns data in a
    REF CURSOR output parameter. Since the stored procedure
    takes input parameters, I prepare a Command object with
    Parameters initialized and attached to it. I use the
    Recordset Open method to execute the call. This approach
    works because I get correct data back from the call in
    the Recordset, but the problem is when I do this in a
    infinite loop and watch the process in Windows Taks
    Manager, I see 4k or 8k memory delta all the time and
    the Peak Memory Usage of the process keeping going up.
    I hope someone knows something in this scenario and points
    me to the right direction.
    Thanks, please see the following code for specifics.
    HRESULT CallSP3Params(VARIANT vp1, VARIANT vp2, int spretcode, LPDISPATCH ppRSet, char *pCmdLine)
         _RecordsetPtr     pRs;
         _CommandPtr     pCmd;
         _ParameterPtr     paramVProfiler[3];
         bstrt          strMissing(L"");
         *ppRSet = NULL;
         variantt          ErrConn;
         ErrConn.vt = VT_ERROR;
         ErrConn.scode = DISP_E_PARAMNOTFOUND;
         try {
         //Create instance of command object
         pCmd.CreateInstance(__uuidof(Command));
         pRs.CreateInstance(__uuidof(Recordset));
              if ( vp1.vt == VT_BSTR ) {
                   paramVProfiler[0] = pCmd->CreateParameter("P1",adVarChar,adParamInput,SysStringLen(vp1.bstrVal) + 10,strMissing );
                   paramVProfiler[0]->Value = vp1;
              else if ( vp1.vt == VT_I4 )
                   paramVProfiler[0] = pCmd->CreateParameter("P1",adNumeric,adParamInput,15,vp1);
              else
                   TESTHR( PARAMETER_OPERATION_ERROR );
              pCmd->Parameters->Append(paramVProfiler[0]);
              if ( vp2.vt == VT_BSTR ) {
                   paramVProfiler[1] = pCmd->CreateParameter("P2",adVarChar,adParamInput,SysStringLen(vp2.bstrVal) + 10,strMissing );
                   paramVProfiler[1]->Value = vp2;
              else if ( vp2.vt == VT_I4 )
                   paramVProfiler[1] = pCmd->CreateParameter("P2",adNumeric,adParamInput,15,vp2);
              else
                   TESTHR( PARAMETER_OPERATION_ERROR );
              pCmd->Parameters->Append(paramVProfiler[1]);
              paramVProfiler[2] = pCmd->CreateParameter("RETCODE",adNumeric,adParamOutput,10);
              pCmd->Parameters->Append(paramVProfiler[2]);
         //Catch COM errors
         catch( comerror &e) {
         try {
         // I manage my connection through this little C++ class of my own
         CCUsage myconnection( &Connectionkeeper[0] );
         //Set the active connection property of command object to open connection
         pCmd->ActiveConnection = myconnection.m_conn;
         //The command type is text
         pCmd->CommandType = adCmdText;
         //Set command text to call the stored procedure
         pCmd->CommandText = pCmdLine;
         //Open the Recordset to get result
         pRs->Open( variantt((IDispatch *)pCmd,true), ErrConn, adOpenStatic, adLockReadOnly, adOptionUnspecified );
         //Disconnect the command object
         pCmd->PutRefActiveConnection( NULL );
         if ( GetSPRetCode( pCmd, "RETCODE", spretcode ) != S_OK )
              TESTHR(DB_OBJECT_OPERATION_ERROR);
         // pRs->QueryInterface(IID_IDispatch, (void**) ppRSet);
         // I return the Recordset by calling QueryInterface, but even without that, closing the Recordset right here still shows memory leak.
         pRs->Close( );
         pRs = NULL;
         //Catch COM errors
    catch (_com_error e) {
         return S_OK;
    }

    Whenever large numbers of BSTRs are allocated and freed quickly the process memory will continue to climb towards a stabalizing value. BSTRs are not freed until the system frees them. You can see this by making many calls allocating and freeing BSTRs, memory will climb, but when you stop for a while the gargage collection of the sys strings will take place. I've done much research to see that a server doing many queries very rapidly is not leaking memory, but out pacing the garbage collection, it will stabilize and when the process has some "rest time" the processes memory usage will decline.
    In my research a suspected memory leak was not one.

  • How to Get property values from Shared Object in client's load event - Very urgent

    I am using shared object to share data between two users. First user connect to shared object and set some value in shared object. Please consider that second user has not connected with the shared object yet.
    Now when second user connects to the server and try to get that property set by first user, he could get shared object but could not get properties of Shared object set by first user. I observed few times that Second user can get these properties within "Sync" event between two users. But I would like to get these values for Second user in any stage (i.e. in load event etc.). Whenever Second user tries to get the property of Shared object, the object will reset the actual property value and then return reset value.
    Anyone faced such issue while using shared object between two users. If so, I would appreciate if you could let me know your suggestions for following questions:
    1) Is there any way to get all the properties of shared object before sync event called, as I want to get it immediately when second user connect to the application and perform next task based on the values stored in shared object.
    2) Is it possible for second user to check whether any property has been set by first user? So that second user can use the property instead of reset it.
    Any kind of help would be greatly appreciated.
    Thank You.

    I am using shared object to share data between two users. First user connect to shared object and set some value in shared object. Please consider that second user has not connected with the shared object yet.
    Now when second user connects to the server and try to get that property set by first user, he could get shared object but could not get properties of Shared object set by first user. I observed few times that Second user can get these properties within "Sync" event between two users. But I would like to get these values for Second user in any stage (i.e. in load event etc.). Whenever Second user tries to get the property of Shared object, the object will reset the actual property value and then return reset value.
    Anyone faced such issue while using shared object between two users. If so, I would appreciate if you could let me know your suggestions for following questions:
    1) Is there any way to get all the properties of shared object before sync event called, as I want to get it immediately when second user connect to the application and perform next task based on the values stored in shared object.
    2) Is it possible for second user to check whether any property has been set by first user? So that second user can use the property instead of reset it.
    Any kind of help would be greatly appreciated.
    Thank You.

  • OracleBulkCopy have memory leak  if BatchSize is less than record's count.

    OracleBulkCopy::WriteToServer(IDataReader reader) have memory leak if BatchSize property is less than amount of record which were retrieved from IDataReader.
    We know workaround for that, but when this problem will be fixed?
    Code source at the bottom:
    *****************File::Program.cs*****************
    using System;
    using System.Configuration;
    using System.Data;
    using System.Diagnostics;
    using Oracle.DataAccess.Client;
    namespace WindowsApplication
    static class Program
    private static DataTable _testTable = new DataTable("TestData");
    private static int _batchSize = 10000;
    private static int _totalRecordForTest = 100000;
    private static int _bulkTimeOut = 600;
    private static string _targetConnectionString;
    private static string _targetTableName;
    /// <summary>
    /// The main entry point for the application.
    /// </summary>
    [STAThread]
    static void Main()
    _testTable.ReadXmlSchema("tmp.data.schema");
    _testTable.ReadXml("tmp.data");
    _targetConnectionString = ConfigurationManager.AppSettings["targetConnectionString"];
    _targetTableName = ConfigurationManager.AppSettings["targetTableName"];
    _batchSize = int.Parse(ConfigurationManager.AppSettings["batchSize"]);
    _totalRecordForTest = int.Parse(ConfigurationManager.AppSettings["totalRecordForTest"]);
    _bulkTimeOut = int.Parse(ConfigurationManager.AppSettings["bulkTimeOut"]);
    PerformCorrectTest();
    Console.WriteLine("Do you want to perform memory leak test?(If no then click cancel key)");
    if (Console.ReadKey().Key != ConsoleKey.Escape)
    PerformMemoryLeakTest();
    Console.ReadKey();
    _testTable =null;
    public static void PerformCorrectTest()
    Console.WriteLine("Managed memory usage: {0}, unmanaged: {1}", GC.GetTotalMemory(false),
    Process.GetCurrentProcess().WorkingSet64);
    using (VirtualSourceReader wrapper = new VirtualSourceReader(new DataTableReader(_testTable), batchSize, totalRecordForTest))
    wrapper.RowsCopied += RowsCopied;
    using (OracleConnection targetConnection = new OracleConnection(_targetConnectionString))
    targetConnection.Open();
    Console.WriteLine("Bulk insert started at {0}", DateTime.Now);
    OracleBulkCopy bc = null;
    try
    bc = new OracleBulkCopy(targetConnection)
    DestinationTableName = _targetTableName,
    BulkCopyTimeout = _bulkTimeOut,
    BatchSize = _batchSize
    do
    bc.WriteToServer(wrapper);
    } while (wrapper.ResetState());
    finally
    if (null != bc)
    bc.Close();
    bc.Dispose();
    targetConnection.Clone();
    Console.WriteLine("Bulk insert completed at {0}", DateTime.Now);
    wrapper.Close();
    Console.WriteLine("Managed memory usage: {0}, unmanaged: {1}", GC.GetTotalMemory(false),
    Process.GetCurrentProcess().WorkingSet64);
    public static void PerformMemoryLeakTest()
    Console.WriteLine("Managed memory usage: {0}, unmanaged: {1}", GC.GetTotalMemory(false),
    Process.GetCurrentProcess().WorkingSet64);
    using (VirtualSourceReader wrapper = new VirtualSourceReader(new DataTableReader(_testTable), totalRecordForTest, totalRecordForTest))
    using (OracleConnection targetConnection = new OracleConnection(_targetConnectionString))
    targetConnection.Open();
    Console.WriteLine("Bulk insert started at {0}", DateTime.Now);
    OracleBulkCopy bc = null;
    try
    bc = new OracleBulkCopy(targetConnection)
    DestinationTableName = _targetTableName,
    BulkCopyTimeout = _bulkTimeOut,
    BatchSize = _batchSize,
    NotifyAfter = _batchSize,
    bc.OracleRowsCopied += OracleRowsCopied;
    bc.WriteToServer(wrapper);
    finally
    if (null != bc)
    bc.Close();
    bc.Dispose();
    targetConnection.Clone();
    Console.WriteLine("Bulk insert completed at {0}", DateTime.Now);
    wrapper.Close();
    Console.WriteLine("Managed memory usage: {0}, unmanaged: {1}", GC.GetTotalMemory(false),
    Process.GetCurrentProcess().WorkingSet64);
    private static void RowsCopied(object sender, long eventArgs)
    Console.WriteLine("Row Processed {0}. Current time is {1}", eventArgs, DateTime.Now);
    private static void OracleRowsCopied(object sender, OracleRowsCopiedEventArgs eventArgs)
    RowsCopied(sender, eventArgs.RowsCopied);
    *****************File::SourceDataReaderWrap.cs*****************
    using System;
    using System.Collections.Generic;
    using System.Data;
    using Oracle.DataAccess.Client;
    namespace WindowsFormsApplication1
    public delegate void OnRowProcessed(object sender, long rowCount);
    public class SourceDataReaderWrap:IDataReader
    protected IDataReader _originalReader;
    protected readonly int _batchSize;
    protected int _currentSessionRows;
    protected long _rowCount;
    public event OnRowProcessed RowsCopied;
    public SourceDataReaderWrap(IDataReader originalReader, int batchSize)
    _originalReader = originalReader;
    _batchSize = batchSize;
    _rowCount = 0;
    #region Implementation of IDisposable
    /// <summary>
    /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
    /// </summary>
    /// <filterpriority>2</filterpriority>
    public void Dispose()
    _originalReader.Dispose();
    _originalReader = null;
    if (RowsCopied != null)
    foreach (OnRowProcessed @delegate in new List<Delegate>(RowsCopied.GetInvocationList()))
    RowsCopied -= @delegate;
    #endregion
    #region Implementation of IDataRecord
    /// <summary>
    /// Gets the name for the field to find.
    /// </summary>
    /// <returns>
    /// The name of the field or the empty string (""), if there is no value to return.
    /// </returns>
    /// <param name="i">The index of the field to find.
    /// </param><exception cref="T:System.IndexOutOfRangeException">The index passed was outside the range of 0 through <see cref="P:System.Data.IDataRecord.FieldCount"/>.
    /// </exception><filterpriority>2</filterpriority>
    public string GetName(int i)
    return _originalReader.GetName(i);
    /// <summary>
    /// Gets the data type information for the specified field.
    /// </summary>
    /// <returns>
    /// The data type information for the specified field.
    /// </returns>
    /// <param name="i">The index of the field to find.
    /// </param><exception cref="T:System.IndexOutOfRangeException">The index passed was outside the range of 0 through <see cref="P:System.Data.IDataRecord.FieldCount"/>.
    /// </exception><filterpriority>2</filterpriority>
    public string GetDataTypeName(int i)
    return _originalReader.GetDataTypeName(i);
    /// <summary>
    /// Gets the <see cref="T:System.Type"/> information corresponding to the type of <see cref="T:System.Object"/> that would be returned from <see cref="M:System.Data.IDataRecord.GetValue(System.Int32)"/>.
    /// </summary>
    /// <returns>
    /// The <see cref="T:System.Type"/> information corresponding to the type of <see cref="T:System.Object"/> that would be returned from <see cref="M:System.Data.IDataRecord.GetValue(System.Int32)"/>.
    /// </returns>
    /// <param name="i">The index of the field to find.
    /// </param><exception cref="T:System.IndexOutOfRangeException">The index passed was outside the range of 0 through <see cref="P:System.Data.IDataRecord.FieldCount"/>.
    /// </exception><filterpriority>2</filterpriority>
    public Type GetFieldType(int i)
    return _originalReader.GetFieldType(i);
    /// <summary>
    /// Return the value of the specified field.
    /// </summary>
    /// <returns>
    /// The <see cref="T:System.Object"/> which will contain the field value upon return.
    /// </returns>
    /// <param name="i">The index of the field to find.
    /// </param><exception cref="T:System.IndexOutOfRangeException">The index passed was outside the range of 0 through <see cref="P:System.Data.IDataRecord.FieldCount"/>.
    /// </exception><filterpriority>2</filterpriority>
    public object GetValue(int i)
    return _originalReader.GetValue(i);
    /// <summary>
    /// Gets all the attribute fields in the collection for the current record.
    /// </summary>
    /// <returns>
    /// The number of instances of <see cref="T:System.Object"/> in the array.
    /// </returns>
    /// <param name="values">An array of <see cref="T:System.Object"/> to copy the attribute fields into.
    /// </param><filterpriority>2</filterpriority>
    public int GetValues(object[] values)
    return _originalReader.GetValues(values);
    /// <summary>
    /// Return the index of the named field.
    /// </summary>
    /// <returns>
    /// The index of the named field.
    /// </returns>
    /// <param name="name">The name of the field to find.
    /// </param><filterpriority>2</filterpriority>
    public int GetOrdinal(string name)
    return _originalReader.GetOrdinal(name);
    /// <summary>
    /// Gets the value of the specified column as a Boolean.
    /// </summary>
    /// <returns>
    /// The value of the column.
    /// </returns>
    /// <param name="i">The zero-based column ordinal.
    /// </param><exception cref="T:System.IndexOutOfRangeException">The index passed was outside the range of 0 through <see cref="P:System.Data.IDataRecord.FieldCount"/>.
    /// </exception><filterpriority>2</filterpriority>
    public bool GetBoolean(int i)
    return _originalReader.GetBoolean(i);
    /// <summary>
    /// Gets the 8-bit unsigned integer value of the specified column.
    /// </summary>
    /// <returns>
    /// The 8-bit unsigned integer value of the specified column.
    /// </returns>
    /// <param name="i">The zero-based column ordinal.
    /// </param><exception cref="T:System.IndexOutOfRangeException">The index passed was outside the range of 0 through <see cref="P:System.Data.IDataRecord.FieldCount"/>.
    /// </exception><filterpriority>2</filterpriority>
    public byte GetByte(int i)
    return _originalReader.GetByte(i);
    /// <summary>
    /// Reads a stream of bytes from the specified column offset into the buffer as an array, starting at the given buffer offset.
    /// </summary>
    /// <returns>
    /// The actual number of bytes read.
    /// </returns>
    /// <param name="i">The zero-based column ordinal.
    /// </param><param name="fieldOffset">The index within the field from which to start the read operation.
    /// </param><param name="buffer">The buffer into which to read the stream of bytes.
    /// </param><param name="bufferoffset">The index for <paramref name="buffer"/> to start the read operation.
    /// </param><param name="length">The number of bytes to read.
    /// </param><exception cref="T:System.IndexOutOfRangeException">The index passed was outside the range of 0 through <see cref="P:System.Data.IDataRecord.FieldCount"/>.
    /// </exception><filterpriority>2</filterpriority>
    public long GetBytes(int i, long fieldOffset, byte[] buffer, int bufferoffset, int length)
    return _originalReader.GetBytes(i, fieldOffset, buffer, bufferoffset, length);
    /// <summary>
    /// Gets the character value of the specified column.
    /// </summary>
    /// <returns>
    /// The character value of the specified column.
    /// </returns>
    /// <param name="i">The zero-based column ordinal.
    /// </param><exception cref="T:System.IndexOutOfRangeException">The index passed was outside the range of 0 through <see cref="P:System.Data.IDataRecord.FieldCount"/>.
    /// </exception><filterpriority>2</filterpriority>
    public char GetChar(int i)
    return _originalReader.GetChar(i);
    /// <summary>
    /// Reads a stream of characters from the specified column offset into the buffer as an array, starting at the given buffer offset.
    /// </summary>
    /// <returns>
    /// The actual number of characters read.
    /// </returns>
    /// <param name="i">The zero-based column ordinal.
    /// </param><param name="fieldoffset">The index within the row from which to start the read operation.
    /// </param><param name="buffer">The buffer into which to read the stream of bytes.
    /// </param><param name="bufferoffset">The index for <paramref name="buffer"/> to start the read operation.
    /// </param><param name="length">The number of bytes to read.
    /// </param><exception cref="T:System.IndexOutOfRangeException">The index passed was outside the range of 0 through <see cref="P:System.Data.IDataRecord.FieldCount"/>.
    /// </exception><filterpriority>2</filterpriority>
    public long GetChars(int i, long fieldoffset, char[] buffer, int bufferoffset, int length)
    return _originalReader.GetChars(i, fieldoffset, buffer, bufferoffset, length);
    /// <summary>
    /// Returns the GUID value of the specified field.
    /// </summary>
    /// <returns>
    /// The GUID value of the specified field.
    /// </returns>
    /// <param name="i">The index of the field to find.
    /// </param><exception cref="T:System.IndexOutOfRangeException">The index passed was outside the range of 0 through <see cref="P:System.Data.IDataRecord.FieldCount"/>.
    /// </exception><filterpriority>2</filterpriority>
    public Guid GetGuid(int i)
    return _originalReader.GetGuid(i);
    /// <summary>
    /// Gets the 16-bit signed integer value of the specified field.
    /// </summary>
    /// <returns>
    /// The 16-bit signed integer value of the specified field.
    /// </returns>
    /// <param name="i">The index of the field to find.
    /// </param><exception cref="T:System.IndexOutOfRangeException">The index passed was outside the range of 0 through <see cref="P:System.Data.IDataRecord.FieldCount"/>.
    /// </exception><filterpriority>2</filterpriority>
    public short GetInt16(int i)
    return _originalReader.GetInt16(i);
    /// <summary>
    /// Gets the 32-bit signed integer value of the specified field.
    /// </summary>
    /// <returns>
    /// The 32-bit signed integer value of the specified field.
    /// </returns>
    /// <param name="i">The index of the field to find.
    /// </param><exception cref="T:System.IndexOutOfRangeException">The index passed was outside the range of 0 through <see cref="P:System.Data.IDataRecord.FieldCount"/>.
    /// </exception><filterpriority>2</filterpriority>
    public int GetInt32(int i)
    return _originalReader.GetInt32(i);
    /// <summary>
    /// Gets the 64-bit signed integer value of the specified field.
    /// </summary>
    /// <returns>
    /// The 64-bit signed integer value of the specified field.
    /// </returns>
    /// <param name="i">The index of the field to find.
    /// </param><exception cref="T:System.IndexOutOfRangeException">The index passed was outside the range of 0 through <see cref="P:System.Data.IDataRecord.FieldCount"/>.
    /// </exception><filterpriority>2</filterpriority>
    public long GetInt64(int i)
    return _originalReader.GetInt64(i);
    /// <summary>
    /// Gets the single-precision floating point number of the specified field.
    /// </summary>
    /// <returns>
    /// The single-precision floating point number of the specified field.
    /// </returns>
    /// <param name="i">The index of the field to find.
    /// </param><exception cref="T:System.IndexOutOfRangeException">The index passed was outside the range of 0 through <see cref="P:System.Data.IDataRecord.FieldCount"/>.
    /// </exception><filterpriority>2</filterpriority>
    public float GetFloat(int i)
    return _originalReader.GetFloat(i);
    /// <summary>
    /// Gets the double-precision floating point number of the specified field.
    /// </summary>
    /// <returns>
    /// The double-precision floating point number of the specified field.
    /// </returns>
    /// <param name="i">The index of the field to find.
    /// </param><exception cref="T:System.IndexOutOfRangeException">The index passed was outside the range of 0 through <see cref="P:System.Data.IDataRecord.FieldCount"/>.
    /// </exception><filterpriority>2</filterpriority>
    public double GetDouble(int i)
    return _originalReader.GetDouble(i);
    /// <summary>
    /// Gets the string value of the specified field.
    /// </summary>
    /// <returns>
    /// The string value of the specified field.
    /// </returns>
    /// <param name="i">The index of the field to find.
    /// </param><exception cref="T:System.IndexOutOfRangeException">The index passed was outside the range of 0 through <see cref="P:System.Data.IDataRecord.FieldCount"/>.
    /// </exception><filterpriority>2</filterpriority>
    public string GetString(int i)
    return _originalReader.GetString(i);
    /// <summary>
    /// Gets the fixed-position numeric value of the specified field.
    /// </summary>
    /// <returns>
    /// The fixed-position numeric value of the specified field.
    /// </returns>
    /// <param name="i">The index of the field to find.
    /// </param><exception cref="T:System.IndexOutOfRangeException">The index passed was outside the range of 0 through <see cref="P:System.Data.IDataRecord.FieldCount"/>.
    /// </exception><filterpriority>2</filterpriority>
    public decimal GetDecimal(int i)
    return _originalReader.GetDecimal(i);
    /// <summary>
    /// Gets the date and time data value of the specified field.
    /// </summary>
    /// <returns>
    /// The date and time data value of the specified field.
    /// </returns>
    /// <param name="i">The index of the field to find.
    /// </param><exception cref="T:System.IndexOutOfRangeException">The index passed was outside the range of 0 through <see cref="P:System.Data.IDataRecord.FieldCount"/>.
    /// </exception><filterpriority>2</filterpriority>
    public DateTime GetDateTime(int i)
    return _originalReader.GetDateTime(i);
    /// <summary>
    /// Returns an <see cref="T:System.Data.IDataReader"/> for the specified column ordinal.
    /// </summary>
    /// <returns>
    /// An <see cref="T:System.Data.IDataReader"/>.
    /// </returns>
    /// <param name="i">The index of the field to find.
    /// </param><exception cref="T:System.IndexOutOfRangeException">The index passed was outside the range of 0 through <see cref="P:System.Data.IDataRecord.FieldCount"/>.
    /// </exception><filterpriority>2</filterpriority>
    public IDataReader GetData(int i)
    return _originalReader.GetData(i);
    /// <summary>
    /// Return whether the specified field is set to null.
    /// </summary>
    /// <returns>
    /// true if the specified field is set to null; otherwise, false.
    /// </returns>
    /// <param name="i">The index of the field to find.
    /// </param><exception cref="T:System.IndexOutOfRangeException">The index passed was outside the range of 0 through <see cref="P:System.Data.IDataRecord.FieldCount"/>.
    /// </exception><filterpriority>2</filterpriority>
    public bool IsDBNull(int i)
    return _originalReader.IsDBNull(i);
    /// <summary>
    /// Gets the number of columns in the current row.
    /// </summary>
    /// <returns>
    /// When not positioned in a valid recordset, 0; otherwise, the number of columns in the current record. The default is -1.
    /// </returns>
    /// <filterpriority>2</filterpriority>
    public int FieldCount
    get { return _originalReader.FieldCount; }
    /// <summary>
    /// Gets the column located at the specified index.
    /// </summary>
    /// <returns>
    /// The column located at the specified index as an <see cref="T:System.Object"/>.
    /// </returns>
    /// <param name="i">The zero-based index of the column to get.
    /// </param><exception cref="T:System.IndexOutOfRangeException">The index passed was outside the range of 0 through <see cref="P:System.Data.IDataRecord.FieldCount"/>.
    /// </exception><filterpriority>2</filterpriority>
    object IDataRecord.this[int i]
    get { return _originalReader[i]; }
    /// <summary>
    /// Gets the column with the specified name.
    /// </summary>
    /// <returns>
    /// The column with the specified name as an <see cref="T:System.Object"/>.
    /// </returns>
    /// <param name="name">The name of the column to find.
    /// </param><exception cref="T:System.IndexOutOfRangeException">No column with the specified name was found.
    /// </exception><filterpriority>2</filterpriority>
    object IDataRecord.this[string name]
    get { return _originalReader[name]; }
    #endregion
    #region Implementation of IDataReader
    /// <summary>
    /// Closes the <see cref="T:System.Data.IDataReader"/> Object.
    /// </summary>
    /// <filterpriority>2</filterpriority>
    public void Close()
    _originalReader.Close();
    /// <summary>
    /// Returns a <see cref="T:System.Data.DataTable"/> that describes the column metadata of the <see cref="T:System.Data.IDataReader"/>.
    /// </summary>
    /// <returns>
    /// A <see cref="T:System.Data.DataTable"/> that describes the column metadata.
    /// </returns>
    /// <exception cref="T:System.InvalidOperationException">The <see cref="T:System.Data.IDataReader"/> is closed.
    /// </exception><filterpriority>2</filterpriority>
    public DataTable GetSchemaTable()
    return _originalReader.GetSchemaTable();
    /// <summary>
    /// Gets a value indicating the depth of nesting for the current row.
    /// </summary>
    /// <returns>
    /// The level of nesting.
    /// </returns>
    /// <filterpriority>2</filterpriority>
    public int Depth
    get { return _originalReader.Depth; }
    /// <summary>
    /// Gets a value indicating whether the data reader is closed.
    /// </summary>
    /// <returns>
    /// true if the data reader is closed; otherwise, false.
    /// </returns>
    /// <filterpriority>2</filterpriority>
    public bool IsClosed
    get { return _originalReader.IsClosed; }
    #endregion
    /// <summary>
    /// Advances the data reader to the next result, when reading the results of batch SQL statements.
    /// </summary>
    /// <returns>
    /// true if there are more rows; otherwise, false.
    /// </returns>
    /// <filterpriority>2</filterpriority>
    public bool NextResult()
    throw new NotImplementedException();
    /// <summary>
    /// Advances the <see cref="T:System.Data.IDataReader"/> to the next record.
    /// </summary>
    /// <returns>
    /// true if there are more rows; otherwise, false.
    /// </returns>
    /// <filterpriority>2</filterpriority>
    public virtual bool Read()
    if (_batchSize == (_currentSessionRows))
    return false;
    if(_originalReader.Read())
    _currentSessionRows++;
    _rowCount++;
    return true;
    return false;
    /// <summary>
    /// Gets the number of rows changed, inserted, or deleted by execution of the SQL statement.
    /// </summary>
    /// <returns>
    /// The number of rows changed, inserted, or deleted; 0 if no rows were affected or the statement failed; and -1 for SELECT statements.
    /// </returns>
    /// <filterpriority>2</filterpriority>
    public int RecordsAffected
    get { throw new NotImplementedException(); }
    public virtual bool ResetState()
    bool result = _currentSessionRows != 0;
    if (result && RowsCopied != null)
    RowsCopied(this, _rowCount);
    _currentSessionRows = 0;
    return result;
    public class VirtualSourceReader:SourceDataReaderWrap
    private readonly int _totalRecordCount;
    public VirtualSourceReader(IDataReader reader, int batchSize, int totalRecordCount)
    :base(reader, batchSize)
    _totalRecordCount = totalRecordCount;
    public override bool Read()
    if (_rowCount >= totalRecordCount || totalRecordCount <= 0)
    return false;
    if (_rowCount == 0)
    return base.Read();
    if (_batchSize == _currentSessionRows)
    return false;
    _currentSessionRows++;
    _rowCount++;
    return true;
    *****************File::tmp.data**********

    You have problem because the batch size property has value *10000* and amount of records(*50000*) bigger than this value.
    You can retrieve workaround from my post (OracleBulkCopy have memory leak  if BatchSize is less than record's count.

  • Version 7.3 memory leaks Windows 8 then crashes

    Hello, There are already some threads about this, but they mention Windows 7. I can confirm the memory leak (it gets up to 1.5 gb then crashes) is happening on windows 8 and windows 8.1. This issue wasn't present for skype 7.2.0.103 , it is present for 7.3 and also for 7.4.0.102 . It leaks for about 0.6MB per second , it constantly writes to disk 0.3 MB/S and uses ~12% CPU. This behavior happens only after I'm logged in. No calls, no messages, just staying logged in is sufficient. Furhtermore, the memory leaked by Skype is not returning to the system, so I end up having 75% memory used on a 16 GB machine after restarting skype several times (because it crashes and I need skype to communicate with my contacts constantly). Please provide me with a link to download 7.2 (since it works). I had this issue with Skype 7.3 and in 7.4 nothing got solved, so please give me a link to something that works rather that something that's shiny but broken. Thank you

    The memory leak is still occuring in 7.6.0+.
    Downgraded to 7.2.0.103 and it still does not prevent memory leak. Eventually it crashes around 1100MB of RAM usage on my system. Validated everything is working like directx, etc. I think this is a Microsoft Windows 8.1 bug, and not just a Skype memory leak issue, as I have seen one other application do the exact same thing (grow to 1100MB and crash). Time to go bug Microsoft for a solution... oh wait... Skype is a Microsoft product. 

  • Mdx get properties value

    Hi Expert
    I have a mdx:
    with member
    [PLANITEM].[H1].[ccc] as
    '[time].[h1].currentmember.properties("DAYS")' --->  this one cannot get property value
    member
    [PLANITEM].[H1].[aaa] as
    '[time].[h1].currentmember.properties("level")  --> this one ok .....
    What I want to get is the current month days for further calculation. In my TIME dimension already include properties("DAYS")'
    I am just can get all other PROPERTY value , EXCEPT property "DAYS" .why??
    any idea??
    Thanks..

    Go into Admin...Click on the Dimension, then do Maintain Dimension Properties....and make sure that the "InApp" box is checked next to the "DAYS" property. 
    You will need to then process the dimension since it is a structural change.  Full process.
    Please let me know if this resolves your issue.
    Greg

  • "Property value is not valid" when PropertyGridView tries to convert a string to a custom object type.

    Hi,
    I have a problem with an PropertyGrid enum property that uses a type converter.
    In general it works, but when I double clicking or using the scoll wheel,  an error message appears:
    "Property value is not valid"
    Details: "Object of type 'System.String' cannot be converted to type 'myCompany.myProject.CC_myCustomProperty."
    I noticed that the CommitValue method (in PropertyGridView.cs) tries to convert a string value to a CC_myCustomProperty object.
    Here is the code that causes the error (see line 33):
    (Using the .net symbols from the PropertyGridView.cs file)
    1
            internal bool CommitValue(GridEntry ipeCur, object value) {   
    2
    3
                Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose,  "PropertyGridView:CommitValue(" + (value==null ? "null" :value.ToString()) + ")");   
    4
    5
                int propCount = ipeCur.ChildCount;  
    6
                bool capture = Edit.HookMouseDown;  
    7
                object originalValue = null;   
    8
    9
                try {   
    10
                    originalValue = ipeCur.PropertyValue;   
    11
    12
                catch {   
    13
                    // if the getter is failing, we still want to let  
    14
                    // the set happen.  
    15
    16
    17
                try {  
    18
                    try {   
    19
                        SetFlag(FlagInPropertySet, true);   
    20
    21
                        //if this propentry is enumerable, then once a value is selected from the editor,   
    22
                        //we'll want to close the drop down (like true/false).  Otherwise, if we're  
    23
                        //working with Anchor for ex., then we should be able to select different values  
    24
                        //from the editor, without having it close every time.  
    25
                        if (ipeCur != null &&   
    26
                            ipeCur.Enumerable) {  
    27
                               CloseDropDown();   
    28
    29
    30
                        try {   
    31
                            Edit.DisableMouseHook = true;  
    32
    /*** This Step fails because the commit method is trying to convert a string to myCustom objet ***/ 
    33
                            ipeCur.PropertyValue = value;   
    34
    35
                        finally {   
    36
                            Edit.DisableMouseHook = false;  
    37
                            Edit.HookMouseDown = capture;   
    38
    39
    40
                    catch (Exception ex) {   
    41
                        SetCommitError(ERROR_THROWN);  
    42
                        ShowInvalidMessage(ipeCur.PropertyLabel, value, ex);  
    43
                        return false;  
    44
    I'm stuck.
    I was wondering is there a way to work around this? Maybe extend the string converter class to accept this?
    Thanks in advance,
    Eric

     
    Hi,
    Thank you for your post!  I would suggest posting your question in one of the MS Forums,
     MSDN Forums » Windows Forms » Windows Forms General
     located here:http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=8&SiteID=1.
    Have a great day!

  • How can I get the value of a custom property from a resource object?

    I am trying to get the value(s) of a custom property, called "status" within a method. The method has an object of type IResource available to it.
    I have tried the following:
    PropertyName propName = new PropertyName("","status");
    value = res.getProperty(propName).toString();
    However, I am getting a NullPointerException when I try to create the PropertyName instance.
    Is there a better way to get the value of a specific property from a resource object?
    Thanks,
      Tom

    Thanks Praveen.
    I was missing the default namespace of "http://sapportals.com/xmlns/cm" - I thought I could just pass an empty string for the namespace, but it looks like I must always specifiy, even if it is default.
    Tom

  • Memory leak in string class

    We have developed our application in Solaris 10 environment. While running Purify on that it shows leak in the string class. This leak is incremental and so process size keeps in increasing. If we replace string with char array, the leaks disappears and process size also becomes stable.
    Following is the snapshot of the memory leak stack reported by Purify:
    MLK: 4505 bytes leaked in 85 blocks
    * This memory was allocated from:
    malloc [rtlib.o]
    operator new(unsigned) [libCrun.so.1]
    void*operator new(unsigned) [rtlib.o]
    __rwstd::__string_ref<char,std::char_traits<char>,std::allocator<char> >*std::basic_string<char,std::char_traits<char>,std::allocator<char> >::__getRep(unsigned,unsigned) [libCstd.so.1]
    char*std::basic_string<char,std::char_traits<char>,std::allocator<char> >::replace(unsigned,unsigned,const char*,unsigned,unsigned,unsigned) [libCstd.so.1]
    std::basic_string<char,std::char_traits<char>,std::allocator<char> >&std::basic_string<char,std::char_traits<char>,std::allocator<char> >::operator=(const char*) [libCstd.so.1]
    Has anyone faced this problem earlier or is there any patch available for this?

    Over time, we have found and fixed memory leaks in the C++ runtime libraries.
    Get the latest patches for the compiler you are using. (You didn't say which one.) You can find all patches here:
    [http://developers.sun.com/sunstudio/downloads/patches/index.jsp]
    Also get the latest Solaris patch for the C++ runtime libraries, listed on the same web page.
    If that doesn't fix the problem, please file a bug report at
    [http://bugs.sun.com]
    with a test case that can be compiled and run to demonstrate the problem.

  • How to get the 'text' property value of a button in coding?

    Hi Experts,
    I'm using 10 buttons all are having common action('click'). when i click a button the 'text' value of the button should pass to a function.So the action is same but the passed value will be the 'text' value of the corresponding button.  I don't know how to get the 'text' property of a button in coding. Kindly help me to solve this problem.
    Thanks and Regards
    Basheer

    Hi,
    My event is like this.
    public void onActionclick(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
         String s =  ?  ; // should get the 'text' property of clicked button
         fillInput(s);     // function to be called
    The called function is,
    public void fillInput( java.lang.String id )
        String str=wdContext.currentContextElement().getNum();
        str = str + id;
        wdContext.currentContextElement().setNum(str);
    How can i get the 'text' property value of the corresponding button. Click action should be common to all buttons.
    Thanks and Regards,
    Basheer

  • Memory leak in String(byte[] bytes, int offset, int length)

    Has anyone run into memory leak problem using this String(byte[] bytes, int offset, int length) class? I am using it to convert byte array to string, and I am showing memory leak using this class. Any idea what is going on?

    Hi,
    If you post in Native methods forum I assume you are using this constructor in the native side.
    Be aware that getting char * from jstring eats memory that you must free before returning from native with env->ReleaseStringUTFChars().
    --Marc (http://jnative.sf.net)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Getting memory leak in OCCI

    these are the chunks from the file I made through valgrind a memory check software.
    these are the kind of leak or error you could say; that were reported by the software or a library to check memory leaks if u want i could send you the whole file please help
    ==22982== Memcheck, a memory error detector for x86-linux.
    ==22982== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward et al.
    ==22982== Using valgrind-2.2.0, a program supervision framework for x86-linux.
    ==22982== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward et al.
    ==22982== For more details, rerun with: -v
    ==22982==
    ==22982== Syscall param times(buf) contains unaddressable byte(s)
    ==22982== at 0x1E4522: times (in /lib/tls/libc-2.3.4.so)
    ==22982== by 0x1BF22146: kghinp (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
    ==22982== by 0x1BB6FBA6: kpuinit0 (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
    ==22982== by 0x1BB6EED9: kpuenvcr (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
    ==22982== Address 0x0 is not stack'd, malloc'd or (recently) free'd
    ==22982==
    ==22982== Invalid read of size 16
    ==22982== at 0x1C8E9B18: (within /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libnnz10.so)
    ==22982== Address 0x1CA35F60 is 112 bytes inside a block of size 127 alloc'd
    ==22982== at 0x1B904984: malloc (vg_replace_malloc.c:131)
    ==22982== by 0x1BE1E6B5: nlpainzert (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
    ==22982== by 0x1BE1D3B7: nlpaparse (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
    ==22982== by 0x1BE1E513: nlpardfile (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
    ==22982==
    ==22982== Use of uninitialised value of size 16
    ==22982== at 0x1C8E988E: (within /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libnnz10.so)
    ==22982== by 0x1BDC2593: ztchn (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
    ==22982== by 0x1BDC24C1: ztch (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
    ==22982== by 0x1BDC57D5: ztcrsgstk (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
    ==22982==
    ==22982== Use of uninitialised value of size 4
    ==22982== at 0x1BD79DA0: ztced_einit (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
    ==22982== by 0x1BD79EC5: ztcedgks (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
    ==22982== by 0x1BD79497: ztcedi (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
    ==22982== by 0x1BD785F7: ztcebi (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
    ==22982==
    ==22982== Conditional jump or move depends on uninitialised value(s)
    ==22982== at 0x1C83BE39: CMP_OctetStringToCMPInt (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libnnz10.so)
    ==22982== by 0x1C82E155: Alg_ComputeModQ_GHash (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libnnz10.so)
    ==22982== by 0x1C837582: A_X931RandomGenerateBytes (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libnnz10.so)
    ==22982== by 0x1BDC4DF9: ztcr2rnd (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
    ==22982==
    ==22982== Conditional jump or move depends on uninitialised value(s)
    ==22982== at 0x1BEE0BDF: kzsrepw (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
    ==22982== by 0x1BBB38B5: kpu8lgn (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
    ==22982== by 0x1BBADA00: kpuauthxa (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
    ==22982== by 0x1BBAD53E: kpuauth (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
    ==22982==
    ==22982== Use of uninitialised value of size 4
    ==22982== at 0x1BD7A382: ztceai (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
    ==22982== by 0x1BD785F7: ztcebi (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
    ==22982== by 0x1BD77EC5: ztcei (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
    ==22982== by 0x1BDC65B1: ztvo5pe (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
    ==22982== by 0x1BD77F64: ztcen (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
    ==22982==
    ==22982== Conditional jump or move depends on uninitialised value(s)
    ==22982== at 0x1BD79022: ztceb_unpadding (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
    ==22982== by 0x1BD788D4: ztcebf (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
    ==22982== by 0x1BD78010: ztcef (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
    ==22982== by 0x1BD77D07: ztcedec (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
    ==22982==
    ==22982== Mismatched free() / delete / delete []
    ==22982== at 0x1B905043: operator delete(void*) (vg_replace_malloc.c:156)
    ==22982== by 0x1B95C23C: oracle::occi::ConnectionImpl::~ConnectionImpl() (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libocci.so.10.1)
    ==22982== by 0x1B95A094: oracle::occi::EnvironmentImpl::terminateConnection(oracle::occi::Connection*) (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libocci.so.10.1)
    ==22982== by 0x8050DE4: DBConnection::CloseEnv(DBError*) (in /home/jaka/IRIS/EXE/test.exe)
    ==22982== Address 0x1CA59618 is 0 bytes inside a block of size 5 alloc'd
    ==22982== at 0x1B904D39: operator new[](unsigned) (vg_replace_malloc.c:139)
    ==22982== by 0x1B95A86E: oracle::occi::ConnectionImpl::setUserName(void*, unsigned, bool) (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libocci.so.10.1)
    ==22982== by 0x1B95B14D: oracle::occi::ConnectionImpl::openConnection(OCIEnv*, OCIError*, void*, unsigned, void*, unsigned, void*, unsigned, void*, unsigned, unsigned) (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libocci.so.10.1)
    ==22982== by 0x1B95EFB5: oracle::occi::ConnectionImpl::ConnectionImpl(oracle::occi::EnvironmentImpl*, std::string const&, std::string const&, std::string const&) (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libocci.so.10.1)
    ==22982==
    ==22982== ERROR SUMMARY: 1524 errors from 165 contexts (suppressed: 27 from 2)
    ==22982== malloc/free: in use at exit: 960761 bytes in 309 blocks.
    ==22982== malloc/free: 2699 allocs, 2390 frees, 1313176 bytes allocated.
    ==22982== For counts of detected errors, rerun with: -v
    ==22982== searching for pointers to 309 not-freed blocks.
    ==22982== checked 20880568 bytes.
    ==22982==
    ==22982== LEAK SUMMARY:
    ==22982== definitely lost: 0 bytes in 0 blocks.
    ==22982== possibly lost: 0 bytes in 0 blocks.
    ==22982== still reachable: 960561 bytes in 308 blocks.
    ==22982== suppressed: 200 bytes in 1 blocks.
    ==22982== Reachable blocks (those to which a pointer was found) are not shown.
    ==22982== To see them, rerun with: --show-reachable=yes
    now if any body can help me removing this memory leak or is this the problem of OCCI
    apparently it seems to be OCCI's library issue but i could be wrong please help
    hoping to see a response
    Message was edited by:
    kjaka

    =============================================
    #include <iostream>
    #include <string>
    #include <vector>
    #include <occi.h>
    using namespace std;
    using namespace oracle::occi;
    int main()
         Environment* env;
    env = Environment::createEnvironment(Environment::OBJECT);
         cout << "Enviorment created " << endl;
         Connection* conn;
         Statement *stmt;
         ResultSet *rs;
         vector<MetaData> vMD;
         vector<MetaData> vArgMD;
         int dataType;
         char tmpChar[1024];
         Statement::Status status;
         try
              conn = env->createConnection("iris","tpstps", "iris10gr1");
              cout << "connection created " << endl;
              stmt = conn->createStatement();
              string sStmt = "begin :1 := PKGNETWORK.spGetNetworkInfoByIP(:2, :3); end;";
              // 1st sp     
              stmt->setSQL(sStmt);
              stmt->registerOutParam(1, OCCIINT);
              stmt->setString(2,"192.168.6.12");
              stmt->setMaxParamSize(2,20);
              stmt->registerOutParam(3,OCCICURSOR);
              status = stmt->execute();
              int retVal = stmt->getInt(1);
              rs = stmt->getCursor(3);//use ResultSet to fetch rows
              vMD = rs->getColumnListMetaData();
              dataType = vMD[0].getInt(MetaData::ATTR_DATA_TYPE);
              cout << "Attribute count : " << vMD[0].getAttributeCount() << endl;
    dataType=vMD[0].getInt(MetaData::ATTR_DATA_TYPE);
    cout << "Attribute type : " << dataType << endl;
              cout << "Attribute name : " << vMD[0].getString(MetaData::ATTR_NAME)<< endl;
    cout << "Size : " << vMD.size() << endl;
    while (rs->next())
    cout << "next row";
    cout << "NetID : " << rs->getString(1).c_str() << endl;
              cout << " vector filled for SP1" << endl;
              cin >> tmpChar;
              vMD.clear();
              stmt->closeResultSet(rs);
              conn->terminateStatement(stmt);
              cout << "1st sp executed" << endl;
         // 2nd sp     
              string sStmt1 = "begin :1 := PKGJUNK.SpGetTblAccount(:2); end;";
              stmt = conn->createStatement();
              stmt->setSQL(sStmt1);
              stmt->registerOutParam(1, OCCIINT);
              stmt->registerOutParam(2,OCCICURSOR);
              status = stmt->execute();
              retVal = stmt->getInt(1);
              rs = stmt->getCursor(2);//use ResultSet to fetch rows
              int loop = 1;
              vMD = rs->getColumnListMetaData();
              dataType = vMD[0].getInt(MetaData::ATTR_DATA_TYPE);
              cout << "Attribute count : " << vMD[0].getAttributeCount() << endl;
    dataType=vMD[0].getInt(MetaData::ATTR_DATA_TYPE);
    cout << "Attribute type : " << dataType << endl;
              cout << "Attribute name : " << vMD[0].getString(MetaData::ATTR_NAME)<< endl;
    cout << "Size : " << vMD.size() << endl;
    while (rs->next())
    cout << "next row";
    cout << "NetID : " << rs->getString(1).c_str() << endl;
              stmt->closeResultSet(rs);
              cout << "2nd sp executed" << endl;
              conn->terminateStatement(stmt);
              // sp-3     
              string sStmt2 = "begin :1 := PKGONELINK.spValidateAccount(:2,:3,:4,:5,:6); end;";
              stmt = conn->createStatement();
              stmt->setSQL(sStmt2);
              stmt->registerOutParam(1, OCCIINT);
              stmt->setString(2,"37863 ");
              stmt->setMaxParamSize(2,100);
              stmt->registerOutParam(3,OCCISTRING, 20);
              stmt->registerOutParam(4,OCCISTRING, 2);
              stmt->registerOutParam(5,OCCISTRING, 3);
              stmt->registerOutParam(6,OCCISTRING, 3);
              status = stmt->execute();
              cout << "3rd sp executed" << endl;
              conn->terminateStatement(stmt);
              conn->flushCache();
              env->terminateConnection(conn);
              vMD.clear();
         cout << "Demo completed...data deleted" << endl;
              cin >> tmpChar;
         catch (SQLException &ex)
    {//cleanup
              cout << "Error, cleaning up..." << ex.getMessage() << endl;
         conn->terminateStatement(stmt);
         env->terminateConnection(conn);
         cout << "terminating env" << endl;
         Environment::terminateEnvironment(env);
    // throw;//will be caught by outer handler
         Environment::terminateEnvironment(env);
         return 0;
    ===================================================
    this is not the same program but still this program gives the same amount of memory leak, this memory leak is reported in each program that uses OCCI
    this program was made with the help of the sample program posted at the OTN website
    "Calling PLSQL functions/procedures";
    hoping for a reply soon

  • How to get the iView Property value in NWDS

    Hi all,
    I my requirement I need to get some of the iView Property Value in NWDS.
    Can anybody help me for this?
    Helpful answers will appreciate.
    Thanks & regards,
    Kathiresan R

    Steps
    1. Define the properties in portalapp.xml
    <component-profile>
    <property name="user" value="asterix">
      <property name="personalization" value="dialog"/>
      <property name="plainDescription" value="User name"/>
    </property>
    </component-profile>
    2. Within the doContent(request is a signature in doContent) method of your AbstractPortalComponent please
    add the following code to access the property:
    public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
        IPortalComponentProfile profile = request.getComponentContext().getProfile();
        String Name = profile.getProperty("user");

Maybe you are looking for

  • Service order creation based on counter reading assigned to the Ibase.

    Hi All, I've created a service contract (ZXXX) with the item category (ZIT1) of service plan. In the item category (ZIT1) definition i've copied the standard item cat. of service plan (SPLA) and assigned the standard date profile SERVPLAN to the item

  • Can't get title and time/date from appearing over photo in Develop or Library

    I must have done this when I was trying to do some other keyboard shortcut and got the wrong one - and now I can't figure out how to get rid of it. But a few weeks ago, I did something and now the file name, date/time and image size appear in white t

  • Try using IMac as local server

    Not sure if this belongs to here ... I need to set up (but would like to avoid MAMP) a local server environment for web-development purposes and learned that IMac comes with its own Apache and PHP/MySQL. I tried the last three days (after I got my br

  • Foreign Key Constraint Failure on Self-Referencing Table

    In a recent data deletion project, I ran into a problem where Oracle allowed for a record (the parent) to be deleted when there still existed a child record in the same table which referred to the parent. An abbreviated version of the table is as fol

  • Re: Any certification for OIM?

    Is it still Identity Administration and Analytics Certification(with more focus on Identity Analytics) or have we got a certification just form OIM 11G now? Thanks, SM