C Sharp Application Hangs on WIndows Mobile 2003 SE

R

richardsayre

HI

I have a C# .NET app that hangs while loading on Windows Mobile 2003
SE. The device is a Dell Axim x50. The application runs fine on an
Axim x30 and every other Pocket PC I tried it on. My application main
form shows up with the my loading message "Please wait loading...".
While this message appears I call a function that loads 3 xml files
into datasets. This is where it hangs.

Any suggestions on how to make my application run better on this OS?

Any help would be greatly appricated.

Thanks

Rich
 
M

Mark Arteaga

Can you debug the application on the device? Do you get any error messages
when loading the datasets?
 
R

richardsayre

The line of code that halts the application is

dsFrom.ReadXml(@"\Program Files\MyApp\fromServer.xml");

The strange thing is right before I try to load that file into the
dataset I execute that function for another file that loads fine.

ds.ReadXml(@"\Program Files\MyApp\toServer.xml");

I get no errors or exceptions and I included System.SR. I am going to
do further debugging, if you have any more suggestions they would be
greatly appricated.

Thanks

Rich
 
S

Sergey Bogdanov

Have you tried to debug this code snippet? I suppose it throws exception
and you just suppress it or smth. Also show us error reproducible source
together with fromServer.xml file; othwerwise it would be hard to help you.

Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com
 
R

richardsayre

I found the solution to my problem. Hopefully it will help someone
else who is having the same problem.

I think it's a bug in whatever does XML processing in 2003 SE. The XML
file that didnt load looked like this.

<?xml version="1.0" standalone="yes" ?>
<fromServer xmlns="http://tempuri.org/fromServer.xsd">
<data />
</fromServer>

The difference between the XML files that would load is child element
after the element with the xmlns atribute in it had an opening and
closing tag. SO i changed my XML to this:

<?xml version="1.0" standalone="yes" ?>
<fromServer xmlns="http://tempuri.org/fromServer.xsd">
<data></data>
</fromServer>

And it worked.

Pretty wierd bug, but atleast my application works again :)

Cheers

Rich
 
I

Ilya Tumanov [MS]

This is a known problem in CF SP2, fixed in SP3.

By the way, the very fact you hit it means your might have issues with
database design.
It's not a good idea (and makes little sense) to have a row with all null
elements.
Consider adding primary key to the table.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
 

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