Differences between release and debug binaries??

Differences between release and debug binaries??

am 09.04.2008 15:52:01 von AntonioSACE

We have been using two web services from a asp.net app for two years, then
the solution was ported to VS 2008 and the web services now throw the
following exception:
Error Message:There is an error in XML document (1, 344).
Stack Trace: at
System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader,
String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
xmlReader, String encodingStyle)
The weird thing is, if I compile the project with debug enabled, instead of
release, everything works fine!
For now we have the web app working in debug mode, but obviously we need to
pass soon in release mode because of speed concerns.
Any ideas??
Thanks

Re: Differences between release and debug binaries??

am 09.04.2008 21:42:55 von George Ter-Saakov

I would examine the actual XML document
error actually indicates the you have some problem on line 1, character 344
I guess you do not have "\r\n" (C#) in your XML documents
Just capture XML document and open it with Visual Studio... run cursor and
watch status bar.. It shows the position..


George.


"AntonioSACE" wrote in message
news:4B543D22-6A3E-4A11-8AA4-5DFD5AABBC37@microsoft.com...
> We have been using two web services from a asp.net app for two years, then
> the solution was ported to VS 2008 and the web services now throw the
> following exception:
> Error Message:There is an error in XML document (1, 344).
> Stack Trace: at
> System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader,
> String encodingStyle, XmlDeserializationEvents events)
> at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
> xmlReader, String encodingStyle)
> The weird thing is, if I compile the project with debug enabled, instead
> of
> release, everything works fine!
> For now we have the web app working in debug mode, but obviously we need
> to
> pass soon in release mode because of speed concerns.
> Any ideas??
> Thanks

Re: Differences between release and debug binaries??

am 10.04.2008 10:56:00 von AntonioSACE

Hi George,
thank you for your reply but I think I explained in a bad way the problem.
In fact we recognize that there is an error in the xml. It is truncated at
the end. The strange thing is that if we compile the application in release
mode we have this problem, but if we compile the application in debug mode
the application works fine and we receive the whole XML. So we are wondering
that, based on the compilation mode, the application change behaviour!! Any
ideas on that?

"George Ter-Saakov" wrote:

> I would examine the actual XML document
> error actually indicates the you have some problem on line 1, character 344
> I guess you do not have "\r\n" (C#) in your XML documents
> Just capture XML document and open it with Visual Studio... run cursor and
> watch status bar.. It shows the position..
>
>
> George.
>
>
> "AntonioSACE" wrote in message
> news:4B543D22-6A3E-4A11-8AA4-5DFD5AABBC37@microsoft.com...
> > We have been using two web services from a asp.net app for two years, then
> > the solution was ported to VS 2008 and the web services now throw the
> > following exception:
> > Error Message:There is an error in XML document (1, 344).
> > Stack Trace: at
> > System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader,
> > String encodingStyle, XmlDeserializationEvents events)
> > at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
> > xmlReader, String encodingStyle)
> > The weird thing is, if I compile the project with debug enabled, instead
> > of
> > release, everything works fine!
> > For now we have the web app working in debug mode, but obviously we need
> > to
> > pass soon in release mode because of speed concerns.
> > Any ideas??
> > Thanks
>
>
>

Re: Differences between release and debug binaries??

am 10.04.2008 14:22:01 von George Ter-Saakov

I see now....There are some differences between Debug and Release
versions...
So it's possible that you have a bug in your application which does not
appear in debug....
What is your environment, C#? Cause the differences much greater if you use
Managed/Unmanaged C++

Here are some things for you to look at..

1. Timing... Timing might be different in release mode... So if for example
you rely that something will be done in 10 seconds, in release mode it might
be done much quicker...

2. Multithreading access... If you are sharing variables between threads
then you might be able to get away and have no problem accessing them in
debug mode without properly serializing access to them. But in release mode
it might show up...


Also you said you are using VS 2008... Can you switch to VS 2005? VS 2008 is
still new and may be it's just a simple bug in compiler?


George.



