Suspected memory leak in numbers

Dear All!
I am facing a problem in Numbers, which seems to me a memory leak issue.
The original problem occurred when I tried to process a data set consisting of 6 tables of 6 columns by 600-800 rows. A scatterplot with 6 series has been created using 2 selected columns of each table. The "your startup disk is almost full" was first symptom when I realiser that something is going wrong. I traced back using activity monitor that when I edit the spreadsheet the memory fills up rapidly. Once the memory is full the program starts to use up the swap area. I my case I have about 20 GB empty SSD space. After a few hours of work on this table the entire memory and the SSD was filled up.
To check whether the file is corrupted or something else issuing on I made a mock file to test the behaviour. I could produce the same response with a single table of 2 columns and 3000  rows of random numbers and a scatter plot of the this pairs of numbers.
Originally I have faced the problem on a mid 2014 MBP running OS 10.10.3 (i5, 8GB, 128GB SSD) but I have carried out the mock data experiment also on a  2014 MBA OS10.10.2 (i5, 8GB, 128GB SSD) and I have experienced that the memory usage keeps on increasing as I roll up and down in the table, just like on my MBP and in case of the original file. During the few minutes of the test on the MBA the memory usage of the Numbers application indicated in Activity Monitor shoot up from 70Mb to over 1GB and kept on increasing with every operation carried out in numbers, regardless the type of the operation. In this sense there was no difference whether it was rolling the sheet or saving the file. 
The extra applications that are installed on both computers: Latex, and Parallels (but non of them were running during the tests)
On my MBP I ran a leak command in terminal for the  Numbers and got the following result.
Last login: Thu Apr 16 14:03:17 on ttys000
Peters-MacBook-Pro:~ xxxxxxxx$ leaks 5743 --nocontext
Process:         Numbers [5743]
Path:            /Applications/Numbers.app/Contents/MacOS/Numbers
Load Address:    0x102553000
Identifier:      com.apple.iWork.Numbers
Version:         3.5.2 (2118)
Build Info:      Numbers-2118000000000000~1
Code Type:       X86-64
Parent Process:  ??? [1]
Date/Time:       2015-04-16 14:13:01.457 +0200
OS Version:      Mac OS X 10.10.3 (14D131)
Report Version:  7
Analysis Tool:   /usr/bin/leaks
leaks Report Version:  2.0
Process 5743: 1320819 nodes malloced for 996727 KB
Process 5743: 158802 leaks for 871233088 total leaked bytes.
I have searched similar issues on the net and on the community sites but unfortunately could not find any relevant information.
Any help or suggestion would be highly appreciated.

Dear Wayne,
Thanks for your suggestions, I will definitely make a bug report. In fact I have already tried it through apples homepage, and I wanted to make a more specific one but to do so you have to become a developer... which would be a really bad joke. 
However I did the mock experiment with 700 lines of random data in 2 columns and a scatter plot of the 700 points. The same happens. The memory usage of Numbers went up to 1.63GB... even higher since I have checked.
To answer your questions I have MBP 128 GB SSD of which 20 GB is free, RAM: 8GB
You see... my original problematic dataset consisting of 6 times 500-800 points has been plotted in a fraction of a second, handled as easy as in Excel, LibreOffice or Gnumeric (which are not intended for handling a lot of data; for that purpose I use Matlab or Python). So without any complains or extra effort my data points are plotted beautifully (as lines with no markers to keep the plot clear), but the memory is gradually filled up...
I am not sure it is the right approach to  reduce the use of Numbers for very tiny datasets. This would mean that you were unable to make a chart for two years of data of precipitation or temperature or stock value or anything... sounds very unlikely. It sounds like you have a nice car that can go 280 km/h and reach 100 km/h in 4s, with the only the restriction that wheels are designed to fall off at 30 km/h without warning! I don't think that is the case. Would be very unbalanced performance.
Many thanks again. I'll go and make my bug report to get the wheels reinforced .
Peter

