Regarding closing the cursor

Hi,
I've one doubt. If we've opened any cursor in pl/sql session, & did not close it during code run, is there any chance that the cursor will remain open?
My problem here is as below:
We're calling a pl/sql package through a java based application, & the connection will automatically close oracle session after 1/2 hour inactivity. But the oracle session is not getting closed. Probability is that the oracle session is still active(which may be because of open cursor)
Inside a package, a open cusror call was made, but there was no close cursor statement. Can this statement create any problem like above or is there any other possibility.
Thanks
Deepak

The issue seems to be a concern that rows listed in V$OPEN_CURSOR are currently open. My experience is that that may not necessarily be the case.
While rows in V$OPEN_CURSOR were probably open sometime in the recent past, there's no guarantee they are open RIGHT NOW. Sometimes entries get left in the V$ tables long after I think they should be aged out (this morning I found a last executed time in V$SYSSTAT from 2 days ago). Conversely, sometimes I cannot find things I am looking for that are running right now.
I agree with Rob's assessment that if you're not using a cursor it needs to be closed to release system resources.

Similar Messages

  • REGARDING position the cursor at the end of the field

    i friends,
    i have a field having length of 20 ,i need to place the cursor at the end of the filed means at the 20 th position the cursor must be there how will i acieve this...plz help me the value which i will pass to this field is may be of character 4 ,5 what ever but the cursor will be always at the 20th position or at the end of the filed plz help me.......

    parameters:pa_str(20) type c default '11111111111111111111' .
    initialization.                   .
    Set cursor field 'PA_STR' offset 20.

  • Regarding closing the thread

    experts,
    how to close the answered posted threads from the forum.
    thanks and regards

    hii
    Above your thread there will be a small message displayed like
    Your question is not answered.
    Mark as answered.
    from there you can click on mark as answered..and your thread will be closed ..another option is if you give 10 points to somebody's answer then also that thread will be closed automatically.
    regards
    twinkal
    Edited by: twinkal patel on Jul 24, 2008 8:54 AM

  • Regarding Closing the application

    Hai Experts,
    I have developed an application with table UI element and in that table if i select the record i.e lead selection it has to navigate to another new application.This operation is working fine but if the new application opens on that time i need to close the application with table UI element.
    I dont know how to close the application .Can u tell me the solution? 
    With Regards

    Hi,
    Here u can make use of Exit Plug.In the window create an outbound plug of Exit type with Interface Check box ticked along with an importing parameter CLOSE_WINDOW of type boolean.
    Also create and inbound plug in the window and in the handler methos of this plug,fire the exit plug as,
    wd_this->fire_<exitplugname>( close_window = 'X').
    Now in ur view,while selecting via lead selection,on the action fire the outbound plug of the view that is linked with the exit plug of the window.
    Now while ur record is selected,the outbound plug of the view calls the exit plug and in turn coding inside the hander is executed and the applicaton window is closed.
    Hope it helps u!!!!!!!!
    Thanks,
    Divya.S

  • Open cursors are NOT closed only by closing the ResultSet or Statement

    I've realised that the open cursors are only closed by closing the connection.
    In my example code I have for-loop with a vector of table-names. For every table-name I start a query to retrieve metainformation (row-size, column-names). Although I close the ResultSet (which automatically closes the PreparedStatement/Statement) I reached after the 150th loop a max-cursor-exception (ora-01000) ?!
    It seems that there is only the workaround to close and re-open the connection at the end of the for-loop. Which is performance-side pretty bad :-(.
    Is there really no other solution?
    Besides: does anyone know WHY the statement.close() also closes the ResultSet?? I think this is a bad design (hence to tight dependency between both classes). What if the garbage collector closes the statement (and hence to the JDOC the statement.close()-method also closes the ResultSet)? For example if a method uses a local Statement and returns a ResultSet (and the Statement-garbage is collected), then the ResultSet would cause an exception?!
    Thanks for the help in advance
    Tai

    I've realised that the open cursors are only closed by
    closing the connection.Or by closing the Statement!
    In my example code I have for-loop with a vector of
    table-names. For every table-name I start a query to
    retrieve metainformation (row-size, column-names).
    Although I close the ResultSet (which automatically
    closes the PreparedStatement/Statement) I reached
    after the 150th loop a max-cursor-exception
    (ora-01000) ?!Closing the ResutSet does not automatically close the PreparedStatement/Statement.
    >
    It seems that there is only the workaround to close
    and re-open the connection at the end of the for-loop.
    Which is performance-side pretty bad :-(.
    Is there really no other solution?
    Just explicitly close the PreparedStatement/Statement!
    Besides: does anyone know WHY the statement.close()
    also closes the ResultSet?? You need to think of a resultset as a live connection to the database.
    Consider SELECT * FROM ABIGTABLE, it would be inefficient to populate the Resultset with all of the rows (could even eat up all memory) so the first n rows are returned ( n = Statement.getFetchSize() ) and the next n rows are returned as needed.
    I think this is a bad
    design (hence to tight dependency between both
    classes). What if the garbage collector closes the
    statement (and hence to the JDOC the
    statement.close()-method also closes the ResultSet)?
    For example if a method uses a local Statement and
    returns a ResultSet (and the Statement-garbage is
    collected), then the ResultSet would cause an
    exception?!You should use a statment and resultset, read all your data into a collection or a CachedRowSet (http://www.javaworld.com/javaworld/jw-02-2001/jw-0202-cachedrow.html) then close the statment as soon as possible. Never return a resultset form your data tier: that is tight coupling between the tiers of your application!

  • Hi my trackpad is frozen and I also could not get force quit to work, I closed the top down and now I cannot get past the login and the cursor will not move, does anyone have any ideas

    Hi my trackpad is frozen and I also could not get force quit to work, I closed the top down and now I cannot get past the login and the cursor will not move, does anyone have any ideas

    Try these two steps:
    Intel-based Macs: Resetting the System Management Controller (SMC)
    Resetting your Mac's PRAM and NVRAM

  • My mouse/trackpad are completely out of control. The cursor/arrow is flying all over the screen and closing/opening windows. What is the solution to this? Downloading windows for Mac?

    So far I'm dissapointed with Mac O/S .....so many areas lack common sense, require unnessary extra clicks and is not as customizable as Windows. It's like Apple thinks you are a child and not entitled to choose for yourself so that they can control your info for you.
    The mouse/trackpad problem is a major issue that Apple should be proactive in offering a solution for. If anyone has a solution to this I'd be greateful to hear it.
    Thanks, 

    Is this the first time you're using a Mac?
    If so the learning curve is somewhat steep - but, if you put in the time and use this knowledge base whenever you run into issues you'll be up to speed soon enough.
    With regards to the trackpad/mouse, you can adjust the sensitivity by:
    1. Click the Apple Logo on the top left hard corner of your screen
    2. Click System Preferences
    3. Click Trackpad
    Adjust the tracking speed to your specifications.
    Also familiarise yourself with the gestures (activate the ones you can remember)
    To go back to the menue by clicking Show All
    4. Click Mouse
    Adjust your mouse settings to your specification.
    And why use mac?
    It just works...
    (most of the time ;p)

  • How to close the cursor automatically after some time?

    Hi,
    In my application we are opening the REF cursors many times,
    but if thre are any problems then the cursor is not closing , it
    remains in the pool. Is there any parameter settig to set a
    perticular period of time. Because all the cursors are mostly
    for data retriving (read only) only.
    Or is there any alternative way for this?
    I hope serializable refcursors will help, is there any link to
    know more about these serializable curosrs?.
    regards,
    khaleel

    Try this.
    - Partha
    LabVIEW - Wires that catch bugs!
    Attachments:
    MainVI.vi ‏18 KB
    SubVI.vi ‏25 KB

  • Open and closed hand cursors

    I have a drag image application and I wanted to use the open and closed hand cursors to move the image about. It seems there is no easy way of accessing these in Java. After searching for cursor names etc.. I decided to hard code the cursors from the .gif image. Also I didn't want the .GIFs as files as this adds to loading problems so I ended up using arrays of pixels that took a little while to enter.
    I'm giving you the code if you ever need to use it as I typed it in and wouldn't want anyone else to have to do the same.
    int curWidth=32;
                   int curHeight=32;
                   int curCol;
                   Image img;
                   int x,y;
                   int closed_black[] = { 6,5,7,5,9,5,10,5,12,5,13,5,5,6,8,6,11,6,14,6,
                             15,6,5,7,14,7,16,7,6,8,16,8,5,9,6,9,16,9,4,10,
                             16,10,4,11,16,11,4,12,15,12,5,13,15,13,6,14,14,14,
                             7,15,14,15,7,16,14,16,0};
                   int closed_white[] = { 6,4,7,4,9,4,10,4,12,4,13,4,5,5,8,5,11,5,14,5,15,5,
                             4,6,6,6,7,6,9,6,10,6,12,6,13,6,16,6,4,7,15,7,17,7,
                             5,8,17,8,4,9,17,9,3,10,5,10,15,10,17,10,3,11,17,11,
                             3,12,16,12,4,13,16,13,5,14,15,14,6,15,15,15,6,16,
                             15,16,7,17,14,17,0};
                   int closed_whiteruns[] = {6,13,7,15,7,15,5,15,5,15,5,14,6,14,7,13,8,13,8,13,0};
                   int open_black[] = { 10,3,11,3,6,4,7,4,9,4,12,4,13,4,14,4,5,5,8,5,9,5,12,5,
                             15,5,5,6,8,6,9,6,12,6,15,6,17,6,6,7,9,7,12,7,15,7,16,7,18,7,
                             6,8,9,8,12,8,15,8,18,8,4,9,5,9,7,9,15,9,18,9,3,10,6,10,7,10,
                             18,10,3,11,7,11,17,11,4,12,17,12,5,13,17,13,5,14,16,14,6,15,
                             16,15,7,16,15,16,8,17,15,17,8,18,15,18,0};
                   int open_white[] = {10,2,11,2,6,3,7,3,9,3,12,3,13,3,5,4,8,4,10,4,11,4,15,4,
                             4,5,6,5,7,5,10,5,11,5,13,5,14,5,16,5,17,5,4,6,6,6,7,6,10,6,
                             11,6,13,6,14,6,16,6,18,6,5,7,7,7,8,7,10,7,11,7,13,7,14,7,17,7,
                             19,7,4,8,5,8,7,8,8,8,10,8,11,8,13,8,14,8,16,8,17,7,19,8,3,9,6,9,
                             16,9,17,9,19,9,2,10,4,10,5,10,19,10,2,11,18,11,3,12,18,12,4,13,
                             18,13,4,14,17,14,5,15,17,15,6,16,16,16,7,17,18,17,7,18,16,18,
                             8,19,15,19,0};
                   int open_whiteruns[] = {9,14,8,17,4,16,5,16,6,16,6,15,7,15,8,14,9,14,9,14,0};                    
                   int pix[] = new int[curWidth*curHeight];
                   for(y=0; y<=curHeight; y++) for(x=0; x<=curWidth; x++) pix[y+x]=0; // all points transparent
                   // black pixels
                   curCol=Color.black.getRGB();
                   int n=0;
                   while(closed_black[n]!=0)
                        pix[closed_black[n++]+closed_black[n++]*curWidth]=curCol;
                   // white pixels
                   curCol=Color.white.getRGB();
                   n=0;
                   while(closed_white[n]!=0)
                        pix[closed_white[n++]+closed_white[n++]*curWidth]=curCol;
                   // white pixel runs
                   n=0;
                   y=7;
                   while(closed_whiteruns[n]!=0) {
                        for(x=closed_whiteruns[n++];x<closed_whiteruns[n];x++)
                             pix[x+y*curWidth]=curCol;
                        n++; y++;
                   img = createImage(new MemoryImageSource(curWidth,curHeight,pix,0,curWidth));
                   closedhandCursor = Toolkit.getDefaultToolkit().createCustomCursor(img,new Point(5,5),"closedhand");
                   for(y=0; y<=curHeight; y++) for(x=0; x<=curWidth; x++) pix[y+x]=0; // all points transparent
                   // black pixels
                   curCol=Color.black.getRGB();
                   n=0;
                   while(open_black[n]!=0)
                        pix[open_black[n++]+open_black[n++]*curWidth]=curCol;
                   // white pixels
                   curCol=Color.white.getRGB();
                   n=0;
                   while(open_white[n]!=0)
                        pix[open_white[n++]+open_white[n++]*curWidth]=curCol;
                   // white pixel runs
                   n=0;
                   y=9;
                   while(open_whiteruns[n]!=0) {
                        for(x=open_whiteruns[n++];x<open_whiteruns[n];x++)
                             pix[x+y*curWidth]=curCol;
                        n++; y++;
                   img = createImage(new MemoryImageSource(curWidth,curHeight,pix,0,curWidth));
                   openhandCursor = Toolkit.getDefaultToolkit().createCustomCursor(img,new Point(5,5),"openhand");
                   setCursor(openhandCursor);you need to define openhandCursor and closedhandCursor with your other cursor definitions (I made them default to start with) and then just use setcursor as normal. There must be an easier way to do this!
    p.s. thanks to Martin Zvarik for the original code here: http://www.jguru.com/faq/view.jsp?EID=9958

    Hi,
    you can use the same query...Also check the new code after the select..
    SELECT BUKRS BELNR GJAHR <b>BSTAT</b>
    FROM BKPF
    INTO TABLE T_BKPF
    WHERE BUKRS = P_BUKRS
    AND BSTAT IN ( ' ' , 'A' ) " ' ' - Normal document, A - Parked doc
    AND BLART = P_BLART
    AND CPUDT IN SO_CPUDT " Selection screen input.
    IF NOT T_BKPF[] IS INITIAL.
    SELECT BUKRS BELNR GJAHR BUZEI EBELN AUGBL AUGBT
    INTO TABLE T_BSEG
    FOR ALL ENTRIES IN T_BKPF
    WHERE BUKRS = T_BKPF-BUKRS
    AND BELNR = T_BKPF-BELNR
    AND GJAHR = T_BKPF-GJAHR
    AND EBELN IN SO_EBELN " selection-screen input
    ENDIF.
    LOOP AT T_BKPF.
    Parked
      IF T_BKPF-BSTAT = 'A'.
        WRITE: / T_BKPF-BELNR , ' - Parked'.
    process the next record.
        CONTINUE.
      ENDIF.
    Check for Open / Closed.
      LOOP AT T_BSEG WHERE BELNR = T_BKPF-BELNR
                                   AND      BUKRS = T_BKPF-BUKRS
                                   AND      GJAHR = T_BKPF-GJAHR
                                   AND      AUGBL <> ' '.
        EXIT.
      ENDLOOP.
    If the return code is 0 then the document is cleared..
      IF sy-subrc = 0.
        WRITE: / T_BKPF-BELNR , ' - Closed'.
    Else the document is not cleared.
      ELSE.
        WRITE: / T_BKPF-BELNR , ' - Open'.
      ENDIF.
    ENDLOOP.
    Thanks,
    Naren

  • Set the cursor busy steered by supanel vi

    I let run a vi and there is a subpanel. Is there a way that I can set the cursor busy steered by the subpanel vi. I pass the reference of the mainvi over a global variable into subvi. Without success there is no error message but the busy cursor does not appear. Just setting the cursor in subvi creates a null window error. Is there a easy way to implement it. Or do I have to use user events in main vi called by suvi an then se it busy. Would be not so nice to understand it later.
    kind regards reto

    I attach my test VI (LV 8.0). You can try it.
    Attachments:
    test sub.vi ‏17 KB
    test.vi ‏22 KB
    test global.vi ‏4 KB

  • Closing the Statement returned from ResultSet.getStatement does not work

    With the ORACLE JDBC driver, I have discovered (the hard way) that it is essential to explictly close a Statement object after use. (http://www.orafaq.com/node/758 was useful here).
    Failure to do so leaves the Cursor open and eventually your application will fail with the ORA-01000 Too Many Cursors error.
    That works well if your code still has access to the Statement object which it created when it has finished with the results from executing the Statement.
    But, I've inherited some code where this is not the case. The results in the form of a ResultSet are passed through a few layers before it is eventually processed and can then be closed. The original Statement object is no longer available.
    I thought then that the solution would be use the ResultSet.getStatement method and to close that Statement.
    BUT that doesn't seem to work. The number of cursors continues to go up.
    Any ideas, anyone?
    (I'm using ojdbc6.jar and ORACLE 10g Express.)
    Edited by: Termind on 22-Jul-2010 10:00

    Copied in second message as first gets unreadable...
    eclipse.buildId=I20070625-1500
    java.version=1.5.0_18
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
    Command-line arguments:  -os win32 -ws win32 -arch x86 -data D:\Dokumente\Projekte\workspace
    Error
    Tue Sep 29 11:30:49 CEST 2009
    Unhandled event loop exception
    java.lang.NullPointerException
    at org.eclipse.jpt.db.internal.ForeignKey.getReferencedTable(ForeignKey.java:104)
    at org.eclipse.jpt.gen.internal.GenTable.addReferencedTablesTo(GenTable.java:106)
    at org.eclipse.jpt.gen.internal.GenScope.buildReferencedTables(GenScope.java:169)
    at org.eclipse.jpt.gen.internal.GenScope.configureManyToManyRelations(GenScope.java:81)
    at org.eclipse.jpt.gen.internal.GenScope.initialize(GenScope.java:46)
    at org.eclipse.jpt.gen.internal.GenScope.<init>(GenScope.java:33)
    at org.eclipse.jpt.gen.internal.PackageGenerator.<init>(PackageGenerator.java:48)
    at org.eclipse.jpt.gen.internal.PackageGenerator.generateEntities(PackageGenerator.java:38)
    at org.eclipse.jpt.ui.internal.generic.EntitiesGenerator$GenerateEntitiesRunnable.run(EntitiesGenerator.java:129)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1779)

  • I lose the connection when closing the CMD

    Hi guys,
    I have configured a standalone listener as following:
    C:\Program Files (x86)\Java\jre6\bin> java -Dapex.home=D:\list -Dapex.images=C:\images -jar D:\apex.war
    Afterward,
    If I close the CMD, I will lose the connection, and I have to reconfigure it again.
    If I open APEX locally , I mean by using the shortcut "Get Started With Oracle Database 11g Express Edition" , Then I will lose the connection that uses the default port of the listener, that is 8080.
    After I configured the listener I got this message on the CMD
    -- listing properties --
    PropertyCheckInterval=60
    ValidateConnection=true
    MinLimit=1
    MaxLimit=10
    InitialLimit=3
    AbandonedConnectionTimeout=900
    MaxStatementsLimit=10
    InactivityTimeout=1800
    MaxConnectionReuseCount=1000
    APEX Listener version : 1.1.2.131.15.23
    APEX Listener server info: Grizzly/1.9.18-o
    May 21, 2011 5:14:41 PM com.sun.grizzly.Controller logVersion
    INFO: Starting Grizzly Framework 1.9.18-o - Sat May 21 17:14:41 GST 2011
    INFO: http://localhost:8080/apex started.
    Using JDBC driver: Oracle JDBC driver version: 11.2.0.2.0
    Regards,

    Hi,
    I'm not sure I got your question right, but I'll try to find some solution anyway.
    If I close the CMD, I will lose the connection, and I have to reconfigure it again.That's what happens when a shell is terminated - all associated processes will stop as well. However, if you have a apex-config.xml in your apex.home you shouldn't need to configure your APEX Listener each time your start it, but it would reuse an existing configuration.
    If I open APEX locally , I mean by using the shortcut "Get Started With Oracle Database 11g Express Edition" , Then I will lose the connection that uses the default port of the listener, that is 8080.Now, if you have XE running on the same (local) machine as you have your APEX Listener running in standalone mode, you probably have a port conflict: By default, both APEX Listener in standalone mode and the Embedded PL/SQL Gateway (EPG) use port 8080. The EPG is activated as web server for APEX in XE after a fresh installation, the APEX Listener would be an alternative in that case. You can either stop the EPG, or reconfigure any of the two web servers to use a different port, if you want to run them parallel.
    To change the port used by the APEX Listener in standalone mode, you simply add another parameter to the startup: -Dapex.port=8888 and you're done.
    To change the port used by the EPG, connect as sys and run the following
    EXEC DBMS_XDB.SETHTTPPORT(8888);
    COMMIT;If you want to disable the EPG, simply set the port to *0* .
    After I configured the listener I got this message on the CMDThat's what it should look like.
    No, since your topic is "lose the connection when closing the CMD", I assume you search for an alternative. You could run the APEX Listener as a Windows service, even in standalone mode. To do this, you create a batch file, e.g.
    %JAVA_HOME%\java -Dapex.home=D:\oracle\APEX_Listener\_home -Dapex.images=D:\oracle\apex_4_0_2\images -Dapex.port=8888 -jar D:\oracle\APEX_Listener\apex_listener.1.1.2.131.15.23\apex.war >>D:\oracle\APEX_Listener\apex_listener.1.1.2.131.15.23\my_apex_listener.log 2>&1Note that you have to set JAVA_HOME as system property or replace the call with the absolute path to your JDK or make sure the JDK is in your PATH variable.
    Of course, you can and should change the other directories as well to fit to your system.
    Next, create a Windows service, e.g. using [url https://iain.cx/src/nssm/]NSSM (free) or [url http://support.microsoft.com/kb/137890]SRVANY (MS, non-free), that starts your batch as a windows service.
    The command for creating that service using NSSM could look as follows
    nssm install APEX_Listener D:\oracle\APEX_Listener\apex_listener.1.1.2.131.15.23\startup.cmdYou can edit the service properties afterwards, e.g. change the start mode from "Automatic" to "On Demand".
    I hope this answers your question. If not, please point me into the right direction.
    Thanks,
    Udo

  • Sometimes when I open my laptop back from sleep, I get a black screen with the cursor showing.

    Recently I've been getting this weird problem where my macbook air will show a black screen with only the cursor visible that I can move around but nothing else can be done to get to the desktop. The only way is to close the lid and wait for around 10 or more seconds and then open the lid again to bring the laptop back from sleep and hope that the laptop goes to the lock screen and then to the desktop. This works often but sometimes the only solution seems to be to restart the laptop. This also happens when I tilt the lid to the point where it is almost closed and when I tilt it back the screen presents the above state. Theis has been happening often now and it is almost impossible for the above not to happen atleast 2 to 3 times a day. iThis is a relatively new problem that has been occuring since the past two weeks or so and never happened to me on my Macbook Pro 15 2011. My current system is a Macbook Air 11" 2013 Haswell 1.3 Ghz 4GB RAM 256 GB SSD. Now I dont want to have to send in my laptop if I dont have to if there is a way I can solve this myself. Anybody else have this problem?

    Hello tseten,
    I would be concerned too if my MacBook Air was not waking from sleep appropriately.  For an issue like this, I recommend resetting your System Management Controller (SMC) and NVRAM.
    Resetting the SMC on portables with a battery you should not remove on your own
    Note: Portable computers that have a battery you should not remove on your own include MacBook Pro (Early 2009) and later, all models of MacBook Air, and MacBook (Late 2009).
    Shut down the computer.
    Plug in the MagSafe power adapter to a power source, connecting it to the Mac if its not already connected.
    On the built-in keyboard, press the (left side) Shift-Control-Option keys and the power button at the same time.
    Release all the keys and the power button at the same time.
    Press the power button to turn on the computer. 
    Note: The LED on the MagSafe power adapter may change states or temporarily turn off when you reset the SMC.
    You can find the full article here:
    Intel-based Macs: Resetting the System Management Controller (SMC)
    http://support.apple.com/kb/ht3964http://support.apple.com/kb/ht3964
    Resetting NVRAM / PRAM
    Shut down your Mac.
    Locate the following keys on the keyboard: Command (⌘), Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    Turn on the computer.
    Press and hold the Command-Option-P-R keys before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.
    You can find the full article here:
    About NVRAM and PRAM
    http://support.apple.com/kb/ht1379
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • Opening and closing a cursor

    I have read that, the cursor in a for loop will be opened and closed automatically. Will that be the same in the case of the code given below, where we are declaring the cursor before the for loop ?
    -- Code
    create or replace procedure test
    as
    begin
    -- some statements
    -- begin of another block
    declare
    cursor v_cursor is Select * from Employee;
    begin
    for cur in v_cursor loop
    -- loop statements
    end loop;
    end;
    end test; -- end of procedure
    Thanks in advance ..

    for more information on cursor for loop follow the link
    http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/01_oview.htm#767

  • Closing the Report Viewer causes the application to hang

    Hi,
    Since a few days we are experiencing some problems with the Crystal Reports viewer. When closing a report viewer in our application, the application hangs for a few minutes. The strange thing is, that it only seems to happen on Windows 7 and Windows 2008 R2 Server.
    Our application with the integrated Crystal Report Viewer is running on 2 application servers :
    - Windows 2008 Server, versie 6.0 Build 6002, Service Pack 2
    - Windows 2008 R2 Server versie 6.1, Build 7600
    Crystal Reports version installed on both servers : 12.01.0007.1144
    On the 2008 Server, the application works correctly.
    On the 2008 R2 server, the application hangs for about 5 minutes while closing the report preview window.
    Both server have exactly the same version of Crystal Reports and the same application version.
    I'm having the same issue on a Windows 7 x64 (6.1 Build 7600).
    I've installed all updates and hotfixes up to SP3 Fix Pack (12.3.3.812 / 12.3.2003.812) but I'm still having the same problem.
    We didn't have this problem until a few days ago, so I assume it has something to do with a windows update which only affects Windows 7 and Windows 2008 R2.
    Please advice us with a possible workaround, because our application is distributed to a few thousand users ...
    Some more debug info :
    This is the call of from the main thread when the application hangs :
         [Managed to Native Transition]     
    >     mscorlib.dll!System.__ComObject.ReleaseSelf() + 0x5 bytes     
         mscorlib.dll!System.Runtime.InteropServices.Marshal.ReleaseComObject(object o) + 0x8b bytes     
         CrystalDecisions.Shared.dll!CrystalDecisions.Shared.SharedUtils.ReleaseComObject(object obj = {CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass}) + 0x75 bytes     
         CrystalDecisions.CrystalReports.Engine.dll!CrystalDecisions.ReportAppServer.ISCDClientDocumentEvents_EventProvider.Dispose(bool bDisposeManaged = true) + 0x1a2 bytes     
         CrystalDecisions.CrystalReports.Engine.dll!CrystalDecisions.ReportAppServer.ISCDClientDocumentEvents_EventProvider.Dispose() + 0x32 bytes     
         CrystalDecisions.CrystalReports.Engine.dll!CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.DisconnectEventRelay() + 0xfc bytes     
         CrystalDecisions.CrystalReports.Engine.dll!CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.InternalClose(bool bSetupForNextReport = false, bool bAutoClose = true) + 0x10e bytes     
         CrystalDecisions.CrystalReports.Engine.dll!CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Dispose(bool bDisposeManaged = true) + 0xad bytes     
         System.dll!System.ComponentModel.Component.Dispose() + 0x12 bytes     
         CrystalDecisions.CrystalReports.Engine.dll!CrystalDecisions.CrystalReports.Engine.ReportDocument.ClearCache(bool clearDocument = true) + 0x9d bytes     
         CrystalDecisions.CrystalReports.Engine.dll!CrystalDecisions.CrystalReports.Engine.ReportDocument.InternalClose(bool bSetupForNextReport = true) + 0x81 bytes     
         CrystalDecisions.CrystalReports.Engine.dll!CrystalDecisions.CrystalReports.Engine.ReportDocument.Close() + 0x3f bytes     
         SyDelSoftControlLibCrystalReports.dll!SyDelSoft.ControlLib.CrystalReports.cReportForm.Dispose(bool disposing = true) + 0x55 bytes     
         SDProjects.exe!SDProjects.GUI.ReportForm.Dispose(bool disposing) + 0x38 bytes     
    SharedUtils.ReleaseComObject
    Kind regards,
    Frederic Hoornaert

    CrystalReportsDisposeIssue.crpe.Diagnostics.0.log
    --> Form3 closed
    ..\..\src\print\datasource\datasrc2.cpp:535,Releasing subreport data sources,Start Time,"17:39:17"
    N/A:-1,Releasing subreport data sources,Elapsed Time,"1"
    ..\..\src\crpe\crpe.cpp:791,Closing engine,Start Time,"17:39:17"
    ..\..\src\crpe\crpe.cpp:833,Closing engine,Before close engine use count,"7"
    ..\..\src\crpe\crpe.cpp:858,Closing engine,After close engine use count,"6"
    N/A:-1,Closing engine,Elapsed Time,"2"
    ..\..\src\crpe\crpe.cpp:791,Closing engine,Start Time,"17:39:17"
    ..\..\src\crpe\crpe.cpp:833,Closing engine,Before close engine use count,"6"
    ..\..\src\crpe\crpe.cpp:858,Closing engine,After close engine use count,"5"
    N/A:-1,Closing engine,Elapsed Time,"2"
    --> Form2 closed
    ..\..\src\print\datasource\datasrc2.cpp:535,Releasing subreport data sources,Start Time,"17:39:52"
    N/A:-1,Releasing subreport data sources,Elapsed Time,"1"
    ..\..\src\crpe\crpe.cpp:791,Closing engine,Start Time,"17:39:52"
    ..\..\src\crpe\crpe.cpp:833,Closing engine,Before close engine use count,"4"
    ..\..\src\crpe\crpe.cpp:858,Closing engine,After close engine use count,"3"
    N/A:-1,Closing engine,Elapsed Time,"2"
    --> Form1 closed..\..\src\print\datasource\datasrc2.cpp:535,Releasing subreport data sources,Start Time,"17:40:29"
    N/A:-1,Releasing subreport data sources,Elapsed Time,"1"
    ..\..\src\crpe\crpe.cpp:791,Closing engine,Start Time,"17:40:29"
    ..\..\src\crpe\crpe.cpp:833,Closing engine,Before close engine use count,"2"
    ..\..\src\crpe\crpe.cpp:858,Closing engine,After close engine use count,"1"
    N/A:-1,Closing engine,Elapsed Time,"2"
    ..\..\src\crpe\crpe.cpp:791,Closing engine,Start Time,"17:40:29"
    ..\..\src\crpe\crpe.cpp:833,Closing engine,Before close engine use count,"1"
    ..\..\src\crpe\crpe.cpp:858,Closing engine,After close engine use count,"0"
    N/A:-1,Closing engine,Elapsed Time,"100017"
    CrystalReportsDisposeIssue.crpe.functions.0.log
    0xfb8     17:39:17.871          0     PESetUserSessionInfo               0     PEUserSessionInfoW:<StructSize:262><userName:><requestID:22>     IN          21     <==
    0xfb8     17:39:17.871     0     0     PESetUserSessionInfo               0     OUT     PEUserSessionInfoW:<StructSize:262><userName:><requestID:22>          21     <==
    0xfb8     17:39:17.874          3     PEClosePrintJob     report {657D0ECA-BC6A-4EC6-9476-02B77376E07C}.rpt          0     jobN:3     IN          22     <==
    0xfb8     17:39:17.874     36     3     PEClosePrintJob     report {657D0ECA-BC6A-4EC6-9476-02B77376E07C}.rpt          0     OUT     jobN:3          22     <==
    0xfb8     17:39:17.913          0     PECloseEngine               0     void     IN          22     <==
    0xfb8     17:39:17.913     3     0     PECloseEngine               0     OUT     void          22     <==
    0xfb8     17:39:17.923          0     PECloseEngine               0     void     IN          0     <==
    0xfb8     17:39:17.923     3     0     PECloseEngine               0     OUT     void          0     <==
    0xfb8     17:39:52.421          0     PESetUserSessionInfo               0     PEUserSessionInfoW:<StructSize:262><userName:><requestID:23>     IN          0     <==
    0xfb8     17:39:52.421     0     0     PESetUserSessionInfo               1032     OUT     PEUserSessionInfoW:<StructSize:262><userName:><requestID:23>          0     <==
    0xfb8     17:39:52.423          1     PEClosePrintJob     report {F2574C5C-00BC-4627-9A05-B8133D6E6F7D}.rpt          0     jobN:1     IN          0     <==
    0xfb8     17:39:52.423     15     1     PEClosePrintJob     report {F2574C5C-00BC-4627-9A05-B8133D6E6F7D}.rpt          0     OUT     jobN:1          0     <==
    0xfb8     17:39:52.441          0     PECloseEngine               0     void     IN          0     <==
    0xfb8     17:39:52.441     3     0     PECloseEngine               1032     OUT     void          0     <==
    0xfb8     17:40:29.281          0     PESetUserSessionInfo               0     PEUserSessionInfoW:<StructSize:262><userName:><requestID:24>     IN          0     <==
    0xfb8     17:40:29.281     0     0     PESetUserSessionInfo               1032     OUT     PEUserSessionInfoW:<StructSize:262><userName:><requestID:24>          0     <==
    0xfb8     17:40:29.283          2     PEClosePrintJob     report {C78FE11F-6465-478F-83AB-49D8F0C6D64A}.rpt          0     jobN:2     IN          0     <==
    0xfb8     17:40:29.283     24     2     PEClosePrintJob     report {C78FE11F-6465-478F-83AB-49D8F0C6D64A}.rpt          0     OUT     jobN:2          0     <==
    0xfb8     17:40:29.310          0     PECloseEngine               0     void     IN          0     <==
    0xfb8     17:40:29.310     2     0     PECloseEngine               1032     OUT     void          0     <==
    0x1568     17:40:29.315          0     PECloseEngine               0     void     IN          0     <==
    0x1568     17:40:29.315     100018     0     PECloseEngine               0     OUT     void          0     <==

Maybe you are looking for