Steps to reproduce:
1 - Create a report and bind it to a database.
2 - Open the "Manage Queries" dialog.
3 - Check the "Allow Edit SQL" parameter.
4 - Input an invalid SQL query (for example, column name typo).
5 - Click on the "OK" button.
Current results:
The application throws an exception:
Call Stack> [Exception] DevExpress.DataAccess.v24.1.dll!DevExpress.DataAccess.Sql.SqlDataSource.ThrowAggregateExceptionIfNeeded(System.Exception[] exceptions, string message) Line 153 C# [Exception] DevExpress.DataAccess.v24.1.dll!DevExpress.DataAccess.Sql.SqlDataSource.RebuildResultSchemaCore(System.Predicate<System.Collections.Generic.IEnumerable<DevExpress.DataAccess.Sql.SqlQuery>> confirmExecution, System.Collections.Generic.IEnumerable<DevExpress.Data.IParameter> parameters, System.Collections.Generic.IEnumerable<DevExpress.DataAccess.Sql.SqlQuery> queries, DevExpress.DataAccess.Sql.IResultSchemaProvider resultSchemaProvider, System.Threading.CancellationToken cancellationToken) Line 646 C# [Exception] DevExpress.DataAccess.v24.1.dll!DevExpress.DataAccess.Sql.SqlDataSource.RebuildResultSchema(System.Predicate<System.Collections.Generic.IEnumerable<DevExpress.DataAccess.Sql.SqlQuery>> confirmExecution, System.Collections.Generic.IEnumerable<DevExpress.Data.IParameter> parameters, System.Collections.Generic.IEnumerable<DevExpress.DataAccess.Sql.SqlQuery> queries) Line 568 C# [Exception] DevExpress.DataAccess.v24.1.dll!DevExpress.DataAccess.Sql.SqlDataSource.RebuildResultSchema(System.Predicate<System.Collections.Generic.IEnumerable<DevExpress.DataAccess.Sql.SqlQuery>> confirmExecution, System.Collections.Generic.IEnumerable<DevExpress.Data.IParameter> parameters) Line 564 C# [Exception] DevExpress.DataAccess.v24.1.dll!DevExpress.DataAccess.Sql.SqlDataSource.RebuildResultSchema(System.Collections.Generic.IEnumerable<DevExpress.Data.IParameter> parameters) Line 558 C# [Exception] DevExpress.DataAccess.v24.1.dll!DevExpress.DataAccess.Sql.SqlDataSource.RebuildResultSchema() Line 555 C# [Exception] DevExpress.Xpf.ReportDesigner.v24.1.dll!DevExpress.Xpf.Reports.UserDesigner.Editors.SqlQueryCollectionUITypeEditor.RebuildResultSchema(DevExpress.Xpf.Reports.UserDesigner.XRDiagram.XtraReportDiagramItem reportModel, DevExpress.Xpf.Reports.UserDesigner.XRDiagram.DataComponentBaseDiagramItem dataComponentItem) Unknown [Exception] DevExpress.Xpf.ReportDesigner.v24.1.dll!DevExpress.Xpf.Reports.UserDesigner.Editors.QueryCollectionEditorBase.RebuildResultSchemaInternal(System.Tuple<DevExpress.Diagram.Core.Native.DiagramItemFinder, DevExpress.Diagram.Core.Native.DiagramItemFinder> rebuildSchemaState) Unknown [Exception] DevExpress.Xpf.ReportDesigner.v24.1.dll!DevExpress.Xpf.Reports.UserDesigner.Editors.QueryCollectionEditorBase.BeforeCommitAction.AnonymousMethod__27_0(System.Tuple<DevExpress.Diagram.Core.Native.DiagramItemFinder, DevExpress.Diagram.Core.Native.DiagramItemFinder> redo) Unknown [Exception] DevExpress.Diagram.v24.1.Core.dll!DevExpress.Utils.Transaction.DevExpress.Utils.ITransaction.Execute.AnonymousMethod__0(TRedoState x) Unknown [Exception] DevExpress.Diagram.v24.1.Core.dll!DevExpress.Utils.UndoManagerBase.CreateRedoAction.AnonymousMethod__0() Unknown [Exception] DevExpress.Diagram.v24.1.Core.dll!DevExpress.Utils.UndoManagerBase.RedoAction.DevExpress.Utils.UndoManagerBase.IRedoAction.Redo() Unknown [Exception] DevExpress.Diagram.v24.1.Core.dll!DevExpress.Utils.Transaction.DevExpress.Utils.ITransaction.Execute<TRedoState, TUndoState>(TRedoState redoState, System.Func<TRedoState, TUndoState> redo, System.Func<TUndoState, TRedoState> undo, System.Func<TUndoState, TUndoState, TUndoState> merge) Unknown [Exception] DevExpress.Xpf.ReportDesigner.v24.1.dll!DevExpress.Xpf.Reports.UserDesigner.Editors.QueryCollectionEditorBase.BeforeCommitAction() Unknown [Exception] DevExpress.Xpf.ReportDesigner.v24.1.dll!DevExpress.Xpf.Reports.UserDesigner.Editors.QueryCollectionEditorBase<TQueryCollection, TQuery>.BeforeCommitAction() Unknown [Exception] DevExpress.Xpf.Diagram.v24.1.dll!DevExpress.Xpf.Diagram.Native.CollectionEditorBase.InitializeClosingEvent.AnonymousMethod__0(object s, System.ComponentModel.CancelEventArgs e) Unknown [Exception] PresentationFramework.dll!System.Windows.Window.OnClosing(System.ComponentModel.CancelEventArgs e) Unknown [Exception] DevExpress.Xpf.Core.v24.1.dll!DevExpress.Xpf.Core.DXWindow.OnClosing(System.ComponentModel.CancelEventArgs e) Unknown [Exception] DevExpress.Xpf.Core.v24.1.dll!DevExpress.Xpf.Core.DXDialogWindow.OnClosing(System.ComponentModel.CancelEventArgs e) Unknown [Exception] PresentationFramework.dll!System.Windows.Window.WmClose() Unknown [Exception] PresentationFramework.dll!System.Windows.Window.WindowFilterMessage(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Unknown [Exception] PresentationCore.dll!System.Windows.Interop.HwndSource.PublicHooksFilterMessage(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Unknown [Exception] WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Unknown [Exception] WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) Unknown [Exception] WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) Unknown [Exception] WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler) Unknown [Exception] WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs) Unknown [Exception] WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) Unknown [Exception] PresentationFramework.dll!System.Windows.Window.InternalClose(bool shutdown, bool ignoreCancel) Unknown [Exception] PresentationFramework.dll!System.Windows.Window.Close() Unknown [Exception] PresentationFramework.dll!System.Windows.Window.DialogResult.set(bool? value) Unknown [Exception] DevExpress.Xpf.Core.v24.1.dll!DevExpress.Xpf.Core.DXDialogWindow.CloseDialog(System.Windows.MessageBoxResult? result) Unknown [Exception] DevExpress.Xpf.Core.v24.1.dll!DevExpress.Xpf.Core.DXDialogWindow.CloseCore(DevExpress.Mvvm.UICommand command) Unknown [Exception] DevExpress.Xpf.Core.v24.1.dll!DevExpress.Xpf.Core.DXDialogWindow.OnUICommandExecuted(object sender, System.EventArgs e) Unknown [Exception] DevExpress.Mvvm.v24.1.dll!DevExpress.Mvvm.UICommand.DevExpress.Mvvm.Native.IUICommand.RaiseExecuted() Unknown [Exception] DevExpress.Xpf.Core.v24.1.dll!DevExpress.Xpf.Core.DialogButton.UICommandWrapper.System.Windows.Input.ICommand.Execute(object parameter) Unknown [Exception] PresentationFramework.dll!MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(System.Windows.Input.ICommandSource commandSource, bool userInitiated) Unknown [Exception] PresentationFramework.dll!System.Windows.Controls.Primitives.ButtonBase.OnClick() Unknown [Exception] PresentationFramework.dll!System.Windows.Controls.Button.OnClick() Unknown [Exception] PresentationFramework.dll!System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs e) Unknown [Exception] PresentationCore.dll!System.Windows.UIElement.OnMouseLeftButtonUpThunk(object sender, System.Windows.Input.MouseButtonEventArgs e) Unknown [Exception] PresentationCore.dll!System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate genericHandler, object genericTarget) Unknown [Exception] PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler, object target) Unknown [Exception] PresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler(object target, System.Windows.RoutedEventArgs routedEventArgs) Unknown [Exception] PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source, System.Windows.RoutedEventArgs args, bool reRaised) Unknown [Exception] PresentationCore.dll!System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject sender, System.Windows.RoutedEventArgs args, System.Windows.RoutedEvent newEvent) Unknown [Exception] PresentationCore.dll!System.Windows.UIElement.OnMouseUpThunk(object sender, System.Windows.Input.MouseButtonEventArgs e) Unknown [Exception] PresentationCore.dll!System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate genericHandler, object genericTarget) Unknown [Exception] PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler, object target) Unknown [Exception] PresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler(object target, System.Windows.RoutedEventArgs routedEventArgs) Unknown [Exception] PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source, System.Windows.RoutedEventArgs args, bool reRaised) Unknown [Exception] PresentationCore.dll!System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject sender, System.Windows.RoutedEventArgs args) Unknown [Exception] PresentationCore.dll!System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs args) Unknown [Exception] PresentationCore.dll!System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs args, bool trusted) Unknown [Exception] PresentationCore.dll!System.Windows.Input.InputManager.ProcessStagingArea() Unknown [Exception] PresentationCore.dll!System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs input) Unknown [Exception] PresentationCore.dll!System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport inputReport) Unknown [Exception] PresentationCore.dll!System.Windows.Interop.HwndMouseInputProvider.ReportInput(System.IntPtr hwnd, System.Windows.Input.InputMode mode, int timestamp, System.Windows.Input.RawMouseActions actions, int x, int y, int wheel) Unknown [Exception] PresentationCore.dll!System.Windows.Interop.HwndMouseInputProvider.FilterMessage(System.IntPtr hwnd, MS.Internal.Interop.WindowMessage msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Unknown [Exception] PresentationCore.dll!System.Windows.Interop.HwndSource.InputFilterMessage(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Unknown [Exception] WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Unknown [Exception] WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) Unknown [Exception] WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) Unknown [Exception] WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler) Unknown [Exception] WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs) Unknown [Exception] WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) Unknown [Exception] WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame) Unknown [Exception] WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame frame) Unknown [Exception] PresentationFramework.dll!System.Windows.Window.ShowHelper(object booleanBox) Unknown [Exception] PresentationFramework.dll!System.Windows.Window.Show() Unknown PresentationFramework.dll!System.Windows.Window.ShowDialog() Unknown DevExpress.Xpf.Core.v24.1.dll!DevExpress.Xpf.Core.DXDialogWindow.ShowDialogWindowCore() Unknown DevExpress.Xpf.Core.v24.1.dll!DevExpress.Xpf.Core.DXDialogWindow.ShowDialogWindow() Unknown DevExpress.Xpf.Core.v24.1.dll!DevExpress.Xpf.Core.DialogService.ShowDialog(System.Collections.Generic.IEnumerable<DevExpress.Mvvm.UICommand> dialogCommands, string title, object view) Unknown DevExpress.Xpf.Core.v24.1.dll!DevExpress.Xpf.Core.DialogService.DevExpress.Mvvm.IDialogService.ShowDialog(System.Collections.Generic.IEnumerable<DevExpress.Mvvm.UICommand> dialogCommands, string title, string documentType, object viewModel, object parameter, object parentViewModel) Unknown DevExpress.Xpf.Core.v24.1.dll!DevExpress.Xpf.Editors.DialogServiceEditorBehavior.ProcessClickForFrameworkElementInternal.AnonymousMethod__0(DevExpress.Mvvm.IDialogService service) Unknown DevExpress.Xpf.Core.v24.1.dll!DevExpress.Mvvm.UI.Native.AssignableServiceHelper2<System.Windows.DependencyObject, DevExpress.Mvvm.IDialogService>.DoServiceAction(System.Windows.DependencyObject owner, DevExpress.Mvvm.IDialogService service, System.Action<DevExpress.Mvvm.IDialogService> action) Unknown DevExpress.Xpf.Core.v24.1.dll!DevExpress.Xpf.Editors.DialogServiceEditorBehavior.ProcessClickForFrameworkElementInternal(System.Windows.FrameworkElement owner, object editValue) Unknown DevExpress.Xpf.Core.v24.1.dll!DevExpress.Xpf.Editors.DialogServiceEditorBehaviorBase.ProcessClickForFrameworkElement.AnonymousMethod__0() Unknown WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) Unknown WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler) Unknown WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeImpl() Unknown WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(object state) Unknown WindowsBase.dll!MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(object obj) Unknown mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown WindowsBase.dll!MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown WindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke() Unknown WindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue() Unknown WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Unknown WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Unknown WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) Unknown WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) Unknown WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler) Unknown WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs) Unknown WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) Unknown [Native to Managed Transition] [Managed to Native Transition] WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame) Unknown WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame frame) Unknown PresentationFramework.dll!System.Windows.Application.RunDispatcher(object ignore) Unknown PresentationFramework.dll!System.Windows.Application.RunInternal(System.Windows.Window window) Unknown PresentationFramework.dll!System.Windows.Application.Run(System.Windows.Window window) Unknown PresentationFramework.dll!System.Windows.Application.Run() Unknown Report.exe!Report.App.Main() Unknown
Additional information:
We fixed a similar issue in v23.1.7 and v22.2.7. See: T1152531 - End-User Report Designer for WPF - Invalid SQL query crashes the application.