|
-
Mar 23rd, 2008, 10:25 AM
#1
Thread Starter
Addicted Member
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
-
Mar 23rd, 2008, 10:25 AM
#2
Thread Starter
Addicted Member
Re: am desprate "Out of memory" problem
and btw am not using any office related files or DBs
-
Mar 23rd, 2008, 10:36 AM
#3
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.
-
Mar 23rd, 2008, 11:09 AM
#4
Thread Starter
Addicted Member
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
-
Mar 23rd, 2008, 11:15 AM
#5
Re: am desprate "Out of memory" problem
 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.
-
Mar 23rd, 2008, 11:52 AM
#6
Thread Starter
Addicted Member
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
-
Mar 23rd, 2008, 01:05 PM
#7
Thread Starter
Addicted Member
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
-
Mar 23rd, 2008, 02:37 PM
#8
Re: am desprate "Out of memory" problem
How are we supposed to help without seeing any code?
-
Mar 23rd, 2008, 04:02 PM
#9
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 ?
-
Mar 24th, 2008, 08:16 AM
#10
Thread Starter
Addicted Member
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..
-
Mar 24th, 2008, 09:58 AM
#11
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.
-
Mar 24th, 2008, 10:01 AM
#12
Hyperactive Member
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
-
Mar 26th, 2008, 06:30 AM
#13
Thread Starter
Addicted Member
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??
-
Mar 26th, 2008, 07:23 AM
#14
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 ?
-
Mar 26th, 2008, 07:26 AM
#15
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.
-
Mar 26th, 2008, 10:44 AM
#16
Thread Starter
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|