This is a migrated thread and some comments may be shown as answers.

Object reference not set to an instance of an object problem

7 Answers 214 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
KocSistem
Top achievements
Rank 1
KocSistem asked on 27 Aug 2009, 02:02 PM
Hi,
I'm having problem with my project. Randomly, i got object reference problem in different pages, however i can't find a scenario which causes this. It's totally random.

When i catch this in debug mode, i saw that viewstates were loosing their values but i'm not sure about that. Debugger stops at a random viewstate, says value = null, however i'm sure it had a value before. Somehow, it looses its value after postback but as i said, i can't create a scenario

Here is my error log

<Log> 
<ExtendedProp><Url>http://195.87.212.232/LeasingPublish/Credit/CreditProposalQuery.aspx</Url><UserFullName>KREDİ ANALİSTİ</UserFullName><UserName>KRD_ANS</UserName><UserIP>195.87.213.86</UserIP><StackTrace>   at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)  
   at System.Xml.XmlDocument.Load(XmlReader reader)  
   at System.Web.UI.WebControls.XmlDataSource.PopulateXmlDocument(XmlDocument document, CacheDependency# dataCacheDependency, CacheDependency# transformCacheDependency)  
   at System.Web.UI.WebControls.XmlDataSource.GetXmlDocument()  
   at System.Web.UI.WebControls.XmlHierarchicalDataSourceView.Select()  
   at Telerik.Web.UI.HierarchicalControlItemContainer.GetHierarchyData(IEnumerable data)  
   at Telerik.Web.UI.HierarchicalControlItemContainer.PerformDataBinding(IEnumerable data)  
   at System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data)  
   at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)  
   at System.Web.UI.WebControls.DataBoundControl.PerformSelect()  
   at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()  
   at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound()  
   at System.Web.UI.WebControls.BaseDataBoundControl.OnPreRender(EventArgs e)  
   at Telerik.Web.UI.RadDataBoundControl.OnPreRender(EventArgs e)  
   at System.Web.UI.Control.PreRenderRecursiveInternal()  
   at System.Web.UI.Control.PreRenderRecursiveInternal()  
   at System.Web.UI.Control.PreRenderRecursiveInternal()  
   at System.Web.UI.Control.PreRenderRecursiveInternal()  
   at System.Web.UI.Control.PreRenderRecursiveInternal()  
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)</StackTrace><Guid>b175ba72-b3fb-4257-b005-89f5cbabcbd3</Guid> 
</ExtendedProp> 
</Log> 

Anyone had this problem before?

Thanks

7 Answers, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 28 Aug 2009, 01:20 PM
Hi,

The stack trace says the exception is thrown in System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace). You can double check to make sure you are passing the correct parameters to the method all the time. Without an error reproduce-able scenario, we would not be able to suggest much.

Kind regards,
Veli
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
KocSistem
Top achievements
Rank 1
answered on 31 Aug 2009, 08:09 AM
I'm not calling XmlDocument.Load or anything in the log. Can any component of telerik call any of these?
I'm using radajaxpanel, radscriptmanager and radcompressor. None of the other projects i have made had this problem. This is the first time i'm using telerik components and i'm getting this error

As i said, it's completely random, i can't produce a scenario however i'm pretty sure that i'm passing the correct parameters to the methods. Because same page works without an error but sometimes i'm getting this weird problem

I think, this is something with ajax but i don't know
0
Veli
Telerik team
answered on 03 Sep 2009, 07:37 AM
Hello,

I am not saying that you are calling XmlDocument.Load(), but that is where the exception is thrown. It looks like the XML data cannot properly be loaded every time. If you think it is an AJAX issue, try disabling all AJAX and see if you can reproduce it. But it seems more like data access issue.

Best wishes,
Veli
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
KocSistem
Top achievements
Rank 1
answered on 04 Sep 2009, 01:28 PM

Actually, i can't remove ajax components, i have more than 100 pages in this project and no time to test them.

However, i made a change in one of the pages that had this problem. I completely removed radtabs and i used rad menu instead of it. Also i changed AsyncPostBackTimeout to 300 in radscriptmanager. Right now, i'm not getting this error but i'm not sure that i won't get it anymore. Which one may fixed this?Rad Menu or AsyncPostBackTimeout?I really want to know the answer

0
Paul
Telerik team
answered on 07 Sep 2009, 11:08 AM
Hi there,

As already suggested, I think it will be best if you can open a support ticket and send us a simple running project (incl. your custom skin, CSS, images, DB backup if needed and so on) demonstrating the problem (and step-by-step instructions on doing so). In that way we can reproduce and pinpoint the problems you're facing on our side, understand the logic of your application and provide a solution.

Kind regards,
Paul
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Jeanne Kornkven
Top achievements
Rank 1
answered on 12 Oct 2010, 11:52 PM
KOCSISTEM BILGI ,
     Did you ever resolve this issue?  I am seeing the same error, using Telerik controls.
Thanks,
0
Andrea Tasca
Top achievements
Rank 1
answered on 16 Feb 2011, 06:01 PM
try calling RadFilter.FireApplyCommand() before RadFilter.LoadSettings()
Tags
Ajax
Asked by
KocSistem
Top achievements
Rank 1
Answers by
Veli
Telerik team
KocSistem
Top achievements
Rank 1
Paul
Telerik team
Jeanne Kornkven
Top achievements
Rank 1
Andrea Tasca
Top achievements
Rank 1
Share this question
or