Bug Report T296826
Visible to All Users

DataLayoutControl throws StackOverflowException under certain circumstances

created 9 years ago

[DevExpress Support Team: CLONED FROM T288096: DataLayoutControl throws ArgumentException when bound to the XPCollection]
No properties are listed in the xpcollection and the options on the datalayoutcntrol are not set.
This is the call stack with the latest versions
mscorlib.dll!System.Array.Resize<System.Reflection.PropertyInfo>(ref System.Reflection.PropertyInfo[] array, int newSize) Unknown
mscorlib.dll!System.RuntimeType.ListBuilder<System.Reflection.PropertyInfo>.ToArray() Unknown
mscorlib.dll!System.RuntimeType.GetProperties(System.Reflection.BindingFlags bindingAttr) Unknown
> DevExpress.XtraLayout.v15.1.dll!DevExpress.XtraDataLayout.LayoutElementsBindingInfoHelper.IsSimpleType(System.Collections.Hashtable dataTypeHashtable, System.Type dataType) Line 990 C#
DevExpress.XtraLayout.v15.1.dll!DevExpress.XtraDataLayout.LayoutElementsBindingInfoHelper.IsSimpleType.AnonymousMethod__8(System.Reflection.PropertyInfo p) Line 991 C#
System.Core.dll!System.Linq.Enumerable.Any<System.Reflection.PropertyInfo>(System.Collections.Generic.IEnumerable<System.Reflection.PropertyInfo> source, System.Func<System.Reflection.PropertyInfo, bool> predicate) Unknown
The last 3 lines just repeats undefinetely, and this is the exception
System.StackOverflowException was unhandled
 HResult=-2147023895
 Message=Exception of type 'System.StackOverflowException' was thrown.
 InnerException:

C#
// // src (the XPCollection) // this.src.LoadingEnabled = false; this.src.ObjectType = typeof(BlueCashNEXT.Data.Gestione.AttivitaSvolta); this.src.ResolveSession += new DevExpress.Xpo.ResolveSessionEventHandler(this.src_ResolveSession); // // layoutControl // this.layoutControl.Controls.Add(this.OperatoreLookupEdit); this.layoutControl.Controls.Add(this.AziendaLookupEdit); this.layoutControl.Controls.Add(this.AttivitaLookupEdit); this.layoutControl.Controls.Add(this.ClienteLookupEdit); this.layoutControl.Controls.Add(this.ProgettoLookupEdit); this.layoutControl.Controls.Add(this.DataDateEdit); this.layoutControl.Controls.Add(this.DescrizioneMemoEdit); this.layoutControl.Controls.Add(this.NoteMemoEdit); this.layoutControl.Controls.Add(this.QuantitaSpinEdit); this.layoutControl.Controls.Add(this.SospendiFatturazioneToggleSwitch); this.layoutControl.Controls.Add(this.TariffaPersonalizzataSpinEdit); this.layoutControl.Controls.Add(this.ReferenteComboBoxEdit); this.layoutControl.DataSource = this.src; this.layoutControl.Dock = System.Windows.Forms.DockStyle.Fill; this.layoutControl.Location = new System.Drawing.Point(0, 24); this.layoutControl.Name = "layoutControl"; this.layoutControl.OptionsPrint.AppearanceGroupCaption.BackColor = System.Drawing.Color.LightGray; this.layoutControl.OptionsPrint.AppearanceGroupCaption.Font = new System.Drawing.Font("Tahoma", 10.25F); this.layoutControl.OptionsPrint.AppearanceGroupCaption.Options.UseBackColor = true; this.layoutControl.OptionsPrint.AppearanceGroupCaption.Options.UseFont = true; this.layoutControl.OptionsPrint.AppearanceGroupCaption.Options.UseTextOptions = true; this.layoutControl.OptionsPrint.AppearanceGroupCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; this.layoutControl.OptionsPrint.AppearanceGroupCaption.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center; this.layoutControl.OptionsPrint.AppearanceItemCaption.Options.UseTextOptions = true; this.layoutControl.OptionsPrint.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near; this.layoutControl.OptionsPrint.AppearanceItemCaption.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center; this.layoutControl.Root = this.Root; this.layoutControl.Size = new System.Drawing.Size(602, 366); this.layoutControl.TabIndex = 5; this.layoutControl.Text = "dataLayoutControl1";

Answers approved by DevExpress Support

created 9 years ago (modified 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.

    Show previous comments (5)

      Great news, thank you Uriah.

      DevExpress Support Team 9 years ago

        Hello Luca,

        Our developers have fixed all issues thanks to the additional information you provided. I have already requested a hotfix for you, and it will be provided in a few days. You will receive the email notification when the hotfix is available.

          Thank you, I will wait for the hotfix and when it's ready download and test it.
          I will let you know if everything is fine with the new version

          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.