Closed Bug 300656 Opened 19 years ago Closed 18 years ago

pasting (or probably typing) loads of text in html page with designmode enabled causes extreme memory usage

Categories

(Firefox :: General, defect)

1.0 Branch
x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: webmaster, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.9) Gecko/20050711 Firefox/1.0.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.9) Gecko/20050711 Firefox/1.0.5

Putting loads of text in an iframe with designmode enabled causes Firefox to use
extreme amounts of memory (hundreds of megabytes).

Reproducible: Always

Steps to Reproduce:
1. Go to http://www.mozilla.org/editor/midasdemo/
2. Put a shitload of text in de editor


Actual Results:  
Browser uses lots of memory (over 500MB)

Expected Results:  
n.a.

Coded a text editor myself, based on completely diffrent code. Crashes in same way.
if it crashes, do you get talkback to appear? if talkback does not appear, does
windows report that an error has occured in firefox? if not, please remove the
word 'crash' from your summary.
Summary: crash when pasting (or probably typing) loads of text in html page with designmode enabled → pasting (or probably typing) loads of text in html page with designmode enabled causes extreme memory usage
(In reply to comment #1)
Sorry, FF does not crash, just the used amount of memory is huge and makes the
system respond very slowly.

Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6
Windows Vista Beta 2 Build 5384

I cannot reproduce this exact error, however after entering a 835,584 capital W's the entire screen starts blinking.   However the memory usage stays almost the same throughout the tes, sometimes even decreasing.  During this test I exposed another error.

The new error was that after inserting 2185 consecutive capital W's on one line. The entire line goes invisible.  You now longer see any of the W's.  If you enter 2184 W's you can see all of them when you add the next W the line disappears, however the characters are still there.  Because you can select a chunk of them and copy and paste them into notepad.

It does not appear that it is a character limit error because i did the same test with lowercase a's and the problem did not occur until I entered 4681 a's.  After doing some further study i noticed that the pixel widths of those characters are as follows:

W = 15p x 11p      2184  x 15p = 32775p
a = 7p x 7p        4681  x 7p  = 32767p
i = 3p x 11p       10931 x 3p  = 32793p

It appears that once the pixel width of a single line is around 2^15 pixels the line becomes invisible.

JJ Miller
I'm not sure what "loads of text" is, but pasting 10,0000 "d" cost me 7mb
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a5pre) Gecko/20070530 
Minefield/3.0a5pre

closing WFM. Lex, please reopen if you can recreate the problem.

jj, I was not able to recreate your invisible line, but if you still see the problem please file a new bug.
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → WORKSFORME
Version: unspecified → 1.0 Branch
You need to log in before you can comment on or make changes to this bug.