Opened 18 years ago

Closed 17 years ago

Last modified 17 years ago

#789 closed Bug (worksforme)

OutOfMemoryError in FCKEditorTag.java StringBuffer object

Reported by: mehmood_z@… Owned by: Michael Osipov
Priority: Normal Milestone:
Component: Server : Java Version:
Keywords: WorksForMe Cc: mehmood_z@…

Description (last modified by Michael Osipov)

I have an application which uploads the document and gives a preview in the FCKeditor where the user can customize the document and re submit to the server.I am using FCKEditor tag in the JSP page to set the content that is to be displayed in the FCKeditor. But when I upload a large document of Size apprx. 3MB ,I get OutOfMemoryError in the FCKEditorTag.java which holds the content in the StringBuffer object and this gives an error.

I am working in TOMCAT 4.1,JAVA1.5,REDHAT Linux 9.1,1 GB RAM and 80 GB HardDisk.

I have attached the document which gave this error.

regards, Mehmood


Moved from SF:
http://sourceforge.net/tracker/index.php?func=detail&aid=1593118&group_id=75348&atid=543653

Change History (14)

comment:1 Changed 18 years ago by Martin Kou

Reporter: changed from Martin Kou to mehmood_z@…

comment:2 Changed 17 years ago by Alfonso Martínez de Lizarrondo

Component: GeneralServer : Java

comment:3 Changed 17 years ago by Michael Osipov

Owner: set to Michael Osipov

I will investigate that!

comment:4 Changed 17 years ago by Michael Osipov

Cc: mehmood_z@… added

I don't exactly understand what you mean by "upload"

is your document put within <FCK:editor>document content</FCK:editor> like that?

If you suffer from OutOfMemoryError, it might help to increase the max heap size for the JVM running your tomcat instance.

Btw, 3 MB for a HTML doc is extremely big

comment:5 Changed 17 years ago by Michael Osipov

Keywords: Pending added

comment:6 Changed 17 years ago by Michael Osipov

Description: modified (diff)
Status: newassigned

comment:7 Changed 17 years ago by Michael Osipov

Keywords: WorksForMe added; SF Pending removed
Resolution: worksforme
Status: assignedclosed

Here's the deal:

WinXP, JRE 1.6.0.4, Jetty 6.1.7, 1 GiB RAM
I have created a 3 MiB document and inserted a sa FCKeditor value. What happends first is an OutOfMemoryError => not enough heap space. I have increased heap space to -Xmx256m. (This is java-specific and not fckeditor-java)
It took a few seconds to create the doc and the editor instance. So far so good. The browser takes now forever to load the document. It consumes upto 140 MiB of RAM, 90 % CPU time either FF2 or IE6, I killed the process after 5 min.

So this is a browser memory/JS issue.

Closing as WFM

comment:8 Changed 17 years ago by Michael Osipov

Description: modified (diff)

Additionally, I have profiled the request and the produced page has 5 MiB and the browser loads perfectly but the js takes forever.

comment:9 Changed 17 years ago by Mehmood

Hi devs,

If the jsp tag for generating the fckeditor doesn't contain the in-memory objects to handle the content of the editor, then its fine.

comment:10 Changed 17 years ago by Michael Osipov

You may specify the content (value) with

<FCK:editor value="..." /> or <FCK:editor><jsp:attribute name="value">some huge text</jsp:attribute></FCK:editor>

The JSP tag is perfectly capable handling several megabytes of HTML data, the editor isn't

comment:11 in reply to:  10 Changed 17 years ago by Michael Osipov

Replying to mosipov:

You may specify the content (value) with

<FCK:editor value="..." /> or <FCK:editor><jsp:attribute name="value">some huge text</jsp:attribute></FCK:editor>

The JSP tag is perfectly capable handling several megabytes of HTML data, the editor isn't

this applies for the upcoming version 2.4

comment:12 Changed 17 years ago by Mehmood

Thanks for the reply and I know that JSP tag is perfectly capable of handling huge HTML , just now I got reminded that I posted this bug long before where the content in the FCKeditorTag was handled by StringBuffer and that has also been fixed by writing directly to the out stream.I dont know why this got re-opened!!

comment:13 Changed 17 years ago by Michael Osipov

Great I could help, stay tuned for 2.4

comment:14 Changed 17 years ago by Mehmood

cool thanks

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy