Bug Report T300160
Visible to All Users

NullReferenceException is raised on executing the PageSetupViewModel.GetPrintArea method

created 9 years ago

On opening the "Custom Margins" dialog when a specific file was loaded into the SpreadsheetControl, the NullReferenceException is raised with the following callstack:

> DevExpress.Spreadsheet.v15.1.Core.dll!DevExpress.XtraSpreadsheet.Forms.PageSetupViewModel.GetPrintArea() Line 671 + 0x1c bytes C#
  DevExpress.Spreadsheet.v15.1.Core.dll!DevExpress.XtraSpreadsheet.Forms.PageSetupViewModel.PageSetupViewModel(DevExpress.XtraSpreadsheet.ISpreadsheetControl Control, DevExpress.XtraSpreadsheet.Forms.PageSetupFormInitialTabPage initialTabPage) Line 177 + 0x8 bytes C#
  DevExpress.Spreadsheet.v15.1.Core.dll!DevExpress.XtraSpreadsheet.Commands.ShowPageSetupFormCommandBase.CreateViewModel() Line 75 + 0x41 bytes C#
  DevExpress.Spreadsheet.v15.1.Core.dll!DevExpress.XtraSpreadsheet.Commands.ShowPageSetupFormCommandBase.ExecuteCore() Line 71 + 0x3c bytes C#
  DevExpress.Spreadsheet.v15.1.Core.dll!DevExpress.XtraSpreadsheet.Commands.SpreadsheetMenuItemSimpleCommand.ForceExecute(DevExpress.Utils.Commands.ICommandUIState state) Line 52 + 0x12 bytes C#
  DevExpress.Data.v15.1.dll!DevExpress.Utils.Commands.Command.Execute() Line 131 + 0x10 bytes C#
  DevExpress.XtraBars.v15.1.dll!DevExpress.XtraBars.Commands.ControlCommandBarButtonItem<DevExpress.XtraSpreadsheet.SpreadsheetControl,DevExpress.XtraSpreadsheet.Commands.SpreadsheetCommandId>.InvokeCommand() Line 1258 C#
  DevExpress.XtraBars.v15.1.dll!DevExpress.XtraBars.Commands.CommandBarController.InvokeItemCommand(DevExpress.XtraBars.Commands.ICommandBarItem item) Line 3499 + 0x12 bytes C#
  DevExpress.XtraBars.v15.1.dll!DevExpress.XtraBars.BarItem.OnClick(DevExpress.XtraBars.BarItemLink link) Line 1182 + 0x1b bytes C#
  DevExpress.XtraBars.v15.1.dll!DevExpress.XtraBars.BarButtonItem.OnClick(DevExpress.XtraBars.BarItemLink link) Line 263 + 0x32 bytes C#
  DevExpress.XtraBars.v15.1.dll!DevExpress.XtraBars.BarItemLink.OnLinkClick() Line 1070 C#
  DevExpress.XtraBars.v15.1.dll!DevExpress.XtraBars.BarButtonItemLink.OnLinkAction(DevExpress.XtraBars.BarLinkAction action, object actionArgs) Line 720 C#
  DevExpress.XtraBars.v15.1.dll!DevExpress.XtraBars.ViewInfo.BarSelectionInfo.UnPressLink(DevExpress.XtraBars.BarItemLink link) Line 732 + 0x10 bytes C#
  DevExpress.XtraBars.v15.1.dll!DevExpress.XtraBars.Controls.CustomLinksControl.OnMouseUp(System.Windows.Forms.MouseEventArgs e) Line 840 + 0x2a bytes C#

Answers approved by DevExpress Support

created 9 years ago

We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.