Results 1 to 16 of 16

Thread: am desprate "Out of memory" problem

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2005
    Posts
    166

    am desprate "Out of memory" problem

    hi every1
    i made a small application with VB6, well the problem is when i compile it then execute the EXE i get the famous msg (out of memory), what's really weird is that it works fine on my pc but no at my friend's though they have greater potentials than my PC, i searched everywhere for an answer some say write OPTION EXPLICIT an remove the errors, some say run the app by Ctrl+F5 and also remove the errors, some say check ur loops other say remove any codes in text_change, done all that and still doesn't work...
    what's happening?

    remember as i said b4 it works fine on my pc as an exe and when testing..

    anyhelp plz
    ty

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Aug 2005
    Posts
    166

    Re: am desprate "Out of memory" problem

    and btw am not using any office related files or DBs

  3. #3
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: am desprate "Out of memory" problem

    There is no way for us to help without much more detailed information.
    Out of memory errors usually occur when
    1. One enters an infinite loop. Do you have any DO LOOPs? If so, check that the condition for exiting the loop occurs. You may want to post some of your code regarding these Do Loops if applicable.
    2. One is creating GDI stuff (bitmaps, pens, brushes, etc) and not destroying/releasing them. Does this apply to your app? If so, this can be difficult for us to troubleshoot but easier for you since you have the entire project. Are you creating GDI stuff in your app?
    3. We can only guess at this point; you have provided absolutely no detailed information about your app or where the error occurs for us to be of any significant help.

    Edited: Another typical cause is infinite recursion. Do you have any recursive routines (a function calls itself over & over again)? If so, ensure that whatever triggers the recursion to stop occurs. You may want to post the recursive routine.
    Last edited by LaVolpe; Mar 23rd, 2008 at 10:49 AM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Aug 2005
    Posts
    166

    Re: am desprate "Out of memory" problem

    i rechecked the loops it's fine, the app may have many comboboxes in it, it uses the code which puts it near the clock
    but still as i said, the weird thing is
    IT WORKS VERY FINE ON MY PC

  5. #5
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: am desprate "Out of memory" problem

    Quote Originally Posted by Sub_Zero_6
    i rechecked the loops it's fine, the app may have many comboboxes in it, it uses the code which puts it near the clock
    but still as i said, the weird thing is
    IT WORKS VERY FINE ON MY PC
    Doesn't matter that it works fine on one pc. Different operating systems (O/S) behave differntly. Some examples: Different CPUs can round differently and calculations may be off by a fraction of a number (especially pertaining to doubles) and if a loop is expecting an exact number; it may not happen. APIs may leak memory resources on different O/S (TransparentBlt API is one of those), improper usage of GetDC API can leak on different O/S. Maybe your code is checking for some hWnd, DC or other variable that has a handle/pointer and seeing if it is > 0, where on other systems it may be < 0. This list can go on for quite a bit.

    If you would answer all of the questions in my first reply, then at least we can start with a systematic approach to locating the problem.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Aug 2005
    Posts
    166

    Re: am desprate "Out of memory" problem

    ok how about this, i removed ALL the codes that are executed at form_load, still get the error

    btw i don't use GDI

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Aug 2005
    Posts
    166

    Re: am desprate "Out of memory" problem

    new updates, when i installed VB on the other pc it worked

    i checked all loops they're fine, everything is ok..

    PLZ tell me wuts wrong i am going nuts

  8. #8
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: am desprate "Out of memory" problem

    How are we supposed to help without seeing any code?

  9. #9
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: am desprate "Out of memory" problem

    Sounds like you haven't created an installation package for your program. Did you just copy the .exe file to the other PC ?

  10. #10

    Thread Starter
    Addicted Member
    Join Date
    Aug 2005
    Posts
    166

    Re: am desprate "Out of memory" problem

    the code is so big but i don't think it's the problem as i told u as soon as i installed VB6 it worked
    and i tried both making installation package and copy exe, same results..

  11. #11
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: am desprate "Out of memory" problem

    That makes it very likely that Doogle was on the right track.

    If it suddenly works (as an .exe) after you install VB, the issue is that you didn't create a valid installation package - but there is no way we can tell what the problem was, as you aren't giving anywhere near enough information for us to work it out.

  12. #12
    Hyperactive Member Davadvice's Avatar
    Join Date
    Apr 2007
    Location
    Glasgow (Scotland)
    Posts
    440

    Re: am desprate "Out of memory" problem

    do you know where the exeption is occuring ? the form,module, button etc?

    If you know that then you could post the code relevant to that.

    I think it would be difficult to comment without any code to read.

    can you not zip the project and post that ? how big is big ?

    dav
    This is Blank

  13. #13

    Thread Starter
    Addicted Member
    Join Date
    Aug 2005
    Posts
    166

    Re: am desprate "Out of memory" problem

    hey every1
    guess wut i found the problem, but what's even more weird it has nth to do with the code
    the problem is in scroll bars, as soon as i removed it from the app it worked, it has nthn to do with it's max and min val too cause i tried to put a scroll bar that's not related to the code by any means still gave me the error
    does that make any sense??

  14. #14
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: am desprate "Out of memory" problem

    In your Post #1:
    i made a small application with VB6
    and in your Post #10
    the code is so big but i don't think it's the problem

    Have you tired putting the scroll bar back on the form and removing another control to see if it still works. How many controls does this big-coded small application have ?

  15. #15
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: am desprate "Out of memory" problem

    It could be due to accidental recursion (depending on the code in the scrollbar events - but based on your comment it sounds like that isn't the case), or because you didn't install the component correctly (or at least, not the right version of it).

    We still don't know enough to be able to even give a decent guess, let alone be sure about the cause.

    As you aren't giving enough details, it would be best to upload your project (put the files into a .Zip, then click on "Post Reply", and "manage attachments") so that we can try to find the issue.

  16. #16

    Thread Starter
    Addicted Member
    Join Date
    Aug 2005
    Posts
    166

    Re: am desprate "Out of memory" problem

    lolz i meant the app isn't that complicated, the tools aren't many, not more than 100, and yes i tried removing other tools ofcourse, many actually but still the prob in the scrollbar, and as i said the events of the scrollbar are empty.. anyway it works now i'll let u know if sth came up..

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