Discussion in "Software" started by    z_jun    Oct 15, 2009.
Thu Oct 15 2009, 06:53 am
#1
Hi I'm working on an SMS project. I have a problem that is I keep getting run-time error 7 which is says out of memory. When I go into debug mode it brings me to the line
strBuffer = StrConv(MSComm2.Input, vbUnicode). It occurs only occasionally and I have no idea why. I did clear strBuffer before I used it again. Funny thing is that I used this statement at many other places in my code but always seem to obtain the error at only a particular usage of it. Part of my code is:-

strBuffer = ""
Trace ("Reading message...")
MSComm2.Output = "AT+CMGR =" & msgIndex & vbCrLf

Sleep 500

strBuffer = StrConv(MSComm2.Input, vbUnicode)
Trace (strBuffer)

I reused this chunk of code at many areas of the code, only replacing the AT commands by other AT commands. Please help me solve the out of memory error. Thanks.
Thu Oct 15 2009, 01:50 pm
#2
try this:
recreate the whole project in a new folder with add the forms and other modules whatever you've created for this project to new folder. save the project and compile again. and see if that problem come back.
Thu Oct 15 2009, 01:52 pm
#3
[Topic moved to Software forum]
Fri Oct 16 2009, 08:27 am
#4
Hmm...nope it doesn't work...
Fri Oct 16 2009, 08:56 pm
#5
This problem occurs generally coz of corrupted .vbp file.

try this maybe it helps:
support.microsoft.com/kb/241245
Fri Oct 16 2009, 09:51 pm
#6
i do not have a reference to fm20.dll in the first place...
Fri Oct 16 2009, 10:02 pm
#7
Is "strBuffer" big enough to hold the message ?
Fri Oct 16 2009, 10:27 pm
#8
I believe so...this is my code which I have the out of memory problem with...thanks...
Fri Oct 16 2009, 10:36 pm
#9
You said the error occurs only occasionally.
Do you know which messages were being read when the error occurred ?
Can the same message be read without error ?

Does it help to make the sleep delay longer ?


[ Edited Fri Oct 16 2009, 10:37 pm ]
 z_jun like this.
Fri Oct 16 2009, 10:53 pm
#10
yes it does seem to help...thanks a lot...

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Richardedils
Wed Apr 24 2024, 04:07 am
ChrisLub
Tue Apr 23 2024, 05:21 pm
Davidbab
Tue Apr 23 2024, 10:41 am
Richardrit
Tue Apr 23 2024, 09:54 am
HenryLaf
Mon Apr 22 2024, 03:50 pm
bleradrar
Mon Apr 22 2024, 06:38 am
ppu-pro_ka
Sun Apr 21 2024, 07:39 pm
Infewow
Sun Apr 21 2024, 06:30 pm