Bug Report T1176179
Visible to All Users

The ArgumentException exception occurs when localization strings are accessed during multithreading (hotfix 23.1.4-pre-23183)

created 2 years ago (modified 2 years ago)

ArgumentException: An item with the same key has already been added.

Call Stack
at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value) at DevExpress.Utils.Localization.XtraLocalizer.DXResourceManager.FixUpInvariantStrings(ResourceSet resourceSet) at DevExpress.Utils.Localization.XtraLocalizer.DXResourceManager.EnsureResourcesCore(CultureInfo culture, ResourceSet& resourceSet) at DevExpress.Utils.Localization.XtraLocalizer.DXResourceManager.EnsureResources(CultureInfo culture) at DevExpress.Utils.Localization.XtraLocalizer.DXResourceManager.ResourceSetProxy.GetString(String name, Boolean ignoreCase) at System.Resources.ResourceManager.GetString(String name, CultureInfo culture) at DevExpress.Utils.Localization.XtraResXLocalizer`1.GetLocalizedStringFromResources(T id) at DevExpress.Utils.Localization.XtraResXLocalizer`1.GetLocalizedStringCore(T id) at DevExpress.Utils.Localization.XtraResXLocalizer`1.ResourceIdToString(T id) at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory) at DevExpress.Utils.Localization.XtraResXLocalizer`1.GetLocalizedString(T id) at DevExpress.XtraPrinting.Localization.PreviewLocalizer.GetString(PreviewStringId id) at DevExpress.XtraPrinting.Localization.PreviewStringIdExtensions.GetString(PreviewStringId id) at DevExpress.XtraReports.UI.XRGauge.PutStateToBrick(VisualBrick brick, PrintingSystemBase ps) at DevExpress.XtraReports.UI.XRControl.PutStateToBrickConditional(VisualBrick brick, PrintingSystemBase ps) at DevExpress.XtraReports.UI.XRControl.CreateInitializedBrickWithoutValidation(VisualBrick[] childrenBricks, XRWriteInfo writeInfo) at DevExpress.XtraReports.UI.XRControl.CreateInitializedBrick(VisualBrick[] childrenBricks, XRWriteInfo writeInfo) at DevExpress.XtraReports.UI.XRControl.GetPrintableBrick(XRWriteInfo writeInfo) at DevExpress.XtraReports.UI.XRControl.WriteContentToAsync(XRWriteInfo writeInfo) at DevExpress.XtraReports.UI.Band.BandContentGenerator.GenerateAsync(DocumentBand docBand) at DevExpress.XtraReports.UI.Band.GenerateContentAsync(DocumentBand docBand, Int32 rowIndex, CancelEventArgs args, Boolean useAsync) at DevExpress.XtraReports.UI.Band.GenerateContentAndDecomposeAsync(DocumentBand docBand, Int32 rowIndex, CancelEventArgs args) at DevExpress.XtraReports.UI.Band.CreateDocumentBandAsync(PrintingSystemBase ps, Int32 rowIndex, PageBuildInfo pageBuildInfo, Boolean raiseEvent) at DevExpress.XtraReports.UI.Band.CreateSubDocumentBandsAsync(PrintingSystemBase ps, Int32 rowIndex, PageBuildInfo pageBuildInfo, Boolean raiseEvent) at DevExpress.XtraReports.UI.Band.CreateDocumentBandAsync(PrintingSystemBase ps, Int32 rowIndex, PageBuildInfo pageBuildInfo, Boolean raiseEvent) at DevExpress.XtraReports.Native.Printing.DocumentBuilderBase.CreateDocumentBandAsync(BandKind bandKind, Int32 rowIndex, Boolean raiseEvent) at DevExpress.XtraReports.Native.Printing.DocumentBuilder.BuildAsync() at DevExpress.XtraReports.UI.XtraReportBase.BuildDocumentAsync(DocumentBuilderBase builder) at DevExpress.XtraReports.UI.XtraReportBase.WriteToDocumentAsync(DocumentBuilderBase docBuilder) at DevExpress.XtraReports.UI.XtraReport.WriteToDocumentAsync(DocumentBuilderBase docBuilder, PrintingSystemBase ps) at DevExpress.XtraReports.UI.SubreportBase.WriteContentToAsync(XRWriteInfo writeInfo, VisualBrick brick, Boolean useAsync) at DevExpress.XtraReports.UI.XRControl.WriteContentToAsync(XRWriteInfo writeInfo) at DevExpress.XtraReports.UI.Band.BandContentGenerator.GenerateAsync(DocumentBand docBand) at DevExpress.XtraReports.UI.Band.GenerateContentAsync(DocumentBand docBand, Int32 rowIndex, CancelEventArgs args, Boolean useAsync) at DevExpress.XtraReports.UI.Band.GenerateContentAndDecomposeAsync(DocumentBand docBand, Int32 rowIndex, CancelEventArgs args) at DevExpress.XtraReports.UI.Band.CreateDocumentBandAsync(PrintingSystemBase ps, Int32 rowIndex, PageBuildInfo pageBuildInfo, Boolean raiseEvent) at DevExpress.XtraReports.Native.Printing.DocumentBuilderBase.CreateDocumentBandAsync(BandKind bandKind, Int32 rowIndex, Boolean raiseEvent) at DevExpress.XtraReports.Native.Printing.DocumentBuilder.BuildAsync() at DevExpress.XtraReports.UI.XtraReportBase.BuildDocumentAsync(DocumentBuilderBase builder) at DevExpress.XtraReports.UI.XtraReport.BeginDocumentCreationAsync(Single progressRange, DocumentBuilderBase documentBuilder) at DevExpress.XtraReports.UI.XtraReport.DevExpress.XtraReports.IReport.CreateDocumentCoreAsync(Single progressRange, CancellationToken token) at DevExpress.XtraReports.Native.DocumentCreator.CreateAsync(Single progressRange, CancellationToken token) at DevExpress.XtraReports.UI.XtraReport.ReportAsyncTool.ExecAsync(Action export)