"AntonioSACE" wrote in message
news:E15C5E77-184A-481E-818A-3AB7BBEF2AF8@microsoft.com...
> Hi George,
> thank you for your reply but I think I explained in a bad way the problem.
> In fact we recognize that there is an error in the xml. It is truncated at
> the end. The strange thing is that if we compile the application in
> release
> mode we have this problem, but if we compile the application in debug mode
> the application works fine and we receive the whole XML. So we are
> wondering
> that, based on the compilation mode, the application change behaviour!!
> Any
> ideas on that?
>
> "George Ter-Saakov" wrote:
>
>> I would examine the actual XML document
>> error actually indicates the you have some problem on line 1, character
>> 344
>> I guess you do not have "\r\n" (C#) in your XML documents
>> Just capture XML document and open it with Visual Studio... run cursor
>> and
>> watch status bar.. It shows the position..
>>
>>
>> George.
>>
>>
>> "AntonioSACE" wrote in message
>> news:4B543D22-6A3E-4A11-8AA4-5DFD5AABBC37@microsoft.com...
>> > We have been using two web services from a asp.net app for two years,
>> > then
>> > the solution was ported to VS 2008 and the web services now throw the
>> > following exception:
>> > Error Message:There is an error in XML document (1, 344).
>> > Stack Trace: at
>> > System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader,
>> > String encodingStyle, XmlDeserializationEvents events)
>> > at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
>> > xmlReader, String encodingStyle)
>> > The weird thing is, if I compile the project with debug enabled,
>> > instead
>> > of
>> > release, everything works fine!
>> > For now we have the web app working in debug mode, but obviously we
>> > need
>> > to
>> > pass soon in release mode because of speed concerns.
>> > Any ideas??
>> > Thanks
>>
>>
>>

Re: Differences between release and debug binaries??

am 10.04.2008 15:45:02 von AntonioSACE

Hi George,
unfortunately we alredy made the check you sent and, as you said, we think
that the problem is a bug in VS2008. We'll ask Microsoft to check. Thank you
very much for your time.

"George Ter-Saakov" wrote:

> I see now....There are some differences between Debug and Release
> versions...
> So it's possible that you have a bug in your application which does not
> appear in debug....
> What is your environment, C#? Cause the differences much greater if you use
> Managed/Unmanaged C++
>
> Here are some things for you to look at..
>
> 1. Timing... Timing might be different in release mode... So if for example
> you rely that something will be done in 10 seconds, in release mode it might
> be done much quicker...
>
> 2. Multithreading access... If you are sharing variables between threads
> then you might be able to get away and have no problem accessing them in
> debug mode without properly serializing access to them. But in release mode
> it might show up...
>
>
> Also you said you are using VS 2008... Can you switch to VS 2005? VS 2008 is
> still new and may be it's just a simple bug in compiler?
>
>
> George.
>
>
>
> "AntonioSACE" wrote in message
> news:E15C5E77-184A-481E-818A-3AB7BBEF2AF8@microsoft.com...
> > Hi George,
> > thank you for your reply but I think I explained in a bad way the problem.
> > In fact we recognize that there is an error in the xml. It is truncated at
> > the end. The strange thing is that if we compile the application in
> > release
> > mode we have this problem, but if we compile the application in debug mode
> > the application works fine and we receive the whole XML. So we are
> > wondering
> > that, based on the compilation mode, the application change behaviour!!
> > Any
> > ideas on that?
> >
> > "George Ter-Saakov" wrote:
> >
> >> I would examine the actual XML document
> >> error actually indicates the you have some problem on line 1, character
> >> 344
> >> I guess you do not have "\r\n" (C#) in your XML documents
> >> Just capture XML document and open it with Visual Studio... run cursor
> >> and
> >> watch status bar.. It shows the position..
> >>
> >>
> >> George.
> >>
> >>
> >> "AntonioSACE" wrote in message
> >> news:4B543D22-6A3E-4A11-8AA4-5DFD5AABBC37@microsoft.com...
> >> > We have been using two web services from a asp.net app for two years,
> >> > then
> >> > the solution was ported to VS 2008 and the web services now throw the
> >> > following exception:
> >> > Error Message:There is an error in XML document (1, 344).
> >> > Stack Trace: at
> >> > System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader,
> >> > String encodingStyle, XmlDeserializationEvents events)
> >> > at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
> >> > xmlReader, String encodingStyle)
> >> > The weird thing is, if I compile the project with debug enabled,
> >> > instead
> >> > of
> >> > release, everything works fine!
> >> > For now we have the web app working in debug mode, but obviously we
> >> > need
> >> > to
> >> > pass soon in release mode because of speed concerns.
> >> > Any ideas??
> >> > Thanks
> >>
> >>
> >>
>
>
>