memory or control limitations?

G

Guest

We are developing a CF forms application using C#. This application
specifically targets Symbol handhelds (2800 & 8800). We can't run the
application on the emulator or any other device because of the Symbol
scanning dlls required for our application.

While developing a complex form, the form stopped working and would give an
error message when deploying. "The remote connection to the device has been
lost. Please verify the device connection and restart debugging." At this
point, no code within the application has been executed, the static Main
function is not even called.

We are using many controls that we have developed ourselves and also panels,
tab control, etc. on this form. If we remove a few controls from the form, it
will run again. The EXACT count doesn't seem to be the problem because the
count of controls differs by one on the 2800 and 8800. The number that this
happens at is 119 and 120 controls on the form (don't blame me, not my UI
design, I just write the underlying controls and all the data access).

Does anyone know of any specific control or memory limitation with a CF form
that might manifest itself in this manner. Any ideas (other than just
removing controls, we know that makes it run) would be appreciated.
 
A

Alex Feinman [MVP]

I think you are running into a limit on a single function JITted size (must
be < 64kb) in InitializeComponent(). Try moving come code (generated by
designer) out of InitializeComponent into a separate function.
 
D

Duncan Mole

The compact framework CLR has a limit of 64KB of jitted code per method. As
you have so many controls it is possible that InitializeComponent (or
similar hand coded setup method) has hit this limit or do you split the form
setup over several methods?
 
G

Guest

Thanks much for the response. Yes, this appeared to be the problem. The
problem went away when I split the InitializeComponent routine.

That does still present a problem for us because the fellow I do this work
for depends upon the design environment in a big way. Probably one thing that
would help is to clean up the default values on my controls so they write
less code into that routine.

The best though would be to convince him that there are better ways to
design the UI... Thanks again.
 
S

Stefan Hong

Where can I find the spec of hard limits of compact framework CLR like
this one?


Stefan
 

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