| Summary: | Moving a line using keyboard in css results in OutOfMemoryError. | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | Iwao AVE! <harawata> | ||||||||||
| Component: | wst.css | Assignee: | Rakesh <rakes123> | ||||||||||
| Status: | RESOLVED FIXED | QA Contact: | Nick Sandonato <nsand.dev> | ||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P3 | CC: | rakes123 | ||||||||||
| Version: | unspecified | Keywords: | performance | ||||||||||
| Target Milestone: | 3.3 M5 | Flags: | nsand.dev:
review+
|
||||||||||
| Hardware: | Macintosh | ||||||||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||||||||
| Whiteboard: | |||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Iwao AVE!
Created attachment 179738 [details]
CSS file to reproduce the problem
Created attachment 179739 [details]
Stack trace copied from the error log.
Created attachment 179765 [details]
Simpler example file to reproduce the problem.
Attached a smaller css file which causes the same OutOfMemoryError.
So, it seems that the size of the file does not matter.
Forgot to mention how to reproduce the problem with the simpler css. Move the second line (color:#F35B00;) down to line 5 using the keyboard shortcut (option + down). I also found that if I insert a tab character at the top of the second line, the OufOfMemoryError does not occur. Created attachment 179920 [details]
patch
Rakesh, I'm not sure if this patch will correct the reported issue. When holding down the Alt+Arrow Key, I never saw that ArrayList get larger than 4 elements, and all were unique. So I don't think using a HashSet is the solution. I'm running at -Xmx512m, and even using the large css example, I cannot get the OutOfMemoryError by moving the line clear down to the bottom of the file. Are there any other details you can share with us? Maybe the heap dump file that was generated? Thanks for your help. (In reply to comment #6) > Rakesh, I'm not sure if this patch will correct the reported issue. When > holding down the Alt+Arrow Key, I never saw that ArrayList get larger than 4 > elements, and all were unique. So I don't think using a HashSet is the > solution. > > I'm running at -Xmx512m, and even using the large css example, I cannot get the > OutOfMemoryError by moving the line clear down to the bottom of the file. Are > there any other details you can share with us? Maybe the heap dump file that > was generated? > > Thanks for your help. Hi Nick, I was able to reproduce it again. Try to move second line(color:#F35B00) in this simpler css: Make sure that there is no tab or whitespace at that start of text. .newmassage a:visited { color:#F35B00; } .key { float:left; width:12px; height:15px; } As soon as it reaches 5-th line, while loop in code just after the declaration 'List structures ' will become infinite , so amount of memory allocated doesn't make any difference. ping! Code released to HEAD. |