Specified resource is not found when run multi thread

Posted by: baonc on 6 November 2019, 8:23 pm EST

  • Posted 6 November 2019, 8:23 pm EST

    Hi every one
    I must export 1.000.000 records for the PDF with image QR
    But some thread it have error
    ??????????
    Specified resource is not found
    Parameter name: key
    ?????????
    at GrapeCity.ActiveReports.Document.Section.ResourceStorage.ResourceManager.#zg(ResourceKey resource)
    at GrapeCity.ActiveReports.Document.Section.ResourceStorage.ResourceManager.#GHi(ResourceKey resourceKey)
    at GrapeCity.ActiveReports.Document.Section.ResourcedCanvasItem.GetBinaryData(RawImageResourceData& data, Int32& innerKey)
    at GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport.#Isd(#jqc canvasItems, #orc pdfPage, PointF offset, Graphics graphics, #aqc outputContext, IEnumerable`1 bookmarks, Hashtable pagesMap)
    at GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport.#Gsd(IFilteredPage page, Graphics graphics, #aqc outputContext, IEnumerable`1 bookmarks, Hashtable pagesMap)
    at GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport.#7pk(SectionDocument document, Stream stream, String pageRange, Byte[]& xmpMetadata)
    at GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport.Export(SectionDocument document, Stream stream, String pageRange)
    at GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport.Export(SectionDocument document, String filePath, String pageRange)
    at WcfServiceAP.Dummy.Process() in C:\xampp\htdocs\qr\services\WcfServiceAP\WcfServiceAP\Dummy.vb:line 242
    ?????????
    2019/11/07 15:50:21


    I don't undertand and can't fix it
    Some time it have error "
    ??????????
    Out of memory.
    ?????????
    at System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData)
    at System.Drawing.ImageConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
    at GrapeCity.ActiveReports.Document.Section.RawImageResourceData.CreateImage()
    at GrapeCity.ActiveReports.Document.Section.ResourceStorage.ResourceManager.#U.#sKg.#D6k(Image image)
    at GrapeCity.ActiveReports.Document.Section.ResourceStorage.ResourceManager.#Fg(ResourceKey key, ResourceManager targetStorage)
    at GrapeCity.ActiveReports.Document.Section.PngImage.Clone(ResourceManager resourceMgr)
    at GrapeCity.ActiveReports.Document.Section.Page.#Zok(ResourceManager pagesResources)
    at GrapeCity.ActiveReports.Document.Section.Page.#Yok(PagesCollection pages)
    at GrapeCity.ActiveReports.Document.Section.PagesCollection.Add(Page value)
    at GrapeCity.ActiveReports.Document.Section.PagesCollection.AddRange(PagesCollection pages)
    at WcfServiceAP.Dummy.SUB_ADD_RPT(SectionReport P1, DataTable P2, SectionDocument& P3, String post_at, String post_at_index) in C:\xampp\htdocs\qr\services\WcfServiceAP\WcfServiceAP\Dummy.vb:line 445
    ?????????
    2019/11/07 16:21:08


    My server : 2 processor ( 2X12) core
    Ram 8G ram

    This is my code


    Parallel.For(0, list.Count, (New ParallelOptions() With {.MaxDegreeOfParallelism = numberParaller}),
    Sub(iStt As Integer)
    ' do job
    'Console.WriteLine(iStt)
    'Console.WriteLine(iStt)
    'Utl_ERR.WriteLogFile(iStt & "___" & list(iStt))
    Dim temp As New Dummy(list(iStt), iStt, screen, P6, P4, tempFolder, pagesize, P7, P8, list.Count) '-- Create an instance of our dummy class with a string name.
    temp.Process() '-- start the processing.
    End Sub)

  • Replied 6 November 2019, 8:24 pm EST

    numberParaller = 12
  • Replied 7 November 2019, 4:45 pm EST

    Hello,

    Could you please try your application at 64 bit. Also, please share the exact version of AR that you are using.

    Thanks,
    Mohit
  • Replied 7 November 2019, 7:10 pm EST

    I using GrapeCity.ActiveReports.v7 sp3
    I my project build any_cpu



    Thanks
  • Marked as Answer

    Replied 12 November 2019, 4:27 pm EST

    Hello,

    Sorry to mention that AR7 was declared a legacy product now. It is out of maintenance mode now. Hence, we do not provide support for the same or no bug fixing will be done in the same. I would recommend you use the latest version of ActiveReports i.e ActiveReports 13. Please refer to the following link for more information:
    https://www.grapecity.com/activereports.

    It is very helpful for us if you provide a stripped-down sample so that I can look into this.

    Thanks,
    Mohit
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels