Forum Discussion

sandro_figueire's avatar
sandro_figueire
Occasional Contributor
12 years ago

How to handle TestComplete Out of memory error

Hi, a couple of times i've got this problem when I ran a long time duration scripts:



Out of memory



But the computer has 4gb of RAM. I think is plenty of RAM to run properly TestComplete.



The computer specs is:



- Core 2 Duo 2.40 ghz

- 4 gb of RAM

- Windows 7 professional 32 bits

- Internet Explorer 9

- TestComplete 8.70



Someone know how to handle this error?

10 Replies

  • Anonymous's avatar
    Anonymous

    Hi Sandro,





    Try reducing the number of memory TestComplete is consuming. For this, try diminishing the number of custom messages posted to the test log and calling the Log.LockEvents method to prevent TestComplete from posting event messages. Please see the "LockEvents Method" article for more information.





    Also, try disabling the "Post image on error" project option described in the "Project Properties - Playback Options" article.





    Besides that, we have recently released TestComplete 9 where memory consumption by the product was improved. Try using the new product version. You can request it on this page of our web site.
  • artur0409's avatar
    artur0409
    Occasional Contributor
    Hi



    Sorry to say but I got out of memory messages several times on TestComplete 9.0.1069.7 version

    As I observed there is contnously growing number of GDI objects used by TestComplete.exe process.



    I was writing and debugging scripts - in about 2 hours of work number of GDI objects reached 20 000.



    Few moments after I got out of memory message



    Best Regards

    Artur 
  • Anonymous's avatar
    Anonymous

    Hi Artur,





    Are you using the Test Visualizer feature in your project? Try disabling it and check whether it affects the problem.





    If this doesn't help, please follow the steps below to help us collect more information about the problem:





    1. Download the Debugging Tools for Windows package and install it.





    2. When you get the error, open the 'Start | Run...' dialog and execute the following command:

    C:\Program Files\Debugging Tools for Windows (x86)\windbg.exe" -pn TestComplete.exe -Q -pd -c ".dump /m C:\Dump1.dmp;q





    This command will make WinDbg write a memory dump of the TestComplete.exe process to the 'C:\Dump1.dmp' dump file. After the dump is written, WinDbg will be closed.





    3. Correct the dump file name in the above command line (for example, rename it to Dump2.dmp), wait for two minutes and execute the command again.





    4. Repeat step 3.





    5. Contact us via the support web form and send us all of the generated dump files.


  • artur0409's avatar
    artur0409
    Occasional Contributor
    No Test Visualizer used in the project - no recording done

    Only writing scripts - playback - debug



    I realized what it really is - at least growing number of GDI objects



    Try following scenario:

    1. Open about ten tabs in the workspace panel ( code , XMLcheckpoints , log etc.)

    2 Switch between workspace tabs



    Every switch adds about 10-40 GDI objects  , every tab opening adds about 100-200 GDI objects

    Objects are not released at all (or really slow) and this way in short period of time we can crash the application



    Best Regards

    Artur
  • artur0409's avatar
    artur0409
    Occasional Contributor
    And the screenshot from crash

  • Hi Artur,



    I tried to reproduce the issue with TestCompelete 9, but failed. Could you please check whether the problem is reproduced with the latest TestComplete version in your lab? You can request a trial here. TestComplete 9 has a lot of improvements and changes.



    Should the problem occur in TestComplete 9, please send us your problematic project suite via our Contact Support form. Also please generate dump files for TestComplete 9 using the instructions given above and send them too.
  • artur0409's avatar
    artur0409
    Occasional Contributor
    I used TestComplete 9.0.1069.7 version - is it the latest one?
  • artur0409's avatar
    artur0409
    Occasional Contributor
    additional findings regarding GDI object handling in TestComplete 9



    Operations in code workspace



    CTRL-V  - insert copied text  - + 40-50 GDI objects

    new line  - in pretty long unit  - +100-200 GDI Objects
  • Anonymous's avatar
    Anonymous

    Hi Artur,



    Yes, TestComplete 9.0.1069.7 is the latest version of our tool at the moment.



    To help us investigate the problem, please generate dump files for TestComplete 9 using WinDbg (see the instructions I gave you above) and send us the files along with your project suite via our Contact Support form.



    Thanks in advance.
  • sandro_figueire's avatar
    sandro_figueire
    Occasional Contributor
    Thanks for all.



    I get my problem fixed by disabling the Test Visualizer during run test.



    Now is working fine and no more Out of memory problems.