Object reference not set to an instance of an object problem

8 posts, 0 answers
  1. KocSistem
    KocSistem avatar
    25 posts
    Member since:
    Sep 2008

    Posted 27 Aug 2009 Link to this post

    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
  2. Veli
    Admin
    Veli avatar
    2002 posts

    Posted 28 Aug 2009 Link to this post

    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.
  3. KocSistem
    KocSistem avatar
    25 posts
    Member since:
    Sep 2008

    Posted 31 Aug 2009 Link to this post

    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
  4. Veli
    Admin
    Veli avatar
    2002 posts

    Posted 03 Sep 2009 Link to this post

    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.
  5. KocSistem
    KocSistem avatar
    25 posts
    Member since:
    Sep 2008

    Posted 04 Sep 2009 Link to this post

    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

  6. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 07 Sep 2009 Link to this post

    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.
  7. Jeanne Kornkven
    Jeanne Kornkven avatar
    14 posts
    Member since:
    May 2008

    Posted 12 Oct 2010 Link to this post

    KOCSISTEM BILGI ,
         Did you ever resolve this issue?  I am seeing the same error, using Telerik controls.
    Thanks,
  8. Andrea Tasca
    Andrea Tasca avatar
    3 posts
    Member since:
    Mar 2010

    Posted 16 Feb 2011 Link to this post

    try calling RadFilter.FireApplyCommand() before RadFilter.LoadSettings()
Back to Top