Answers approved by DevExpress Support

created 2 years ago

We have addressed the issue described in this ticket and will include a fix in our next maintenance update. Should you need to apply our fix prior to official release, you can request a hotfix here.

Important Notes:

  • Hotfixes may be unavailable for Early Access/Beta builds or updates set for release within a week.
  • .NET only: in the NuGet Package Manager, use your personal NuGet feed and check the "Include prerelease" option to view the hotfix package in the "Updates" tab.
    Show previous comments (2)
    DE DE
    Dmitry Evstratovski 2 years ago

      Hi Boris,

      We urgently needed hotfix because a more stable official release 23.1.3 stopped our grid events from firing.

      Let's hope that release 23.1.4 will be even more stable than 23.1.3.

      Thank you
      Dmitri.

      Boris (DevExpress Support) 2 years ago

        Hi Dmitri,

        I've just noticed that we published the hotfix today.

        Installers
        DevExpressNETComponentsSetup-23.1.exe includes all .NET Framework, .NET Core 3 and .NET 5, ASP.NET Core and HTML/JavaScript components and libraries (for web and desktop application development).

        NuGet
        In the NuGet Package Manager, use your personal NuGet feed and check the "Include prerelease" option to see the hotfix package in the "Updates" tab.

        Please try it and let me know your results.

        DE DE
        Dmitry Evstratovski 2 years ago

          Hi Boris,

          The recent hotfix solved the issues we discovered up to this point.

          Dmitri.

          Other Answers

          created 2 years ago

          The new hotfix works for me now with German localization.
          Many thanks!

          Best regards
          Bodo

            Comments (1)
            Boris (DevExpress Support) 2 years ago

              Hi Bodo,

              Thank you for the reply. I'm happy to hear that the issue has been successfully resolved.

              Best regards,
              Boris

              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.