For Programmers: Free Programming Magazines  


Home > Archive > C# > August 2006 > C Sharp Application Hangs on WIndows Mobile 2003 SE









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author C Sharp Application Hangs on WIndows Mobile 2003 SE
richardsayre@gmail.com

2005-03-09, 8:58 pm

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

Mark Arteaga

2005-03-09, 8:58 pm

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


--
Mark Arteaga
..NET Compact Framework MVP
http://www.neotericsdc.com | http://blog.markarteaga.com


<richardsayre@gmail.com> wrote in message
news:1110398043.269929.87590@g14g2000cwa.googlegroups.com...
> 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
>



richardsayre@gmail.com

2005-03-10, 4:00 pm

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

Sergey Bogdanov

2005-03-10, 4:00 pm

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


richardsayre@gmail.com wrote:
> 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
>

richardsayre@gmail.com

2005-03-10, 4:00 pm

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

Mark Arteaga

2005-03-12, 3:58 am

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


--
Mark Arteaga
..NET Compact Framework MVP
http://www.neotericsdc.com | http://blog.markarteaga.com


<richardsayre@gmail.com> wrote in message
news:1110398043.269929.87590@g14g2000cwa.googlegroups.com...
> 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
>



richardsayre@gmail.com

2005-03-12, 3:57 pm

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

Sergey Bogdanov

2005-03-12, 3:57 pm

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


richardsayre@gmail.com wrote:
> 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
>

richardsayre@gmail.com

2005-03-12, 3:57 pm

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

Eran David

2006-08-28, 9:15 am

Try using the XmlReadMode.InferSchema switch instead of the default XmlReadMode.Auto
I had the same problem on Windows Mobile 2003 SE (.NET 1.1) and it solve it
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com