Similar Messages

  • Com.mysql.jdbc.JDBC4Connection suspected memory leak in java

    We have a java application where we are using Bonecp pooling library. Below is how we setup the pooling.
    [code]
    try {
       // setup the connection pool
       BoneCPConfig config = new BoneCPConfig();
      config.setJdbcUrl("jdbc:mysql://**.**.**.**:3306/test1");  config.setUsername("******");
      config.setPassword("*******");  config.setMinConnectionsPerPartition(5);
      config.setMaxConnectionsPerPartition(40);
      config.setPartitionCount(1);
      connectionPool = new BoneCP(config); // setup the connection pool 
       catch (SQLException e) {
      e.printStackTrace(System.out);
    [/code]
    Then for insert and update queries we do this and below we make sure closed the statement.
    [code]
    Statement stmt1 = null;
    stmt1 = dbconn.createStatement();
    String insertQuery3 =........
    count = stmt9.executeUpdate(insertQuery3);
    try{
       if ( stmt1!= null ){  stmt1.close();
       else{
       System.out.println("No stm1 exist");
    }catch(SQLException ex){   System.out.println("SQLException has been caught for stmt1");
    ex.printStackTrace(System.out);
    For select we do this 
    Statement stmt2 = null;
    stmt2 = dbconn.createStatement();
    String selectQuery2= .........
    ResultSet rs2 = stmt2.executeQuery(selectQuery2);
    if(rs2.next())
    try{
       if ( rs2!= null ){  rs2.close();
       }   else{
       System.out.println("No rs2 exist");
       if ( stmt2!= null ){  stmt2.close();
       }   else{
       System.out.println("No stm2 exist");
    }catch(SQLException ex){   System.out.println("SQLException has been caught for stmt2");
    ex.printStackTrace(System.out);
    [/code]
    Thus we have ensured that every resultset and statement is closed immediately after its use. The problem now when we took few sample from MAT is show increasing memory usage as below.
    Sample 1
    [code]
    21 instances of "com.mysql.jdbc.JDBC4Connection", loaded by "sun.misc.Launcher$ExtClassLoader @ 0xf000a4f0" occupy 11,793,200 (76.19%) bytes.
    Biggest instances:
    com.mysql.jdbc.JDBC4Connection @ 0xf016d728 - 958,096 (6.19%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf0094478 - 875,568 (5.66%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf0201ba0 - 816,048 (5.27%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf04ab3f0 - 754,016 (4.87%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf006ee40 - 727,024 (4.70%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf0076a90 - 663,872 (4.29%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf04ad490 - 618,200 (3.99%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf00b7bd0 - 616,608 (3.98%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf0467bc0 - 612,544 (3.96%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf015fcf0 - 598,400 (3.87%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf021c830 - 584,992 (3.78%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf0097818 - 561,224 (3.63%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf01a27c0 - 531,816 (3.44%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf00bea28 - 531,416 (3.43%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf01c2d80 - 522,184 (3.37%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf04693e0 - 482,992 (3.12%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf012b158 - 453,256 (2.93%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf147f438 - 424,656 (2.74%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf15ff7d0 - 187,008 (1.21%) bytes.
    Keywords
    com.mysql.jdbc.JDBC4Connection
    sun.misc.Launcher$ExtClassLoader @ 0xf000a4f0
    file:///C:/Documents%20and%20Settings/ss/Local%20Settings/Temp/report2060944296830228239/pages/18.html# Reference Pattern
    Class Name
    Shallow Heap
    Retained Heap
    Percentage
    class java.lang.Thread @ 0xf0003840
    40
    208
    0.00%
    [/code]
    Sample 2
    [code]
    21 instances of "com.mysql.jdbc.JDBC4Connection", loaded by "sun.misc.Launcher$ExtClassLoader @ 0xf000a4f0" occupy 13,827,392 (78.27%) bytes.
    Biggest instances:
    com.mysql.jdbc.JDBC4Connection @ 0xf016d728 - 1,093,888 (6.19%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf0094478 - 957,888 (5.42%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf0201ba0 - 916,672 (5.19%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf04ab3f0 - 878,392 (4.97%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf006ee40 - 841,136 (4.76%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf015fcf0 - 758,336 (4.29%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf04ad490 - 747,240 (4.23%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf0076a90 - 735,712 (4.16%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf00b7bd0 - 700,912 (3.97%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf0467bc0 - 681,336 (3.86%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf00bea28 - 668,080 (3.78%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf021c830 - 658,816 (3.73%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf0097818 - 638,208 (3.61%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf01a27c0 - 605,376 (3.43%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf01c2d80 - 582,104 (3.29%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf04693e0 - 558,344 (3.16%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf147f438 - 523,952 (2.97%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf012b158 - 508,232 (2.88%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf1603618 - 276,944 (1.57%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf15ff7d0 - 275,288 (1.56%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf148fd70 - 220,536 (1.25%) bytes.
    Keywords
    com.mysql.jdbc.JDBC4Connection
    sun.misc.Launcher$ExtClassLoader @ 0xf000a4f0
    file:///C:/Documents%20and%20Settings/ss/Local%20Settings/Temp/report8548522855535006676/pages/18.html# Reference Pattern
    Class Name
    Shallow Heap
    Retained Heap
    Percentage
    class java.lang.Thread @ 0xf0003840
    40
    208
    0.00%
    [/code]
    Sample 3
    [code]
    21 instances of "com.mysql.jdbc.JDBC4Connection", loaded by "sun.misc.Launcher$ExtClassLoader @ 0xf000a4f0" occupy 17,339,632 (80.79%) bytes.
    Biggest instances:
    com.mysql.jdbc.JDBC4Connection @ 0xf016d728 - 1,228,048 (5.72%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf0094478 - 1,144,056 (5.33%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf0201ba0 - 1,126,120 (5.25%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf04ab3f0 - 1,074,552 (5.01%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf006ee40 - 993,912 (4.63%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf0076a90 - 931,512 (4.34%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf015fcf0 - 930,952 (4.34%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf04ad490 - 918,176 (4.28%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf00bea28 - 874,512 (4.07%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf0467bc0 - 846,368 (3.94%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf00b7bd0 - 838,448 (3.91%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf021c830 - 799,184 (3.72%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf0097818 - 791,256 (3.69%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf01a27c0 - 763,264 (3.56%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf01c2d80 - 745,088 (3.47%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf012b158 - 710,704 (3.31%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf04693e0 - 704,072 (3.28%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf147f438 - 680,400 (3.17%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf1603618 - 458,472 (2.14%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf148fd70 - 390,984 (1.82%) bytes.
    com.mysql.jdbc.JDBC4Connection @ 0xf15ff7d0 - 389,552 (1.82%) bytes.
    Keywords
    com.mysql.jdbc.JDBC4Connection
    sun.misc.Launcher$ExtClassLoader @ 0xf000a4f0
    file:///C:/Documents%20and%20Settings/ss/Local%20Settings/Temp/report3656754586920669017/pages/18.html# Reference Pattern
    Class Name
    Shallow Heap
    Retained Heap
    Percentage
    class java.lang.Thread @ 0xf0003840
    40
    208
    0.00%
    [/code]

    Dear Masijade,
                          Actually I was confuse with where to put and not to put the try and catch. Below is how my skeleton of my codes will be looking like. I just put one sample query there. If you notice at the very end finally I already have even now dbconn.close(); which closes the pooling connection. The problem  I am worried now is that incase there is any exception how will it be rollbacked. Because if you notice now I lump all the queries under one big try and catch but with your suggestion I have to do try and catch for each query right?
    [code]
    BoneCP connectionPool = null;
      class ConnectionHandler implements Runnable {
        private Socket receivedSocketConn1;
        ConnectionHandler(Socket receivedSocketConn1) {
          this.receivedSocketConn1=receivedSocketConn1;
        Connection dbconn = null;
        public void run() { // etc
         BufferedWriter writeBuffer = null;
         BufferedReader readBuffer = null;
         String capturedMessage="";
         try{
            dbconn = connectionPool.getConnection();
            dbconn.setAutoCommit(false);
            while ((nextChar=readBuffer.read()) != -1){          
              capturedMessage += (char) nextChar;
              if (nextChar == '*')
               try{
                    //all queries here.
                    try{            
                        Statement stmt1 = null;
                        stmt1 = dbconn.createStatement();
                        try{
                          String updateCommand1 = //query
                          count = stmt1.executeUpdate(updateCommand1);
                        finally{
                          if( stmt1 != null ){
                           stmt1.close();
                        else{
                        System.out.println("stmt1 is null in finally close");
                   catch(SQLException ex){
                     ex.printStackTrace(System.out);
                   dbconn.commit
               catch (SQLException ex){
                    ex.printStackTrace(System.out);
                    try{  
                  dbconn.rollback();
               catch (Exception rollback){  
                  rollback.printStackTrace(System.out);
           catch (Exception e){
               e.printStackTrace(System.out);
               try{  
                  dbconn.rollback();
               catch (Exception rollback){  
                  rollback.printStackTrace(System.out);
           finally
         catch (SocketTimeoutException ex){
               ex.printStackTrace();
         catch (IOException ex){
               ex.printStackTrace();
         catch (Exception ex){
               ex.printStackTrace(System.out);
          finally{
            try{
             if ( dbconn != null ){
               dbconn.close();
             else{
              System.out.println("dbConn is null in finally close");
            catch(SQLException ex){
                ex.printStackTrace();
            try{
              if ( writeBuffer != null ){
                writeBuffer.close();
             else{
              System.out.println("w is null in finally close");
            catch(IOException ex){
                ex.printStackTrace(System.out);
    [/code]

  • 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.

  • Pro*c multithreaded application has memory leak

    Hi there,
    I posted this message a week ago in OCI section, nobody answer me.
    I am really curious if my application has a bug or the pro*c has a bug.
    Anyone can compile the sample code and test it easily.
    I made multithreaded application which queries dynamic SQL, it works.
    But the memory leaks when i query the SQL statement.
    The more memory leaks, the more i query the SQL statement, even same SQL
    statement.
    I check it with top, shell command.
    My machine is SUN E450, Solaris 8. Oracle 9.2.0.1
    Compiler : gcc (GCC) 3.2.2
    I changed source code which is from
    $(ORACLE_HOME)/precomp/demo/proc/sample10.pc
    the sample10 doesn't need to be multithreaded. But i think it has to work
    correctly if i changed it to multithreaded application.
    the make file and source code will be placed below.
    I have to figure out the problem.
    Please help
    Thanks in advance,
    the make file is below
    HOME = /user/jkku
    ORA = $(ORACLE_HOME)
    CC = gcc
    PROC = proc
    LC_INCL = -I$(HOME)/work/dbmss/libs/include
    lc_incl = include=$(HOME)/work/dbmss/libs/include
    SYS_INCL =
    sys_incl =
    ORA_INCL = -I. \
    -I$(ORA)/precomp/public \
    -I$(ORA)/rdbms/public \
    -I$(ORA)/rdbms/demo \
    -I$(ORA)/rdbms/pbsql/public \
    -I$(ORA)/network/public \
    -DSLMXMX_ENABLE -DSLTS_ENABLE -D_SVID_GETTOD
    INCLUDES = $(LC_INCL) $(SYS_INCL) $(ORA_INCL)
    includes = $(lc_incl) $(sys_incl)
    LC_LIBS =
    SYS_LIBS = -lpthread -lsocket -lnsl -lrt
    ORA_LIBS = -L$(ORA)/lib/ -lclntsh
    LIBS = $(LC_LIBS) $(SYS_LIBS) $(ORA_LIBS)
    # Define C Compiler flags
    CFLAGS += -D_Solaris64_ -m64
    CFLAGS += -g -D_REENTRANT
    # Define pro*c Compiler flags
    PROCFLAGS += THREADS=YES
    PROCFLAGS += CPOOL=YES
    # Our object files
    PRECOMPS = sample10.c
    OBJS = sample10.o
    .SUFFIXES: .o .c .pc
    .c.o:
    $(CC) -c $(CFLAGS) $(INCLUDES) $*.c
    .pc.c:
    $(PROC) $(PROCFLAGS) $(includes) $*.pc $*.c
    all: sample10
    sample10: $(PRECOMPS) $(OBJS)
    $(CC) $(CFLAGS) -o sample10 $(OBJS) $(LIBS)
    clean:
    rm -rf *.o sample10 sample10.c
    the source code is below which i changed the oracle sample10.pc to
    multithreaded application.
    Sample Program 10: Dynamic SQL Method 4
    This program connects you to ORACLE using your username and
    password, then prompts you for a SQL statement. You can enter
    any legal SQL statement. Use regular SQL syntax, not embedded SQL.
    Your statement will be processed. If it is a query, the rows
    fetched are displayed.
    You can enter multi-line statements. The limit is 1023 characters.
    This sample program only processes up to MAX_ITEMS bind variables and
    MAX_ITEMS select-list items. MAX_ITEMS is #defined to be 40.
    #include <stdio.h>
    #include <string.h>
    #include <setjmp.h>
    #include <sqlda.h>
    #include <stdlib.h>
    #include <sqlcpr.h>
    /* Maximum number of select-list items or bind variables. */
    #define MAX_ITEMS 40
    /* Maximum lengths of the names of the
    select-list items or indicator variables. */
    #define MAX_VNAME_LEN 30
    #define MAX_INAME_LEN 30
    #ifndef NULL
    #define NULL 0
    #endif
    /* Prototypes */
    #if defined(__STDC__)
    void sql_error(void);
    int oracle_connect(void);
    int alloc_descriptors(int, int, int);
    int get_dyn_statement(void);
    void set_bind_variables(void);
    void process_select_list(void);
    void help(void);
    #else
    void sql_error(/*_ void _*/);
    int oracle_connect(/*_ void _*/);
    int alloc_descriptors(/*_ int, int, int _*/);
    int get_dyn_statement(/* void _*/);
    void set_bind_variables(/*_ void -*/);
    void process_select_list(/*_ void _*/);
    void help(/*_ void _*/);
    #endif
    char *dml_commands[] = {"SELECT", "select", "INSERT", "insert",
    "UPDATE", "update", "DELETE", "delete"};
    EXEC SQL INCLUDE sqlda;
    EXEC SQL INCLUDE sqlca;
    EXEC SQL BEGIN DECLARE SECTION;
    char dyn_statement[1024];
    EXEC SQL VAR dyn_statement IS STRING(1024);
    EXEC SQL END DECLARE SECTION;
    EXEC ORACLE OPTION (ORACA=YES);
    EXEC ORACLE OPTION (RELEASE_CURSOR=YES);
    SQLDA *bind_dp;
    SQLDA *select_dp;
    /* Define a buffer to hold longjmp state info. */
    jmp_buf jmp_continue;
    char *db_uid="dbmuser/dbmuser@dbmdb";
    sql_context ctx;
    int err_sql;
    enum{
    SQL_SUCC=0,
    SQL_ERR,
    SQL_NOTFOUND,
    SQL_UNIQUE,
    SQL_DISCONNECT,
    SQL_NOTNULL
    int main()
    int i;
    EXEC SQL ENABLE THREADS;
    EXEC SQL WHENEVER SQLERROR DO sql_error();
    EXEC SQL WHENEVER NOT FOUND DO sql_not_found();
    /* Connect to the database. */
    if (connect_database() < 0)
    exit(1);
    EXEC SQL CONTEXT USE :ctx;
    /* Process SQL statements. */
    for (;;)
    /* Allocate memory for the select and bind descriptors. */
    if (alloc_descriptors(MAX_ITEMS, MAX_VNAME_LEN, NAME_LEN) != 0)
    exit(1);
    (void) setjmp(jmp_continue);
    /* Get the statement. Break on "exit". */
    if (get_dyn_statement() != 0)
    break;
    EXEC SQL PREPARE S FROM :dyn_statement;
    EXEC SQL DECLARE C CURSOR FOR S;
    /* Set the bind variables for any placeholders in the
    SQL statement. */
    set_bind_variables();
    /* Open the cursor and execute the statement.
    * If the statement is not a query (SELECT), the
    * statement processing is completed after the
    * OPEN.
    EXEC SQL OPEN C USING DESCRIPTOR bind_dp;
    /* Call the function that processes the select-list.
    * If the statement is not a query, this function
    * just returns, doing nothing.
    process_select_list();
    /* Tell user how many rows processed. */
    for (i = 0; i < 8; i++)
    if (strncmp(dyn_statement, dml_commands, 6) == 0)
    printf("\n\n%d row%c processed.\n", sqlca.sqlerrd[2], sqlca.sqlerrd[2] == 1 ? '\0' : 's');
    break;
    /* Close the cursor. */
    EXEC SQL CLOSE C;
    /* When done, free the memory allocated for pointers in the bind and
    select descriptors. */
    for (i = 0; i < MAX_ITEMS; i++)
    if (bind_dp->V != (char *) 0)
    free(bind_dp->V);
    free(bind_dp->I); /* MAX_ITEMS were allocated. */
    if (select_dp->V != (char *) 0)
    free(select_dp->V);
    free(select_dp->I); /* MAX_ITEMS were allocated. */
    /* Free space used by the descriptors themselves. */
    SQLSQLDAFree(ctx, bind_dp);
    SQLSQLDAFree(ctx, select_dp);
    } /* end of for(;;) statement-processing loop */
    disconnect_database();
    EXEC SQL WHENEVER SQLERROR CONTINUE;
    EXEC SQL COMMIT WORK RELEASE;
    puts("\nHave a good day!\n");
    return;
    * Allocate the BIND and SELECT descriptors using sqlald().
    * Also allocate the pointers to indicator variables
    * in each descriptor. The pointers to the actual bind
    * variables and the select-list items are realloc'ed in
    * the set_bind_variables() or process_select_list()
    * routines. This routine allocates 1 byte for select_dp->V
    * and bind_dp->V, so the realloc will work correctly.
    alloc_descriptors(size, max_vname_len, max_iname_len)
    int size;
    int max_vname_len;
    int max_iname_len;
    int i;
    * The first sqlald parameter determines the maximum number of
    * array elements in each variable in the descriptor. In
    * other words, it determines the maximum number of bind
    * variables or select-list items in the SQL statement.
    * The second parameter determines the maximum length of
    * strings used to hold the names of select-list items
    * or placeholders. The maximum length of column
    * names in ORACLE is 30, but you can allocate more or less
    * as needed.
    * The third parameter determines the maximum length of
    * strings used to hold the names of any indicator
    * variables. To follow ORACLE standards, the maximum
    * length of these should be 30. But, you can allocate
    * more or less as needed.
    if ((bind_dp =
    SQLSQLDAAlloc(ctx, size, max_vname_len, max_iname_len)) ==
    (SQLDA *) 0)
    fprintf(stderr,
    "Cannot allocate memory for bind descriptor.");
    return -1; /* Have to exit in this case. */
    if ((select_dp =
    SQLSQLDAAlloc(ctx, size, max_vname_len, max_iname_len)) == (SQLDA *)
    0)
    fprintf(stderr,
    "Cannot allocate memory for select descriptor.");
    return -1;
    select_dp->N = MAX_ITEMS;
    /* Allocate the pointers to the indicator variables, and the
    actual data. */
    for (i = 0; i < MAX_ITEMS; i++) {
    bind_dp->I = (short *) malloc(sizeof (short));
    select_dp->I = (short *) malloc(sizeof(short));
    bind_dp->V = (char *) malloc(1);
    select_dp->V = (char *) malloc(1);
    return 0;
    int get_dyn_statement()
    char *cp, linebuf[256];
    int iter, plsql;
    for (plsql = 0, iter = 1; ;)
    if (iter == 1)
    printf("\nSQL> ");
    dyn_statement[0] = '\0';
    fgets(linebuf, sizeof linebuf, stdin);
    cp = strrchr(linebuf, '\n');
    if (cp && cp != linebuf)
    *cp = ' ';
    else if (cp == linebuf)
    continue;
    if ((strncmp(linebuf, "EXIT", 4) == 0) ||
    (strncmp(linebuf, "exit", 4) == 0))
    return -1;
    else if (linebuf[0] == '?' ||
    (strncmp(linebuf, "HELP", 4) == 0) ||
    (strncmp(linebuf, "help", 4) == 0))
    help();
    iter = 1;
    continue;
    if (strstr(linebuf, "BEGIN") ||
    (strstr(linebuf, "begin")))
    plsql = 1;
    strcat(dyn_statement, linebuf);
    if ((plsql && (cp = strrchr(dyn_statement, '/'))) ||
    (!plsql && (cp = strrchr(dyn_statement, ';'))))
    *cp = '\0';
    break;
    else
    iter++;
    printf("%3d ", iter);
    return 0;
    void set_bind_variables()
    int i, n;
    char bind_var[64];
    /* Describe any bind variables (input host variables) */
    EXEC SQL WHENEVER SQLERROR DO sql_error();
    bind_dp->N = MAX_ITEMS; /* Initialize count of array elements. */
    EXEC SQL DESCRIBE BIND VARIABLES FOR S INTO bind_dp;
    /* If F is negative, there were more bind variables
    than originally allocated by sqlald(). */
    if (bind_dp->F < 0)
    printf ("\nToo many bind variables (%d), maximum is %d\n.",
    -bind_dp->F, MAX_ITEMS);
    return;
    /* Set the maximum number of array elements in the
    descriptor to the number found. */
    bind_dp->N = bind_dp->F;
    /* Get the value of each bind variable as a
    * character string.
    * C contains the length of the bind variable
    * name used in the SQL statement.
    * S contains the actual name of the bind variable
    * used in the SQL statement.
    * L will contain the length of the data value
    * entered.
    * V will contain the address of the data value
    * entered.
    * T is always set to 1 because in this sample program
    * data values for all bind variables are entered
    * as character strings.
    * ORACLE converts to the table value from CHAR.
    * I will point to the indicator value, which is
    * set to -1 when the bind variable value is "null".
    for (i = 0; i < bind_dp->F; i++)
    printf ("\nEnter value for bind variable %.*s: ",
    (int)bind_dp->C, bind_dp->S);
    fgets(bind_var, sizeof bind_var, stdin);
    /* Get length and remove the new line character. */
    n = strlen(bind_var) - 1;
    /* Set it in the descriptor. */
    bind_dp->L = n;
    /* (re-)allocate the buffer for the value.
    sqlald() reserves a pointer location for
    V but does not allocate the full space for
    the pointer. */
    bind_dp->V = (char *) realloc(bind_dp->V, (bind_dp->L + 1));
    /* And copy it in. */
    strncpy(bind_dp->V, bind_var, n);
    /* Set the indicator variable's value. */
    if ((strncmp(bind_dp->V, "NULL", 4) == 0) ||
    (strncmp(bind_dp->V, "null", 4) == 0))
    *bind_dp->I = -1;
    else
    *bind_dp->I = 0;
    /* Set the bind datatype to 1 for CHAR. */
    bind_dp->T = 1;
    return;
    void process_select_list()
    int i, null_ok, precision, scale;
    if ((strncmp(dyn_statement, "SELECT", 6) != 0) &&
    (strncmp(dyn_statement, "select", 6) != 0))
    select_dp->F = 0;
    return;
    /* If the SQL statement is a SELECT, describe the
    select-list items. The DESCRIBE function returns
    their names, datatypes, lengths (including precision
    and scale), and NULL/NOT NULL statuses. */
    select_dp->N = MAX_ITEMS;
    EXEC SQL DESCRIBE SELECT LIST FOR S INTO select_dp;
    /* If F is negative, there were more select-list
    items than originally allocated by sqlald(). */
    if (select_dp->F < 0)
    printf ("\nToo many select-list items (%d), maximum is %d\n",
    -(select_dp->F), MAX_ITEMS);
    return;
    /* Set the maximum number of array elements in the
    descriptor to the number found. */
    select_dp->N = select_dp->F;
    /* Allocate storage for each select-list item.
    sqlprc() is used to extract precision and scale
    from the length (select_dp->L).
    sqlnul() is used to reset the high-order bit of
    the datatype and to check whether the column
    is NOT NULL.
    CHAR datatypes have length, but zero precision and
    scale. The length is defined at CREATE time.
    NUMBER datatypes have precision and scale only if
    defined at CREATE time. If the column
    definition was just NUMBER, the precision
    and scale are zero, and you must allocate
    the required maximum length.
    DATE datatypes return a length of 7 if the default
    format is used. This should be increased to
    9 to store the actual date character string.
    If you use the TO_CHAR function, the maximum
    length could be 75, but will probably be less
    (you can see the effects of this in SQL*Plus).
    ROWID datatype always returns a fixed length of 18 if
    coerced to CHAR.
    LONG and
    LONG RAW datatypes return a length of 0 (zero),
    so you need to set a maximum. In this example,
    it is 240 characters.
    printf ("\n");
    for (i = 0; i < select_dp->F; i++)
    char title[MAX_VNAME_LEN];
    /* Turn off high-order bit of datatype (in this example,
    it does not matter if the column is NOT NULL). */
    sqlnul ((unsigned short *)&(select_dp->T), (unsigned short
    *)&(select_dp->T), &null_ok);
    switch (select_dp->T)
    case 1 : /* CHAR datatype: no change in length
    needed, except possibly for TO_CHAR
    conversions (not handled here). */
    break;
    case 2 : /* NUMBER datatype: use sqlprc() to
    extract precision and scale. */
    sqlprc ((unsigned int *)&(select_dp->L), &precision,
    &scale);
    /* Allow for maximum size of NUMBER. */
    if (precision == 0) precision = 40;
    /* Also allow for decimal point and
    possible sign. */
    /* convert NUMBER datatype to FLOAT if scale > 0,
    INT otherwise. */
    if (scale > 0)
    select_dp->L = sizeof(float);
    else
    select_dp->L = sizeof(int);
    break;
    case 8 : /* LONG datatype */
    select_dp->L = 240;
    break;
    case 11 : /* ROWID datatype */
    case 104 : /* Universal ROWID datatype */
    select_dp->L = 18;
    break;
    case 12 : /* DATE datatype */
    select_dp->L = 9;
    break;
    case 23 : /* RAW datatype */
    break;
    case 24 : /* LONG RAW datatype */
    select_dp->L = 240;
    break;
    /* Allocate space for the select-list data values.
    sqlald() reserves a pointer location for
    V but does not allocate the full space for
    the pointer. */
    if (select_dp->T != 2)
    select_dp->V = (char *) realloc(select_dp->V,
    select_dp->L + 1);
    else
    select_dp->V = (char *) realloc(select_dp->V,
    select_dp->L);
    /* Print column headings, right-justifying number
    column headings. */
    /* Copy to temporary buffer in case name is null-terminated */
    memset(title, ' ', MAX_VNAME_LEN);
    strncpy(title, select_dp->S, select_dp->C);
    if (select_dp->T == 2)
    if (scale > 0)
    printf ("%.*s ", select_dp->L+3, title);
    else
    printf ("%.*s ", select_dp->L, title);
    else
    printf("%-.*s ", select_dp->L, title);
    /* Coerce ALL datatypes except for LONG RAW and NUMBER to
    character. */
    if (select_dp->T != 24 && select_dp->T != 2)
    select_dp->T = 1;
    /* Coerce the datatypes of NUMBERs to float or int depending on
    the scale. */
    if (select_dp->T == 2)
    if (scale > 0)
    select_dp->T = 4; /* float */
    else
    select_dp->T = 3; /* int */
    printf ("\n\n");
    /* FETCH each row selected and print the column values. */
    EXEC SQL WHENEVER NOT FOUND GOTO end_select_loop;
    for (;;)
    EXEC SQL FETCH C USING DESCRIPTOR select_dp;
    /* Since each variable returned has been coerced to a
    character string, int, or float very little processing
    is required here. This routine just prints out the
    values on the terminal. */
    for (i = 0; i < select_dp->F; i++)
    if (*select_dp->I < 0)
    if (select_dp->T == 4)
    printf ("%-*c ",(int)select_dp->L+3, ' ');
    else
    printf ("%-*c ",(int)select_dp->L, ' ');
    else
    if (select_dp->T == 3) /* int datatype */
    printf ("%*d ", (int)select_dp->L,
    *(int *)select_dp->V);
    else if (select_dp->T == 4) /* float datatype */
    printf ("%*.2f ", (int)select_dp->L,
    *(float *)select_dp->V);
    else /* character string */
    printf ("%-*.*s ", (int)select_dp->L,
    (int)select_dp->L, select_dp->V);
    printf ("\n");
    end_select_loop:
    return;
    void help()
    puts("\n\nEnter a SQL statement or a PL/SQL block at the SQL> prompt.");
    puts("Statements can be continued over several lines, except");
    puts("within string literals.");
    puts("Terminate a SQL statement with a semicolon.");
    puts("Terminate a PL/SQL block (which can contain embedded
    semicolons)");
    puts("with a slash (/).");
    puts("Typing \"exit\" (no semicolon needed) exits the program.");
    puts("You typed \"?\" or \"help\" to get this message.\n\n");
    int connect_database()
    err_sql = SQL_SUCC;
    EXEC SQL WHENEVER SQLERROR DO sql_error();
    EXEC SQL WHENEVER NOT FOUND DO sql_not_found();
    EXEC SQL CONTEXT ALLOCATE :ctx;
    EXEC SQL CONTEXT USE :ctx;
    EXEC SQL CONNECT :db_uid;
    if(err_sql != SQL_SUCC){
    printf("err => connect database(ctx:%ld, uid:%s) failed!\n", ctx, db_uid);
    return -1;
    return 1;
    int disconnect_database()
    err_sql = SQL_SUCC;
    EXEC SQL WHENEVER SQLERROR DO sql_error();
    EXEC SQL WHENEVER NOT FOUND DO sql_not_found();
    EXEC SQL CONTEXT USE :ctx;
    EXEC SQL COMMIT WORK RELEASE;
    EXEC SQL CONTEXT FREE:ctx;
    return 1;
    void sql_error()
    printf("err => %.*s", sqlca.sqlerrm.sqlerrml, sqlca.sqlerrm.sqlerrmc);
    printf("in \"%.*s...\'\n", oraca.orastxt.orastxtl, oraca.orastxt.orastxtc);
    printf("on line %d of %.*s.\n\n", oraca.oraslnr, oraca.orasfnm.orasfnml,
    oraca.orasfnm.orasfnmc);
    switch(sqlca.sqlcode) {
    case -1: /* unique constraint violated */
    err_sql = SQL_UNIQUE;
    break;
    case -1012: /* not logged on */
    case -1089:
    case -3133:
    case -1041:
    case -3114:
    case -3113:
    /* �6�Ŭ�� shutdown�ǰų� �α��� ���°� �ƴҶ� ��b�� �õ� */
    /* immediate shutdown in progress - no operations are permitted */
    /* end-of-file on communication channel */
    /* internal error. hostdef extension doesn't exist */
    err_sql = SQL_DISCONNECT;
    break;
    case -1400:
    err_sql = SQL_NOTNULL;
    break;
    default:
    err_sql = SQL_ERR;
    break;
    EXEC SQL CONTEXT USE :ctx;
    EXEC SQL WHENEVER SQLERROR CONTINUE;
    EXEC SQL ROLLBACK WORK;
    void sql_not_found()
    err_sql = SQL_NOTFOUND;

    Hi Jane,
    What version of Berkeley DB XML are you using?
    What is your operating system and your hardware platform?
    For how long have been the application running?
    What is your current container size?
    What's set for EnvironmentConfig.setThreaded?
    Do you know if containers have previously not been closed correctly?
    Can you please post the entire error output?
    What's the JDK version, 1.4 or 1.5?
    Thanks,
    Bogdan

  • APEX 4.1.1 Memory Leak in IE7

    Hi,
    We busy upgrading our apex and db from 3.0/10G to 4.1.1/11.2G and notice that there appears to be a memory leak when using APEX. At one stage we have had IE7 using over a gig of memory.
    When you load or refresh your page IE7 seems to grab on average 2-5MB of memory for each page load. At first we thought it may have been our apps or setup but this also happens when we go to app 4550 page 1 on apex.oracle.com.
    How to replicate:
    Open task manager to view the Memory Usage.
    Using IE7
    1. Go to http://apex.oracle.com/pls/apex/f?p=4550:1
    2. Go back to Task Manager and note the readings once the CPU Usage for iexplore.exe has stablised to 0.
    3. go back to IE7 and press F5
    4. Repeat steps 2-3 and you will see the Memory usage increases.
    We think this maybe due to a few jQuery UI memory leaks within IE7 and thought this bug ticket maybe of interest http://bugs.jqueryui.com/ticket/7666 (Slightly different versions but similiar experiences)
    Could someone else confirm that they also experience the increasing or have had similiar problems and managed to resolve it?
    TBH, it wouldn't be an issue to use another browser like Firefox to access the builder but this also affects the applications if they include APEX standard Javascript and CSS.
    Thanking you in advance.
    Alistair
    Edited by: Alistair Laing on Jun 16, 2012 2:32 PM
    Added Tags

    Alistair Laing wrote:
    Hi,
    We busy upgrading our apex and db from 3.0/10G to 4.1.1/11.2G and notice that there appears to be a memory leak when using APEX. At one stage we have had IE7 using over a gig of memory.
    When you load or refresh your page IE7 seems to grab on average 2-5MB of memory for each page load. At first we thought it may have been our apps or setup but this also happens when we go to app 4550 page 1 on apex.oracle.com.
    How to replicate:
    Open task manager to view the Memory Usage.
    Using IE7
    1. Go to http://apex.oracle.com/pls/apex/f?p=4550:1
    2. Go back to Task Manager and note the readings once the CPU Usage for iexplore.exe has stablised to 0.
    3. go back to IE7 and press F5
    4. Repeat steps 2-3 and you will see the Memory usage increases.
    We think this maybe due to a few jQuery UI memory leaks within IE7 and thought this bug ticket maybe of interest http://bugs.jqueryui.com/ticket/7666 (Slightly different versions but similiar experiences)
    Could someone else confirm that they also experience the increasing or have had similiar problems and managed to resolve it?Anecdotally, yes. Don't have exact steps for replication or precise numbers, but I have noticed this in passing. On the junk that my client considers a PC suitable for web development the typical IE7 memory footprint with the APEX 3.0 builder and several other tabs running is about 52MB. Add APEX 4.1.1 and it climbs constantly until I have to pull the plug when it gets north of 150MB as the PC can't take it.
    As well that I also have Firefox and 4.1.1 is still experimental at that site...
    At the moment I don't have to resolve it and if I did the only option I'd propose is the replacement of IE7.
    VC wrote:
    Look at this http://www.bbc.co.uk/news/technology-18440979
    Alistair Laing wrote:lol @ VC - I dont shop online at work :-D
    I saw that eariler this week. I do agree with the concept though.So take appropriate action: charge extra for IE7 support.
    The amount of work and effort involved in making our website look normal on IE7 equalled the combined time of designing for Chrome, Safari and Firefox.Is entirely accurate. If it's stated as a requirement, itemise it as an extra on the quote.
    Educate management and bean counters: show them the one line of standards-compliant CSS that's all that is necessary in Safari, Chrome, Firefox and Opera (and just possibly in IE8/9/10), how it isn't supported in IE7, and the tortuous hacks and workarounds that are required to get something equivalent working there.

  • Bug:4705928 PLSQL: Memory leak using small varrays

    We have Oracle version 10.2.0.1.0
    We have a problem with a procedure.
    In our scenario we make use of VARRAY in the procedure to pass some filter parameters to a select distinct querying a view made on three tables.
    Unfotunately not always execution it is successful.
    Sometimes it returns wrong value (0 for the count parameter), sometimes (rarely) the server stops working.
    We suspect that this is caused by a bug fixed in versione 10.2.0.3.0
    Bug:4705928 PLSQL: Memory leak using small varrays when trimming the whole collection and inserting into it in a loop
    We suspect this becasue we made two procedure the first (spProductCount) uses a function (fnProductFilter) to calculate the values of a varray and passes them into the select,
    while in the second procedure (spProductCount2) parameters are passed directly into the statement without varray
    and there are failures only in the first procedure.
    On the other hand on another server 10.2.0.1.0 we never have this problem.
    The instance manifesting the bug runs under shared mode, while the other is under dedicated mode.
    Turning the first one to dedicated mode makes the bugs disapear.
    Unfortunately this is not a solution.
    In the sample there are the three table with all constraints, the view, tha varray custom type, the function and the two procedures.
    Is there someone that may examine our sample and tell us if the pl/sql code corresponds to the bug desciption.
    We also want to know if it's possibile that the same server running under different mode (SHARED/DEDICATED) doesn't behave the same way.
    The tables:
    --Products
    CREATE TABLE "Products" (
         "Image" BLOB
         , "CatalogId" RAW(16)
         , "ProductId" RAW(16)
         , "MnemonicId" NVARCHAR2(50) DEFAULT ''
         , "ProductParentId" RAW(16)
    ALTER TABLE "Products"
         ADD CONSTRAINT "NN_Products_M04" CHECK ("CatalogId" IS NOT NULL)
    ALTER TABLE "Products"
         ADD CONSTRAINT "NN_Products_M05" CHECK ("ProductId" IS NOT NULL)
    ALTER TABLE "Products"
    ADD CONSTRAINT "PK_Products"
    PRIMARY KEY ("ProductId")
    CREATE INDEX "IX_Products"
    ON "Products" ("CatalogId", "MnemonicId")
    CREATE UNIQUE INDEX "UK_Products"
    ON "Products" (DECODE("MnemonicId", NULL, NULL, RAWTOHEX("CatalogId") || "MnemonicId"))
    --Languages
    CREATE TABLE "Languages" (
         "Description" NVARCHAR2(250)
         , "IsStandard" NUMBER(1)
         , "LanguageId" RAW(16)
         , "MnemonicId" NVARCHAR2(12)
    ALTER TABLE "Languages"
         ADD CONSTRAINT "NN_Languages_M01" CHECK ("LanguageId" IS NOT NULL)
    ALTER TABLE "Languages"
         ADD CONSTRAINT "NN_Languages_M05" CHECK ("MnemonicId" IS NOT NULL)
    ALTER TABLE "Languages"
    ADD CONSTRAINT "PK_Languages"
    PRIMARY KEY ("LanguageId")
    ALTER TABLE "Languages"
    ADD CONSTRAINT "UK_Languages"
    UNIQUE ("MnemonicId")
    --ProductDesc
    CREATE TABLE "ProductDesc" (
         "Comment" NCLOB
         , "PlainComment" NCLOB
         , "Description" NVARCHAR2(250)
         , "DescriptionText" NCLOB
         , "PlainDescriptionText" NCLOB
         , "LanguageId" NVARCHAR2(12)
         , "ProductId" RAW(16)
    ALTER TABLE "ProductDesc"
         ADD CONSTRAINT "NN_ProductDescM01" CHECK ("LanguageId" IS NOT NULL)
    ALTER TABLE "ProductDesc"
         ADD CONSTRAINT "NN_ProductDescM02" CHECK ("ProductId" IS NOT NULL)
    ALTER TABLE "ProductDesc"
    ADD CONSTRAINT "PK_ProductDesc"
    PRIMARY KEY ("ProductId", "LanguageId")
    ALTER TABLE "ProductDesc"
    ADD CONSTRAINT "FK_ProductDesc1"
    FOREIGN KEY("ProductId") REFERENCES "Products" ("ProductId")
    ALTER TABLE "ProductDesc"
    ADD CONSTRAINT "FK_ProductDesc2"
    FOREIGN KEY("LanguageId") REFERENCES "Languages" ("MnemonicId")
    /The view:
    --ProductView
    CREATE OR REPLACE VIEW "vwProducts"
    AS
         SELECT
               "Products"."CatalogId"
              , "ProductDesc"."Comment"
              , "ProductDesc"."PlainComment"
              , "ProductDesc"."Description"
              , "ProductDesc"."DescriptionText"
              , "ProductDesc"."PlainDescriptionText"
              , "Products"."Image"
              , "Languages"."MnemonicId" "LanguageId"
              , "Products"."MnemonicId"
              , "Products"."ProductId"
              , "Products"."ProductParentId"
              , TRIM(NVL("ProductDesc"."Description" || ' ', '') || NVL("ParentDescriptions"."Description", '')) "FullDescription"
         FROM "Products"
         CROSS JOIN "Languages"
         LEFT OUTER JOIN "ProductDesc"
         ON "Products"."ProductId" = "ProductDesc"."ProductId"
         AND "ProductDesc"."LanguageId" = "Languages"."MnemonicId"
         LEFT OUTER JOIN "ProductDesc" "ParentDescriptions"
         ON "Products"."ProductParentId" = "ParentDescriptions"."ProductId"
         AND ("ParentDescriptions"."LanguageId" = "Languages"."MnemonicId")
    /The varray:
    --CustomType VARRAY
    CREATE OR REPLACE TYPE Varray_Params IS VARRAY(100) OF NVARCHAR2(1000);
    /The function:
    --FilterFunction
    CREATE OR REPLACE FUNCTION "fnProductFilter" (
         parCatalogId "Products"."CatalogId"%TYPE,
         parLanguageId                    NVARCHAR2 := N'it-IT',
         parFilterValues                    OUT Varray_Params
    RETURN INTEGER
    AS
         varSqlCondition                    VARCHAR2(32000);
         varSqlConditionValues          NVARCHAR2(32000);
         varSql                              NVARCHAR2(32000);
         varDbmsCursor                    INTEGER;
         varDbmsResult                    INTEGER;
         varSeparator                    VARCHAR2(2);
         varFilterValue                    NVARCHAR2(1000);
         varCount                         INTEGER;
    BEGIN
         varSqlCondition := '(T_Product."CatalogId" = HEXTORAW(:parentId)) AND (T_Product."LanguageId" = :languageId )';
         varSqlConditionValues := CHR(39) || TO_CHAR(parCatalogId) || CHR(39) || N', ' || CHR(39 USING NCHAR_CS) || parLanguageId || CHR(39 USING NCHAR_CS);
         parFilterValues := Varray_Params();
         varSql := N'SELECT FilterValues.column_value FilterValue FROM TABLE(Varray_Params(' || varSqlConditionValues || N')) FilterValues';
         BEGIN
              varDbmsCursor := dbms_sql.open_cursor;
              dbms_sql.parse(varDbmsCursor, varSql, dbms_sql.native);
              dbms_sql.define_column(varDbmsCursor, 1, varFilterValue, 1000);
              varDbmsResult := dbms_sql.execute(varDbmsCursor);
              varCount := 0;
              LOOP
                   IF (dbms_sql.fetch_rows(varDbmsCursor) > 0) THEN
                        varCount := varCount + 1;
                        dbms_sql.column_value(varDbmsCursor, 1, varFilterValue);
                        parFilterValues.extend(1);
                        parFilterValues(varCount) := varFilterValue;
                   ELSE
                        -- No more rows to copy
                        EXIT;
                   END IF;
              END LOOP;
              dbms_sql.close_cursor(varDbmsCursor);
         EXCEPTION WHEN OTHERS THEN
              dbms_sql.close_cursor(varDbmsCursor);
              RETURN 0;
         END;
         FOR i in parFilterValues.first .. parFilterValues.last LOOP
              varSeparator := ', ';
         END LOOP;
         RETURN 1;
    END;
    /The procedures:
    --Procedure presenting anomaly\bug
    CREATE OR REPLACE PROCEDURE "spProductCount" (
         parCatalogId "Products"."CatalogId"%TYPE,
         parLanguageId NVARCHAR2 := N'it-IT',
         parRecords OUT NUMBER
    AS
         varFilterValues Varray_Params;
         varResult INTEGER;
         varSqlTotal VARCHAR2(32000);
    BEGIN
         parRecords := 0;
         varResult := "fnProductFilter"(parCatalogId, parLanguageId, varFilterValues);
         varSqlTotal := 'BEGIN
         SELECT count(DISTINCT T_Product."ProductId") INTO :parCount FROM "vwProducts" T_Product
              WHERE ((T_Product."CatalogId" = HEXTORAW(:parentId)) AND (T_Product."LanguageId" = :languageId ));
    END;';
         EXECUTE IMMEDIATE varSqlTotal USING OUT parRecords, varFilterValues(1), varFilterValues(2);
    END;
    --Procedure NOT presenting anomaly\bug
    CREATE OR REPLACE PROCEDURE "spProductCount2" (
         parCatalogId "Products"."CatalogId"%TYPE,
         parLanguageId NVARCHAR2 := N'it-IT',
         parRecords OUT NUMBER
    AS
         varFilterValues Varray_Params;
         varResult INTEGER;
         varSqlTotal VARCHAR2(32000);
    BEGIN
         parRecords := 0;
         varSqlTotal := 'BEGIN
         SELECT count(DISTINCT T_Product."ProductId") INTO :parCount FROM "vwProducts" T_Product
              WHERE ((T_Product."CatalogId" = HEXTORAW(:parentId)) AND (T_Product."LanguageId" = :languageId ));
    END;';
         EXECUTE IMMEDIATE varSqlTotal USING OUT parRecords, parCatalogId, parLanguageId;
    END;Edited by: 835125 on 2011-2-9 1:31

    835125 wrote:
    Using VARRAY was the only way I found to transform comma seprated text values (e.g. "'abc', 'def', '123'") in a collection of strings.A varray is just a functionally crippled version of a nested table collection type, with a defined limit you probably don't need. (Why 100 specifically?) Instead of
    CREATE OR REPLACE TYPE varray_params AS VARRAY(100) OF NVARCHAR2(1000);try
    CREATE OR REPLACE TYPE array_params AS TABLE OF NVARCHAR2(1000);I don't know whether that will solve the problem but at least it'll be a slightly more useful type.
    What makes you think it's a memory leak specifically? Do you observe session PGA memory use going up more than it should?
    btw good luck with all those quoted column names. I wouldn't like to have to work with those, although they do make the forum more colourful.
    Edited by: William Robertson on Feb 11, 2011 7:54 AM

  • Memory leak in WLS6.1 sp3 on Solaris?

    We are running WLS 6.1 sp3 on Solaris 8 using Sun's 1.3.1 JVM with BEA's
    JDriver to connect to Oracle (8.1.7). We have set the JVM to a maximum heap
    of 512M (-Xms256m -Xmx512m).
    The issue is that we are now seeing (via pmap) the resident memory growing
    to ~1GB. Yet, the WLS management console is reporting memory usage of ~200M.
    So, if we are to believe WLS, then the JVM (or some native library) is
    chewing up the extra memory.
    Having examined the results of "pmap -x <pid>", I see the heap (and some
    anon) mem/file are quite large.
    Address Kbytes Resident Shared Private Permissions Mapped File
    00026000 418912 416096 - 416096 read/write/exec [ heap ]
    D8C00000 524288 447928 - 447928 read/write/exec [ anon ]
    total Kb 1083832 981136 37960 943176
    Questions:
    - Are there any known memory leaks with 6.1 sp3 on Solaris?
    - Should it be possible for pmap's value of "heap" to grow larger than the
    "Xms" setting? We have observed this recently, but the numbers above don't
    reflect this.
    - Any idea what the "anon" is or how to determine what it is?
    - Do you know of any tools that might help me determine what is using that
    memory or what is in it?
    Any suggestions will be greatly appreciated...
    Thanks in advance,
    Erik

    If you set -Xmx512m then the java heap will grow no larger than 512MB.
    WLS is reporting the size of the java heap. (It is a java program after
    all and doesn't know a lot about what native code might be doing.)
    My first thought is try running with Oracle's thin (type-4) driver.
    Since this is java code, it will use the java heap. If the memory usage
    drastically changes, then you can point the finger at the jDriver.
    Are you using any other native code / libraries?
    -- Rob
    Erik Westland wrote:
    We are running WLS 6.1 sp3 on Solaris 8 using Sun's 1.3.1 JVM with BEA's
    JDriver to connect to Oracle (8.1.7). We have set the JVM to a maximum
    heap
    of 512M (-Xms256m -Xmx512m).
    The issue is that we are now seeing (via pmap) the resident memory growing
    to ~1GB. Yet, the WLS management console is reporting memory usage of
    ~200M.
    So, if we are to believe WLS, then the JVM (or some native library) is
    chewing up the extra memory.
    Having examined the results of "pmap -x ", I see the heap (and some
    anon) mem/file are quite large.
    Address Kbytes Resident Shared Private Permissions Mapped File
    00026000 418912 416096 - 416096 read/write/exec [ heap ]
    D8C00000 524288 447928 - 447928 read/write/exec [ anon ]
    total Kb 1083832 981136 37960 943176
    Questions:
    - Are there any known memory leaks with 6.1 sp3 on Solaris?
    - Should it be possible for pmap's value of "heap" to grow larger than the
    "Xms" setting? We have observed this recently, but the numbers above don't
    reflect this.
    - Any idea what the "anon" is or how to determine what it is?
    - Do you know of any tools that might help me determine what is using that
    memory or what is in it?
    Any suggestions will be greatly appreciated...
    Thanks in advance,
    Erik

  • Memory leak in Crystal Reports 2008

    We are running CR runtime 2008 version 12.3.4 and it looks like there is a memory leak. This is what we see happen (see chart#1). So just between these 4 report runs memory usage as gone up 64mb. We loose 20mb of memory with each report that we call. We actually see memory keep going up until the application fails due to out of memory issues around 1100mb of memory usage. This has been an issue ever since crystal 2008 was released we did not see this issue with Crystal Reports 11 or 10.
    chart#1:
    memory using in MB after opening and closing a small CR
    Start 123
    open rpt 225
    close rpt 204
    open rpt 245
    close rpt 226
    open rpt 266
    close rpt 247
    open rpt 287
    close rpt 268
    When is SAP going to address this issue?  Our work around for the last 2 years has been to close the CR application and reopen it multiple times a day to free up this lost memory and to revent "Out of memory" errors.  We will be forced to move to Reporting Services if this issue is not addressed soon.
    Josh

    Hi Josh,
    There are no memory leaks in CR 10, 11, 2008 or 2010 or 2011.
    Make sure you are closing and disposing all of your report objects, database connections, Data Sets etc. And then calling GC.Collect.
    And if you want to pursue this I suggest you give more details than just saying there is a leak and show a bunch of numbers that mean nothing without the code to verify those numbers.
    Thank you
    Don

  • Memory Leak in 10.4.7

    Question for all you Mac "Guru's" out there. I have an Imac (intel) with 2 512MB Memory Sticks and Have Noticed that there appears to be a memory leak in the OS. After several staggering hours It seems that the culprit is WindowServer and kernal_task. I have seen the WindowServer process Real Memory increase a couple of Kbytes every 3-4 seconds. My kernal_task seems to always be the process using the most memory of all.
    After a fresh restart Kernal_task is using about 40MB and windowserver about 20MB. now if I let it sit for just a few hours those numbers almost double. I admit it could be something else, but i don't think so since i sit and stare at my activity monitor and nothing seems to change except for those 2 processes. Anybody else notice this at all?
    I asked the snob at the Genius bar in the Chandler, AZ Apple store and he suggested to try re-seating the memory sticks and I have with no change. I have even done a fresh install of OS X and the updates to 10.4.7. I have noticed the problem since 10.4.5.
    Any help would be greatly appreciated!
    I don't have a lot of 3rd party software except for Firefox and thunderbird. All the apps that i use are Universal Binary with the exception of Quicken that came with my iMac.
    Thanks
    17" inch Intel Imac   Mac OS X (10.4.4)  

    On mdc open terminal and goto;
    /Library/Filesystems/Xsan/bin
    run as root
    cvfsck -j <selectyourvolume>
    to make sure journal is written out to volume
    then run
    cvfsck <selectyourvolume> until no errors are reported
    you can run it with -n option the first time to make sure you do only a readonly check (no modification, hence the FS will not be fixed)

  • Memory Leak in OCCI library

    Hi,
    I am using OCCI library and oracle XE. There is noticeable amount memory leak in CreateEnvironment and CreateConneaction API funtions. I am not sure whether it is known problem. If the oracle server is down my application has to retry several times using these above mentioned methods and memory grows significantly.
    Here is a simple program which creates environment and create connection and terminates immediately in a while loop. We see huge memory leak.
    I have downloaded occi_gcc343,
    Here is sample program which i tried.
    #include <iostream>
    #include <occi.h>
    using namespace oracle::occi;
    using namespace std;
    int main(int argc, char* argv[])
    Environment *env = NULL;
    Connection *conn = NULL;
    while(1)
    Environment *env  = Environment::createEnvironment(Environment::DEFAULT);
    Connection *conn = env->createConnection ("cvo","cvo123","XE");
    sleep(3);
    env->terminateConnection (conn);
    Environment::terminateEnvironment(env);
    getchar();
    return 0;
    Please let me know if there is any patch available or is there anyway overcome from this problem.
    Thanks,

    Can't really speak about the memory leak issue that you suspect with the library, but do note that that you do not need to terminate the environment in a reconnect loop. terminateEnvironment is meant to be called at program exit, not disconnect. This may help with the memory issue somewhat.

  • Memory leak in OCI while using AQ

    There seems to be a serious memory leak in the OCI driver (9.2.0.1) when using a JAVA client to dequeue a database queue (Advanced Queuing).
    Continuous dequeuing causes the heap memory to increase, and this memory never gets freed which leads me to suspect a memory leak in the OCI components (as the memory allocated for the JVM is constant). The heap memory increases by 3-4 MB after a dequeue of 1000 RAW messages,
    Has anyone come across this problem before and if so are there any solutions? Changing to a thin driver is not a solution for me due to other requirements.
    I'm using using Oracle client v9.2.0.1 libraries running on Solaris 8.
    The source code for my JAVA test client is as below:
    /* JAVA dequeue */
    package com.ubsw.risk.pce.eventqueues.test;
    import oracle.AQ.*;
    import java.sql.*;
    import oracle.jdbc.*;
    public class testRawDequeue {
    public testRawDequeue() {
    public static void main(String[] args) {
    Connection conn = null;
    AQSession aq_sess = null;
    try {
    Class.forName("oracle.jdbc.driver.OracleDriver");
    //Use OCI connection
    conn = DriverManager.getConnection("jdbc:oracle:oci:@DB_NAME.world","user","password");
    conn.setAutoCommit(false);
    Class.forName("oracle.AQ.AQOracleDriver");
    while(true) {
    aq_sess = AQDriverManager.createAQSession(conn);
    runTest(aq_sess);
    aq_sess.close();
    aq_sess = null;
    System.gc();
    } catch (Exception e) {
    e.printStackTrace();
    System.out.println(e.toString());
    try {
    if (aq_sess != null) {
    aq_sess.close();
    if (conn != null) {
    conn.close();
    } catch (SQLException sqle) {
    public static void runTest(AQSession aq_sess) throws AQException, SQLException
    AQQueueTable q_table;
    AQQueue queue;
    AQMessage message;
    AQRawPayload raw_payload;
    AQEnqueueOption enq_option;
    String test_data = "new message";
    AQDequeueOption deq_option;
    byte[] b_array;
    /* Get a handle to a queue - in aquser schema: */
    queue = aq_sess.getQueue ("user", "raw_msg_queue");
    System.out.println("Successful getQueue");
    /* Creating a AQDequeueOption object with default options: */
    deq_option = new AQDequeueOption();
    /* Dequeue a message: */
    message = queue.dequeue(deq_option);
    System.out.println("Successful dequeue");
    /* Retrieve raw data from the message: */
    raw_payload = message.getRawPayload();
    b_array = raw_payload.getBytes();
    System.out.println("bytes:" + b_array.toString());
    queue.close();
    ((AQOracleSession)aq_sess).getDBConnection().commit();

    This sounds very similar to the memory leak I have in Oracle 9i using Pro*C++. Everytime a connect is made memory appears to leak and it only happens in multithreaded mode not default mode. There is a thread about this under the Oracle C++ call interface. Under 9i it appears to leak about 60K per connect rather than 60 bytes.
    Paul

  • Memory leak and char[] ?

    Hello all,
    I'm not sure whether this post should be here or in WebLogic section, so correct me if I'm wrong.
    I'm working on JDeveloper 11.1.1.3 while deployments are made on standalone WebLogic 10.3.3. This thing occurred in previous versions also.
    With every deployment WebLogic increases it's used memory until the famous PermGen space error, which is after about 5-6 deployments.
    I'm doing my best to understand how to use memleak detection tools. I've switched JDev and WL from Sun jdk which was used before to JRockit, same thing happens. Both JDev's memory profiler and JRockit mission control show something that I really do not understand. char[] uses around 30% of heap space and keeps growing with deployments, next is String with 8%. I never use char in app.
    Am I looking at the wrong thing? Is it normal for char[] to increase on WebLogic on deployments? Does anyone know how to check other things and what to check? Someone on other forums mentioned it would be useful to check if ApplicationContext keeps initializing over again on deployments. Does anyone know how to check this?
    One more thing, I have successfully deployed app on Tomcat, and Tomcat said there is a memory leak in app, but could not tell anything specific.
    I'm kinda lost in this :(

    It is normal for the PermGen space of the Sun's JVM to get filled after several re-deployments. PermGen stands for "permanent generational". This space is used by classes that is unlikely to need to be garbage-collected, so they are placed in this memory space that is never garbage-collected (for example, the Class instances). When you redeploy an application, a new class loader instance is used and it instantiates new Class instances that fill up the PermGen space. But why this happens on JRockit either, I could not explain.
    We have experienced memory leaks related to classes and components that use native memory. For example, we have had significant memory leak when using Oracle's JDBC OCI driver. We were not able to solve this problem, so we switched to JDBC Thin driver (which is very performant and stable today comparing to some years ago). If you are using Oracle JRockit, you can monitor the overall memory usage by the following JRockit command executed at OS command line:
    jrcmd <jrockit_pid> print_memusage>where <jrockit_pid> should be replaced by the JVM process ID.
    If you suspect existence of native memory leaks, then have a look at the article Thanks for the memory for explanations about how Java uses native memory.
    Dimitar

  • Memory leak versus inactive memory

    Hi:
    My iMac was becoming painfully slow a year or so ago. This seemed to be due to a lack of RAM, so I upgraded (2 GB to 4 GB total). This worked great, but now I seem to be running out of memory again, even when there are not a lot of programs open.
    I’ve started tracking memory usage with Activity Monitor, and typically a huge chunk of my memory is “Inactive”. I.e., at this time I have 215 MB free, 450 MB Wired, 1.6 GB active, and 1.7 GB inactive. This despite only having Word, Outlook, OmniOutliner, Safari and iTunes open. Under System Memory (in Activity Monitor) it says Finder at 250 MB, Word at 131 MB, iTunes at 120 MB, Outlook at 80 MB, OO at 46 MB, and Dropbox at 34 MB (then a bunch of smaller usages). Even being very generous, the total memory usage only seems to add up to ~1GB, far short of the 4 GB installed.
    I have no idea what a real “memory leak” actually is, but I’ve heard the term bandied about. I’ve had some weird, nonreproducible system crashes in the last few months where the system just totally freezes, often (but not always) putting a nice colour pattern on the monitors. Looking around, some folks have said that this might be due to a memory problem since everything else seems to check out AOK.
    Thus, several questions:
    Might I have a “memory leak”? If so, how do I diagnose and fix it?
    What is the 1.7 GB of “inactive” memory being used for? Why is my Free memory so small when this big chunk of inactive memory is sitting there?
    Thank you very much!
    OS 10.8.2, 2.8 GHz Intel Core 2 Duo with 4 GB 800 MHz DDR2 SDRAM

    The way Safari accumulates memory is normal. The way it is trying to page the memory to disc and error-ing is not. I think the integrity of your disc volume / catalog and directories may be to blame.
    Try a bit of basic maintenance:
    Repairing permissions is important, and should always be carried out both before and after any software installation or update.
    Go to Disk Utility (this is in your Utilities Folder in your Application folder) and click on the icon of your hard disk (not the one with all the numbers).
    In First Aid, click on Repair Permissions.
    This only takes a minute or two in Tiger, but much longer in Leopard.
    Background information here:
    http://docs.info.apple.com/article.html?artnum=25751
    and here:
    http://docs.info.apple.com/article.html?artnum=302672
    An article on troubleshooting Permissions can be found here:
    http://support.apple.com/kb/HT2963
    By the way, you can ignore any messages about SUID or ACL file permissions, as explained here:
    http://support.apple.com/kb/TS1448?viewlocale=en_US
    If you were having any serious problems with your Mac you might as well complete the exercise by repairing your hard disk as well. You cannot do this from the same start-up disk. Reboot from your install disk (holding down the C key). Once it opens, select your language, and then go to Disk Utility from the Utilities menu. Select your hard disk as before and click Repair.
    Once that is complete reboot again from your usual start-up disk.
    More useful reading here:
    Resolve startup issues and perform disk maintenance with Disk Utility and fsck
    http://support.apple.com/kb/TS1417?viewlocale=en_US
    For a full description of how to resolve Disk, Permission and Cache Corruption, you should read this FAQ from the X Lab:
    http://www.thexlab.com/faqs/repairprocess.html

  • My iMac keeps crashing due to a memory leak....  Any thoughts on what this means?

    I'll be using my iMac (27" late 2009) and it will suddenly cut to black.  Then after a second or two, a grey screen will appear and tell me an issue occured and to push any key to restart.  Once the computer restarts, the issue report pops up and it says I have a memory leak.  I don't know what that means, or how to fix it.  Any thoughts on the cause of why it's doing this, or the impending doom it may be heralding?  I've posted the issue report below incase anyone can glean anything from it.  Thanks for your help.
    Fri Feb 14 14:19:08 2014
    panic(cpu 4 caller 0xffffff801185211d): "zalloc: zone map exhausted while allocating from zone kalloc.64, likely due to memory leak in zone kalloc.64 (2370900672 total bytes, 37045323 elements allocated)"@/SourceCache/xnu/xnu-2422.1.72/osfmk/kern/zalloc.c:2494
    Backtrace (CPU 4), Frame : Return Address
    0xffffff8104ed3a30 : 0xffffff8011822f69
    0xffffff8104ed3ab0 : 0xffffff801185211d
    0xffffff8104ed3bb0 : 0xffffff801182aa2f
    0xffffff8104ed3be0 : 0xffffff8011c4bb5d
    0xffffff8104ed3c10 : 0xffffff8011c4c0b7
    0xffffff8104ed3c40 : 0xffffff8011c61b3a
    0xffffff8104ed3c60 : 0xffffff8011c61b91
    0xffffff8104ed3ca0 : 0xffffff8011c61d12
    0xffffff8104ed3ce0 : 0xffffff8011c93663
    0xffffff8104ed3d20 : 0xffffff8011c4abde
    0xffffff8104ed3eb0 : 0xffffff8011c4ada7
    0xffffff8104ed3ee0 : 0xffffff8011c8e4c3
    0xffffff8104ed3f50 : 0xffffff8011c93cc4
    0xffffff8104ed3f70 : 0xffffff7f923edbfb
    0xffffff8104ed3fa0 : 0xffffff7f923edc6e
    0xffffff8104ed3fb0 : 0xffffff80118d6aa7
          Kernel Extensions in backtrace:
             com.razer.common.razerhid(4.43)[1B7FEBF6-6668-A183-C80E-505105E80B16]@0xffffff7 f923e8000->0xffffff7f923fdfff
                dependency: com.apple.iokit.IOUSBFamily(650.4.4)[972D3024-AF9C-3E09-A9EC-D9AB2A559B38]@0xff ffff7f921cb000
                dependency: com.apple.iokit.IOHIDFamily(2.0.0)[1185D338-98A5-345E-84F8-E59DF819A61B]@0xffff ff7f92288000
                dependency: com.apple.iokit.IOUSBHIDDriver(650.4.4)[B79A7E01-DD3F-3C1A-840A-879D262C69DE]@0 xffffff7f9230d000
                dependency: com.apple.driver.IOBluetoothHIDDriver(4.2.0f6)[BDBCA485-A5D3-3EE0-A782-60D83447 BAEB]@0xffffff7f923d4000
    BSD process name corresponding to current thread: kernel_task
    Boot args: mbasd=1
    Mac OS version:
    13B42
    Kernel version:
    Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64
    Kernel UUID: 1D9369E3-D0A5-31B6-8D16-BFFBBB390393
    Kernel slide:     0x0000000011600000
    Kernel text base: 0xffffff8011800000
    System model name: iMac11,1 (Mac-F2268DAE)
    System uptime in nanoseconds: 6500042405956
    vm objects:14896672
    vm object hash entri:1422080
    VM map entries:3665920
    pv_list:14364672
    vm pages:148044672
    kalloc.16:296143584
    kalloc.32:296364096
    kalloc.64:2370900672
    kalloc.128:8413184
    kalloc.256:2584576
    kalloc.512:2330624
    kalloc.1024:5713920
    kalloc.2048:1327104
    kalloc.4096:1859584
    kalloc.8192:6995968
    ipc ports:3312960
    threads:3060288
    uthreads:1891008
    vnodes:27132000
    namecache:10648800
    HFS node:36340432
    HFS fork:4812800
    buf.4096:2613248
    buf.8192:34643968
    ubc_info zone:2554704
    vnode pager structur:1418040
    Kernel Stacks:25870336
    PageTables:75939840
    Kalloc.Large:37970463
    Backtrace suspected of leaking: (outstanding bytes: 60608)
    0xffffff8011851c23
    0xffffff801182aa2f
    0xffffff8011c4bb5d
    0xffffff8011c4d667
    0xffffff8011c8e5e7
    0xffffff8011c93cc4
    0xffffff7f923edbfb
    0xffffff7f923edc6e
          Kernel Extensions in backtrace:
             com.razer.common.razerhid(4.43)[1B7FEBF6-6668-A183-C80E-505105E80B16]@0xffffff7 f923e8000->0xffffff7f923fdfff
                dependency: com.apple.iokit.IOUSBFamily(650.4.4)[972D3024-AF9C-3E09-A9EC-D9AB2A559B38]@0xff ffff7f921cb000
                dependency: com.apple.iokit.IOHIDFamily(2.0.0)[1185D338-98A5-345E-84F8-E59DF819A61B]@0xffff ff7f92288000
                dependency: com.apple.iokit.IOUSBHIDDriver(650.4.4)[B79A7E01-DD3F-3C1A-840A-879D262C69DE]@0 xffffff7f9230d000
                dependency: com.apple.driver.IOBluetoothHIDDriver(4.2.0f6)[BDBCA485-A5D3-3EE0-A782-60D83447 BAEB]@0xffffff7f923d4000
    last loaded kext at 280540738124: com.apple.filesystems.msdosfs          1.9 (addr 0xffffff7f92483000, size 65536)
    loaded kexts:
    com.taoeffect.ispy.kext          2.0.2
    com.quark.driver.Tether64          1.1.0d3
    com.logmein.driver.LogMeInSoundDriver          1.0.0
    com.squirrels.airparrot.framebuffer          3
    com.squirrels.driver.AirParrotSpeakers          1.7
    com.razer.common.razerhid          4.43
    at.obdev.nke.LittleSnitch          4052
    com.apple.filesystems.msdosfs          1.9
    com.apple.filesystems.ntfs          3.11
    com.apple.driver.AppleTyMCEDriver          1.0.2d2
    com.apple.driver.AGPM          100.14.11
    com.apple.driver.AppleHWSensor          1.9.5d0
    com.apple.driver.AudioAUUC          1.60
    com.apple.filesystems.autofs          3.0
    com.apple.iokit.IOBluetoothSerialManager          4.2.0f6
    com.apple.driver.AppleMikeyHIDDriver          124
    com.apple.driver.AppleUpstreamUserClient          3.5.13
    com.apple.iokit.IOUserEthernet          1.0.0d1
    com.apple.driver.AppleHDAHardwareConfigDriver          2.5.3fc1
    com.apple.kext.AMDFramebuffer          1.1.4
    com.apple.driver.AppleHDA          2.5.3fc1
    com.apple.Dont_Steal_Mac_OS_X          7.0.0
    com.apple.ATIRadeonX2000          8.1.8
    com.apple.driver.AppleHWAccess          1
    com.apple.driver.AppleMuxControl          3.4.12
    com.apple.driver.AppleBacklight          170.3.5
    com.apple.driver.AppleMikeyDriver          2.5.3fc1
    com.apple.iokit.IOBluetoothUSBDFU          4.2.0f6
    com.apple.kext.AMD4800Controller          1.1.4
    com.apple.driver.AppleMCCSControl          1.1.12
    com.apple.driver.AppleLPC          1.7.0
    com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport          4.2.0f6
    com.apple.driver.ACPI_SMC_PlatformPlugin          1.0.0
    com.apple.driver.AppleUSBCardReader          3.3.5
    com.apple.driver.AppleIRController          325.7
    com.apple.driver.AppleFileSystemDriver          3.0.1
    com.apple.AppleFSCompression.AppleFSCompressionTypeDataless          1.0.0d1
    com.apple.AppleFSCompression.AppleFSCompressionTypeZlib          1.0.0d1
    com.apple.BootCache          35
    com.apple.iokit.SCSITaskUserClient          3.6.0
    com.apple.driver.XsanFilter          404
    com.apple.iokit.IOAHCIBlockStorage          2.4.0
    com.apple.driver.AppleUSBHub          650.4.4
    com.apple.driver.AppleFWOHCI          4.9.9
    com.apple.iokit.AppleBCM5701Ethernet          3.6.9b9
    com.apple.driver.AirPort.Atheros40          700.74.5
    com.apple.driver.AppleAHCIPort          2.9.5
    com.apple.driver.AppleUSBEHCI          650.4.1
    com.apple.driver.AppleUSBUHCI          650.4.0
    com.apple.driver.AppleACPIButtons          2.0
    com.apple.driver.AppleRTC          2.0
    com.apple.driver.AppleHPET          1.8
    com.apple.driver.AppleSMBIOS          2.0
    com.apple.driver.AppleACPIEC          2.0
    com.apple.driver.AppleAPIC          1.7
    com.apple.driver.AppleIntelCPUPowerManagementClient          216.0.0
    com.apple.nke.applicationfirewall          153
    com.apple.security.quarantine          3
    com.apple.driver.AppleIntelCPUPowerManagement          216.0.0
    com.apple.kext.triggers          1.0
    com.apple.iokit.IOSerialFamily          10.0.7
    com.apple.iokit.IOSurface          91
    com.apple.driver.DspFuncLib          2.5.3fc1
    com.apple.vecLib.kext          1.0.0
    com.apple.driver.AppleGraphicsControl          3.4.12
    com.apple.iokit.IOFireWireIP          2.2.5
    com.apple.driver.AppleBacklightExpert          1.0.4
    com.apple.iokit.IONDRVSupport          2.3.6
    com.apple.kext.AMDSupport          1.1.4
    com.apple.AppleGraphicsDeviceControl          3.4.12
    com.apple.iokit.IOAudioFamily          1.9.4fc11
    com.apple.kext.OSvKernDSPLib          1.14
    com.apple.driver.AppleSMBusController          1.0.11d1
    com.apple.driver.AppleSMBusPCI          1.0.12d1
    com.apple.driver.AppleHDAController          2.5.3fc1
    com.apple.iokit.IOGraphicsFamily          2.3.6
    com.apple.iokit.IOHDAFamily          2.5.3fc1
    com.apple.iokit.IOBluetoothHostControllerUSBTransport          4.2.0f6
    com.apple.driver.AppleSMC          3.1.6d1
    com.apple.driver.IOPlatformPluginLegacy          1.0.0
    com.apple.driver.IOPlatformPluginFamily          5.5.1d27
    com.apple.driver.IOBluetoothHIDDriver          4.2.0f6
    com.apple.iokit.IOBluetoothFamily          4.2.0f6
    com.apple.driver.AppleUSBHIDKeyboard          170.15
    com.apple.driver.AppleHIDKeyboard          170.15
    com.apple.iokit.IOSCSIBlockCommandsDevice          3.6.0
    com.apple.iokit.IOUSBMassStorageClass          3.6.0
    com.apple.iokit.IOUSBHIDDriver          650.4.4
    com.apple.driver.AppleUSBMergeNub          650.4.0
    com.apple.driver.AppleUSBComposite          650.4.0
    com.apple.iokit.IOSCSIMultimediaCommandsDevice          3.6.0
    com.apple.iokit.IOBDStorageFamily          1.7
    com.apple.iokit.IODVDStorageFamily          1.7.1
    com.apple.iokit.IOCDStorageFamily          1.7.1
    com.apple.iokit.IOAHCISerialATAPI          2.6.0
    com.apple.iokit.IOSCSIArchitectureModelFamily          3.6.0
    com.apple.iokit.IOUSBUserClient          650.4.4
    com.apple.iokit.IOFireWireFamily          4.5.5
    com.apple.iokit.IOEthernetAVBController          1.0.3b3
    com.apple.driver.mDNSOffloadUserClient          1.0.1b4
    com.apple.iokit.IO80211Family          600.34
    com.apple.iokit.IONetworkingFamily          3.2
    com.apple.iokit.IOAHCIFamily          2.6.0
    com.apple.iokit.IOUSBFamily          650.4.4
    com.apple.driver.AppleEFINVRAM          2.0
    com.apple.iokit.IOHIDFamily          2.0.0
    com.apple.driver.AppleEFIRuntime          2.0
    com.apple.iokit.IOSMBusFamily          1.1
    com.apple.security.sandbox          278.10
    com.apple.kext.AppleMatch          1.0.0d1
    com.apple.security.TMSafetyNet          7
    com.apple.driver.AppleKeyStore          2
    com.apple.driver.DiskImages          371.1
    com.apple.iokit.IOStorageFamily          1.9
    com.apple.iokit.IOReportFamily          21
    com.apple.driver.AppleFDEKeyStore          28.30
    com.apple.driver.AppleACPIPlatform          2.0
    com.apple.iokit.IOPCIFamily          2.8
    com.apple.iokit.IOACPIFamily          1.4
    com.apple.kec.pthread          1
    com.apple.kec.corecrypto          1.0
    Model: iMac11,1, BootROM IM111.0034.B02, 4 processors, Intel Core i7, 2.8 GHz, 8 GB, SMC 1.54f36
    Graphics: ATI Radeon HD 4850, ATI Radeon HD 4850, PCIe, 512 MB
    Memory Module: BANK 0/DIMM0, 2 GB, DDR3, 1067 MHz, 0x80AD, 0x484D54313235533642465238432D47372020
    Memory Module: BANK 1/DIMM0, 2 GB, DDR3, 1067 MHz, 0x80AD, 0x484D54313235533642465238432D47372020
    Memory Module: BANK 0/DIMM1, 2 GB, DDR3, 1067 MHz, 0x80AD, 0x484D54313235533642465238432D47372020
    Memory Module: BANK 1/DIMM1, 2 GB, DDR3, 1067 MHz, 0x80AD, 0x484D54313235533642465238432D47372020
    AirPort: spairport_wireless_card_type_airport_extreme (0x168C, 0x8F), Atheros 9280: 4.0.74.0-P2P
    Bluetooth: Version 4.2.0f6 12982, 3 services, 23 devices, 1 incoming serial ports
    Network Service: Ethernet, Ethernet, en0
    Serial ATA Device: ST31000528ASQ, 1 TB
    Serial ATA Device: HL-DT-ST DVDRW  GA11N
    USB Device: Hub
    USB Device: Internal Memory Card Reader
    USB Device: BRCM2046 Hub
    USB Device: Bluetooth USB Host Controller
    USB Device: Hub
    USB Device: Keyboard Hub
    USB Device: Razer DeathAdder
    USB Device: Apple Keyboard
    USB Device: IR Receiver
    USB Device: Built-in iSight
    Thunderbolt Bus:

    Boot into safe mode (restart holding down SHIFT key). If no KP, then uninstall and reinstall those 3rd-party items that Roger pointed out, one at a time, and restart. Continue until you determine which ones are causing the problem. If KP while in safe mode, then most likely hardware related. Run the Apple Hardware Test suite, extended tests at least twice, followed by Rember.  See
    OS X About kernel panics,
    Technical Note TN2063: Understanding and Debugging Kernel Panics,
    Mac OS X Kernel Panic FAQ,
    Resolving Kernel Panics,
    How to troubleshoot a kernel panic, and
    Tutorial: Avoiding and eliminating Kernel panics for more details.

  • Htmleditorkit memory leak

    We are using the HtmlEditorKit class to parse documents in a Java program using Java version 1.4.1_02. While the class seems to work correctly, we eventually run out of memory when processing large numbers of documents. The problem seems to worsen when we process big documents. We had the same problem with Java version 1.4.0_03. In our class constructor we have the following code:
    // create the HTML document
    kit = new HTMLEditorKit();
    doc = kit.createDefaultDocument();
    Inside our processing loop we do the following:
    if (doc.getLength() > 0 ) {
    doc.remove(0, doc.getLength());
    // Create a reader on the HTML content.
    Reader rd = getReader(inFilePath);
    // Parse the HTML. -- Here is a memory leak
    kit.read(rd, doc, 0);
    // Close a reader
    rd.close();
    Any help will be much appreciated.
    Michael Sperling
    516-998-4803

    Hi,
    if you process HTML files in a loop I assume you do not want to actually show them on the screen. It seems as if you rather do something with the HTML file such as reading the HTML code and change it / store it / transform it as you go in batch type of manner on multiple files.
    If the above is true I would not recommend to use HTMLEditorKit.read at all because this will not only parse HTML, it will also build a HTMLDocument with respective element structure each time. This in turn is only necessary for showing the HTML file in a text component and to work on the document interactively.
    Depending on the actual purpose of your processing loop, you might want to simply parse the HTML file using class HTMLEditorKit.ParserCallback. By creating a subclass if HTMLEditorKit.ParserCallback you can implement / customize the way you would like to process HTML files.
    The customized subclass of HTMLEditorKit.ParserCallback then can be used by calling
    new ParserDelegator().parse(new FileReader(srcFileName), MyParserCallback, true);
    HTH
    Ulrich

Maybe you are looking for

  • How do you service an iPod touch with apple but you didn't buy it at apple

    Well bought my iPod touch at costco w/dead pixels. Is it possible to service it with apple? If so, Is it free? How reliable is it? How fast is it?

  • MySQL database - Recordset's echoing problem

    Gary, David & any other PHP wizards, listen up - Today I decided to use a MySQL database to hold my articles in, and then call them with a recordset when applicable. Everything works really, really nicely except for one thing. If you go here: http://

  • Cannot import .mov files into FCE

    I bought a new Kodak Zi8 pocket video camera to use to finish a video project because my right hand is in a cast and I cannot use my HD video camera. Unfortunately for me, I have a deadline to meet. I shot video at 720p and tried to import it into FC

  • Migrating from dev6 to dev11

    Hi! I have encountered a problem. I have converted forms from dev6 to dev11. Everything is working properly but.. I used to have only one window (MDI window with the menu). Now, with dev11 I have one more window (below the menu) that I can't get rid

  • Disk Utility "frozen" trying to format external drive

    some help please... I've got a 120gb external USB/NDAS drive that was previously formatted in NFTS on a Windows XP machine. Using Disk Utility on my new MacBook, I attempted to erase it and reformat it using the "MS-DOS" option in Disk Utility (so I