Loading large RTF-stream into RichTextBox gives OutOfMemoryException

  • Norseman 3 years ago

    Hi

    I get an Out of Memory Exception when I load an large (75mb) RTF-stream. The RTF is big because users may paste images into the document. The image does not need to be very big, 3mb is enough to make the RTF get very big.

    Is there an limit for the size of a RTF-documents? Is there a work-around?

    PS! I’m using version 7 of ActiveReports.

    Thanks in advance!

  • Norseman 3 years ago

    Hi again

    I have now got a new Exception, GDI+. The exception occurs when loading the attached document into the RichTextBox. The document is not that big (4mb) but has some formatting and a table.

    at System.Drawing.Graphics.MeasureString(String text, Font font, SizeF layoutArea, StringFormat stringFormat, Int32& charactersFitted, Int32& linesFilled)
    at #psb.#Ysb.#b2b(PointF origin, Single docWidth, Int32 startFormatPos, Int32 endFormatPos, Boolean bGenStripes, Boolean bMultiline)
    at #psb.#Ysb.Format(Single docWidth, Boolean bMultiline)
    at #psb.#osb.#cZb(Single width)
    at #psb.#osb.#dZb(Single docWidth)
    at GrapeCity.ActiveReports.SectionReportModel.RichTextBox.#HYA(GraphicsCache cache, SizeF& size)
    at #sxA.#vqb.#pEb(GraphicsCache cache, Int32 sectionIndex)
    at #sxA.#vqb.#dzb(Section section)
    at #sxA.#vqb.#vEb()
    at #sxA.#vqb.#bZA(Page newPage, Single left, Single top, Single right, Single bottom, UInt32 flags, UInt32& status)
    at GrapeCity.ActiveReports.SectionReport.#4yb()
    at GrapeCity.ActiveReports.SectionReport.Run(Boolean syncDocument)
    at GrapeCity.ActiveReports.SectionReport.Run()

    Attachments:
    1. TestRTFdocument

      TestRTFdocument.png

  • 130p
    Mohita130p 3 years ago

    Hello Norseman,

    The rtf you mentioned about did not get through, hence request you to zip the file and send it again.

    We will then look into the issue and provide you with the appropriate assistance.

    Also, since you are working with AR&, you are requested to test with the latest build of AR7 and see if you still face the same issue :

    http://publicfiles.componentone.com/ActiveReports/ActiveReports%207/ActiveReports%20Developer%20v7.3.7973.0.msi

    Regards,
    Mohita

  • Norseman 2 years, 11 months ago

    The RTF is pretty large (73 mb). I’ll try to zip it (11 mb).
    Do you have any FTP-server the file can be uploaded to? Or you can create your own file. Just paste in a big/large image into WordPad and save as RTF.

    The problem happens when the RTF contains a image larger than about 2.5 mb/3 mb….

  • 130p
    Mohita130p 2 years, 11 months ago

    Hello,

    I could replicate the issue wherein on loading an rtf with multiple heavy images (size ~ 4MB) an ‘Out of Memory Exception’was thrown.

    I am forwarding this issue to the concerned team (175049) and would get back to you as soon I hear anything from them.

    Regards,
    Mohita

  • Norseman 2 years, 11 months ago

    Hi

    Is there something new on this case/issue? Should I expect something the next days or is this going to take some time?

    Anyway, I’m going on summer holiday very soon so happy holidays!

  • 130p
    Mohita130p 2 years, 11 months ago

    Hello,

    As of now we do not have any update on this.
    I will inform you as soon I hear anything from them.

    Regards,
    Mohita

  • Norseman 2 years, 8 months ago

    Hi again!

    Something new on this issue?

    Thanks.

  • 130p
    Mohita130p 2 years, 8 months ago

    Hello,

    We have recieved an update from the concerned team and as per them the issues seems to be related to the large rtf and hence the limitation when the rtfis too big.

    They tested the behavior with longtext.rtf and it also caused out of memory exception on switching between the designer and preview more than once.

    We are sorry for the inconvenience caused.

    Regards,
    Mohita

  • Norseman 2 years, 8 months ago

    Thats fair enough. What you are saying then is that this is something that will not be or cannot be fixed?

    If so we need to handle it in some way on our side.

    Thanks anyway for trying.

  • 130p
    Mohita130p 2 years, 8 months ago

    Hello,

    The issue might get fixed in one of the future builds, however, as of it is a limitation and we do not have any workaround/solution for it.

    We are sorry for the inconvenience caused.

    Regards,
    Mohita

  • themanishdubey 1 month, 3 weeks ago

    Hi guys,

    Any update on this for AR 10.

    Thanks,
    Manish

  • 189p
    AbdiasM189p 1 month, 3 weeks ago

    Hi Manish,

    It is still a limitation in AR10 as well. There won’t be any changes in the RichTextBox control unless it is re-written which is highly unlikely in the near future.

    Sorry for the inconvenience.

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.