title: "Object reference not set to an instance of an object"-exception on mobile sharepoint page
body: <p>My Situation:</p>
  
  <p>When I try to access the (custom) masterpage of a SharePoint 2010 solution, I'm developing, in the mobile view (using the Microsoft Mobile Device Emulator /w Win Mobile 6.1/IE6) I get the "Object reference not set to an instance of an object" exception without further explanation. The error is shown directly on the page itself.</p>
  
  <p>The log on the server shows no error(s), and since I haven't developed any custom mobile sites or webparts yet and the normal Master-page in IE8 shows no errors I literally have not the slightest clue what's causing the error, and I see no mean how to debug this...</p>
  
  <p>This is pretty much a deadlock for me, and this gives me serious headaches cause it's the first time for me to work with the built-in SharePoint mobile-view thing and I really don't now what to do to get beyond this to actually start working.</p>
  
  <p>I hope that this describes my problem well enough, otherwise I'll try to provide you with further information. (Just let me know)</p>
  
  <p>I'm aware that it is probably hard to help me in this special use-case because there is no error-source known yet. But I'm thankful for every answer and comment that can point in the right direction to solve this problem and/or to get the source of this error.</p>
  
  <p>sincerely, Markus Schwalbe</p>
  
  <hr>
  
  <p><strong>EDIT:</strong>
  as requested, here's the stack trace: </p>
  
  <blockquote>
    <p>bei
    Microsoft.SharePoint.MobileControls.SPMobileWikiPage.CreateChildControlsFromXmlNode(XmlNode
    node, ControlCollection controls)<br>
    bei
    Microsoft.SharePoint.MobileControls.SPMobileWikiPage.CreateStyleChildControl(XmlNode
    node, ControlCollection controls)<br>
    bei
    Microsoft.SharePoint.MobileControls.SPMobileWikiPage.CreateChildControlsFromXmlNode(XmlNode
    node, ControlCollection controls)<br>
    bei
    Microsoft.SharePoint.MobileControls.SPMobileWikiPage.CreateStyleChildControl(XmlNode
    node, ControlCollection controls)<br>
    bei
    Microsoft.SharePoint.MobileControls.SPMobileWikiPage.CreateChildControlsFromXmlNode(XmlNode
    node, ControlCollection controls)<br>
    bei
    Microsoft.SharePoint.MobileControls.SPMobileWikiPage.CreateStyleChildControl(XmlNode
    node, ControlCollection controls)<br>
    bei
    Microsoft.SharePoint.MobileControls.SPMobileWikiPage.CreateChildControlsFromXmlNode(XmlNode
    node, ControlCollection controls)<br>
    bei
    Microsoft.SharePoint.MobileControls.SPMobileWikiPage.CreateChildControlsForWiki(SPListItem
    item)    bei
    Microsoft.SharePoint.MobileControls.SPMobileWikiPage.OnLoad(EventArgs
    e)    bei
    ASP._layouts_mobile_mblwiki_aspx.OnLoad(EventArgs
    e) in c:\Program Files\Common
    Files\Microsoft Shared\Web Server
    Extensions\14\TEMPLATE\LAYOUTS\MOBILE\mblwiki.aspx:Zeile
    13.    bei System.Web.UI.Control.LoadRecursive() 
    bei
    System.Web.UI.Page.ProcessRequestMain(Boolean
    includeStagesBeforeAsyncPoint, Boolean
    includeStagesAfterAsyncPoint)</p>
  </blockquote>
  
  <p>I hope that helps.
  btw. editing the web.config to show the stack trace didn't worked out, but I managed to debug the mblwiki.aspx, and found out that the exception is thrown in the onLoad() method: (I got the stack trace from there)</p>
  
  <p><a href="http://img18.imageshack.us/img18/3350/errorub.jpg" rel="nofollow">http://img18.imageshack.us/img18/3350/errorub.jpg</a> &lt;&lt;
  It's a link, because stackoverflow doesn't allows me to post images directly. (my rep is still too low)</p>
  
  <p><em>Also a note to the image (Since it's in german):</em> "Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt." == "Object reference not set to an instance of an object."</p>