Null Object reference

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
5/24/2011 9:46:30 AM
Gravatar
Total Posts 26

Null Object reference

Hi i've created a settings for slide show control..

I am just storing some content to an xml file. Then retrieving the same from xml file in page load.

its saving all the contents correctly but while retrieving am getting Null object reference error..

ERROR mojoPortal.Web.AdminUI.ModuleSettingsPage - ModuleSettings.aspx.cs error getting resource for s.SettingName 
System.NullReferenceException: Object reference not set to an instance of an object.
   at mojoPortal.Web.AdminUI.ModuleSettingsPage.AddSettingControl(CustomModuleSetting s, Panel groupPanel)

Kindly guide me what  may be the cause..

Thank you..

5/24/2011 10:02:31 AM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: Null Object reference

The best way to debug this would be to set a breakpoint at the start of retrieving, run in debug mode, and step through the code until you find the statement causing the null object reference. You may just have an uninitialized variable somewhere. This video should help you with the process, if you haven't already gone through the developer video series.

Hope that helps,

Jamie

5/24/2011 10:12:52 AM
Gravatar
Total Posts 18439

Re: Null Object reference

This is a known/previously reported issue that is already fixed in the source code repository. There is a workaround mentioned on this thread if you can't use the latest source code.

Hope that helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.