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

Bobbyerilar
Thu Mar 28 2024, 08:08 am
pb58
Thu Mar 28 2024, 05:54 am
Clarazkafup
Thu Mar 28 2024, 02:24 am
Walterkic
Thu Mar 28 2024, 01:19 am
Davidusawn
Wed Mar 27 2024, 08:30 pm
Richardsop
Tue Mar 26 2024, 10:33 pm
Stevencog
Tue Mar 26 2024, 04:26 pm
Bernardwarge
Tue Mar 26 2024, 11:15 am