Results 1 to 3 of 3

Thread: Run-time error 7

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2001
    Location
    Shannon, Quebec, Canada
    Posts
    251

    Run-time error 7

    Hi,

    Sometimes this error occurs Run-Time error '7' : Insuffisant memory, why do I have this? And how can I correct the situation?

    Thanks

  2. #2
    Fanatic Member BrianHawley's Avatar
    Join Date
    Aug 2001
    Location
    Saudi Arabia
    Posts
    796
    Probably you do have plenty of memory, but you have done something that uses it all up.

    For instance

    VB Code:
    1. Do While True
    2.     List1.AddItem "xyz"
    3.   Loop

    will keep on going and going like the Energizer bunny until it runs out of memory.

    You probably did not do anything quite as obvious as that, but there is likely to be something in your code.

    It may not be a loop. For instance it may be a form that loads a copy of itself in its load event, so every copy that loads will load another one - and so on.

    Of course you may be out of memory if you are doing something weird, like loading hundreds of controls on a form - but I doubt it. More likely a bug in your code.

    Try stepping through with the debugger and see if you keep coming back to the same place.

    (Using any third-party controls? Could also be a bug in somebody else's code, or you have generated an error in their control they did not think of and trap. Happens sometimes with Crystal Reports if you feed inappropriate information.)
    Last edited by BrianHawley; Sep 24th, 2001 at 08:20 AM.
    Brian
    (Fighting with the RightToLeft bugs in VS 2005)

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    Brian hit on my initial reaction, i.e., some third party control running amok.

    What is your code doing when this happens? Does it happen everytime you run the program, or just sometimes?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width