Hi everyone,
I have an ASP.NET 1.1 application, that started to produce errors on the
production server while runs smoothly on an exactly similar
debug/development environment. I have the exact location where the
application crashes in release mode but runs fine in debug mode. I printed
out the stack trace just before the crash location, and i found a strange
thing that i don't understand. There is a line that is "missing" from the
trace in release mode but it is in the trace in debug mode. (It's
"set_LastModifiedBy(String)" which is an object property-set.)
The execution path (regarding the source code) is exactly the same
certainly. What is even stranger is if we change the property type from
string to SqlString (for example), it will immediately appear in the trace
like in debug mode. What could be the reason for this?
Here are the two stack traces. (I've put a * in front of the line in
question). Any help is greatly appreciated.
Stack Trace in release mode:
-------------------------------------------
at RET.BusinessServices.BaseEntity.CheckConsistentForeignKeyField()
at RET.BusinessServices.BaseEntity.SetPropertyValue(String&, String)
at RET.BusinessLogic.BFormManager.DoInsert(BaseEntity)
at RET.BusinessServices.BaseEntityManager.SaveEntity(BaseEntity)
at RET.Facades.fcdBFormPanel.CreateNewBForm(Int32)
at RET.Web.Controls.BFormPanel.LoadFormData()
at RET.Web.Controls.BFormPanel.InitPage()
at RET.Web.Controls.BFormPanel.Page_Load(Object, EventArgs)
at System.Web.UI.Control.OnLoad(EventArgs)
...and so on...
Stack Trace in debug mode:
----------------------------------------
at RET.BusinessServices.BaseEntity.CheckConsistentForeignKeyField()
at RET.BusinessServices.BaseEntity.SetPropertyValue(String&, String)
* at RET.BusinessEntities.BForm.set_LastModifiedBy(String)
at RET.BusinessLogic.BFormManager.DoInsert(BaseEntity)
at RET.BusinessServices.BaseEntityManager.SaveEntity(BaseEntity)
at RET.Facades.fcdBFormPanel.CreateNewBForm(Int32)
at RET.Web.Controls.BFormPanel.LoadFormData()
at RET.Web.Controls.BFormPanel.InitPage()
at RET.Web.Controls.BFormPanel.Page_Load(Object, EventArgs)
at System.Web.UI.Control.OnLoad(EventArgs)
...and so on...
Thanks,
Peter
David Wang - 30 Jul 2008 19:00 GMT
> Hi everyone,
>
[quoted text clipped - 44 lines]
> Thanks,
> Peter
Are we talking about the same binary DLL, or one is "Debug" and the
other "Retail" ?
Because "Retail" compilation includes inlining and other such
optimizations that can remove the literal property accessors.
//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//