Community
Participate
Working Groups
Build Identifier: 20100917-0705 In a relatively large css file, OufOfMemoryError occurs when moving a line using keyboard shortcut (option + arrow key). Increasing the max heap size (-Xmx1024m) seems not to help. I will attach an example css and the stack trace. Reproducible: Always Steps to Reproduce: 1. Create a Static Web Project. 2. Copy the attached test.css in the WebContent folder. 3. Put the cursor at a line 5 (font-size:12px;) and hold down 'option key + down arrow key' to move the line continuously. Before the line is moved to the bottom of the file (usually at line 117 on my environment), an 'Unhandled event loop exception' occurs.
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.