Tag: 黄屏死机

实例化对象的NullReferenceException?

这是我inheritance的应用程序的一段代码,用户有一个黄色的死亡屏幕: 你调用的对象是空的 在线上: bool l_Success … 现在我95%确定错误的参数是ref l_Monitor ,这是非常奇怪的,考虑到对象之前被实例化了几行。 任何人都知道为什么会发生这种情况? 请注意,我在代码中的其他位置弹出了相同的问题。 IDMS.Monitor l_Monitor = new IDMS.Monitor(); l_Monitor.LogFile.Product_ID = “SE_WEB_APP”; if (m_PermType_RadioButtonList.SelectedIndex == -1) { l_Monitor.LogFile.Log( Nortel.IS.IDMS.LogFile.MessageTypes.ERROR, “No permission type selected” ); return; } bool l_Success = SE.UI.Utilities.GetPermissionList( ref l_Monitor, ref m_CPermissions_ListBox, (int)this.ViewState[“m_Account_Share_ID”], (m_PermFolders_DropDownList.Enabled) ? m_PermFolders_DropDownList.SelectedItem.Value : “-1”, (SE.Types.PermissionType)m_PermType_RadioButtonList.SelectedIndex, (SE.Types.PermissionResource)m_PermResource_RadioButtonList.SelectedIndex);