managed out of memory exception in pocket pc 2002 emulator

G

Guest

Hi all,

I was hoping that anyone of you here would have the answer to my question.
My pocket pc application was up and running in both the pocket pc 2002
emulator and the actual device itself until i added some functions which
increase the total size of the application to 128kb. When the application was
of 128kb, both the emulator and the actual device could not load the
application and the emulator threw the "managed out of memory exception"
message. What is happening exactly? Is there a limitation on the size of a
pocket pc application?
 
G

Guest

I have 5 forms currently and out of the 5 forms, only 1 of the form is doing
something at formload. Here's a sample of the codes.

Dim ds As New DataSet
Dim ID As String

ID = Form1.NuNameTB.Text()

ds = reg.dset
Me.DataGrid1.DataSource = ds.Tables(0)

as for form main, all i did was to dim a webservice method. I tried to split
my application into two projects solutions and it works fine but the original
128kb project just won't load the form when i debug the project. I went
through your blog and but still could not figure what went wrong. I did not
use any bitmaps in my application. My application consist of mostly
retrieving datas from datasets. I was wondering if the problem would be
caused by the CF version. I'm currently using the CF 1.0 SP 2
 
D

Daniel Moth

Which statement causes the exception? Step into your application until you
hit the offending line of code.

What numbers are you getting after using the perf counters,
globalmemorystatus etc as described on my blog entry?

If you have a repro feel free to post it...

Cheers
Daniel
 
A

Alex Feinman [MVP]

The most common reason for OutOfMemory exception is recursively using a
property. Try rechecking properties on your classes.
 
G

Guest

Hmm the problem is when i debug my application and after the cab files and
etc are installed into the emulator, the emulator won't run my application at
all. I tried to locate the file manually and open it and that caused the
managed out of memory exception to apppear. I could not even run the
application at all and therefore i cannot find out which is the offending
line of code nor can i use the GlobalMemoryStatus to check.
 
G

Guest

I haven't been using a function twice at all. Most of the time i'll pass the
values between forms rather than excuting the same function again to get the
same values.
 
A

Alex Feinman [MVP]

If you are setting value from one form in another and back, check that the
corresponding method calls did not end upp calling each other (directly or
via events). Add a message box to the beginning of each one
 
G

Guest

Hmm i'm pretty sure the methods did not end up calling each other. I only
passed the values but did not return them. Thanks for the advice anyway.
 
G

Guest

i just upgraded to .NET CF SP 3 and i still can't load the application and
this time it throws a system.outofMemoryException at this line --> Me.tbPCode
= New System.Windows.Forms.TextBox what does it means?
 
G

Guest

"i Finally got my error solved. i shouldn't have dim a new form at the main
when i wasn't going to use it until some kind of eventhandler was fired.
thanks for both of you guys for your help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top