Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Helios Unhandled event loop exception
Helios Unhandled event loop exception [message #635866] Thu, 28 October 2010 12:24 Go to next message
Chris Gage is currently offline Chris Gage
Messages: 73
Registered: July 2009
Member
I am using Helios which I downloaded under the Friends of Eclipse "early" availability. I work on fairly large HTML files, transcribing 19th century history to the web, see http://www.ibiblio.org/britishraj. I usually start my Eclipse phase with a large HTML file which has been saved as "Web page, filtered" from Microsoft Word.

This MS format has a bunch of debris which I edit out using global changes containing regular expressions in the find/replace function of the Eclipse editor. Sometimes these changes work correctly, although they take several minutes of UI lockup on my 2GB Core2 Quad 6600 machine.

Sometimes I see

Unhandled event loop exception
Java heap space

and then I get about eight consecutive dialog boxes of different sizes, saying something similar, and then the famous "do you want to exit the workspace" message, to which I always reply YES. Eclipse is still running at this point so I have to kill the process in the task manager. I have tried using "eclipse -vmargs -Xmx1024M" but it doesn't make any difference, I still get the same error.

An example of the kind of regular expression change that causes this problem:

Find: <p class="page">([\d]+)</p>

Replace with: <p class="page"><a name="page$1"<Page $1</a></p>

There are 619 occurrences of this string, in an HTML file that is 1043Kb, 17000 lines.

Since I got Helios in June (?) this has happened about 100 times, each time losing valuable work. I have been using Eclipse since 2001 (IBM WSAD 4), and am totally dependent on it, and anyway I can't find any other tool that gives me the function I need to do this without paying several hundred dollars, so I'd appreciate some advice.
Re: Helios Unhandled event loop exception [message #635962 is a reply to message #635866] Thu, 28 October 2010 18:34 Go to previous messageGo to next message
Nick Sandonato is currently offline Nick Sandonato
Messages: 126
Registered: July 2009
Senior Member
Hi Chris,

Do you only get the memory issues when doing Find/Replace or just normal editing as well? Also, have you had luck doing Find/Replace in just the plain text editor with these documents. It might help to pinpoint the issue if we can determine if this is a search/replace problem for all editors or just the HTML editor.
Re: Helios Unhandled event loop exception [message #636264 is a reply to message #635962] Sat, 30 October 2010 01:08 Go to previous messageGo to next message
Chris Gage is currently offline Chris Gage
Messages: 73
Registered: July 2009
Member
I have never had this crash except when doing these large global changes. I have never asked the Eclipse editor to do this kind of large-scale find-replace operation with Java code which is what I otherwise work with, but then Java classes are about one tenth of the size I am accustomed to.

It is also not just with regular expression changes that I have seen this problem, although it occurs more often with them.

I did try the plain-text editor one time because the idea occurred to me as well, but the crashes seemed to occur as often.

I wondered if the "reconciliation" which the HTML parser is trying to do on the fly might contribute to the fact that some of these changes take several minutes before completing successfully OR crashing. A similar global change with MS Word (but without regular expressions of course) takes about three seconds...

This work is extra-curricular, which is another way of saying I don't get paid for it... But the power of regular expressions makes it the only way to do this kind of editing without hundred of hours of manual editing in MS Word.

I could provide a file and a scenario that would cause it... (at least most of the time)

One other thing I have found, is that using the "Search->File" dialog with a regular expression instead is not an option. I have only one file with the search text in it, but in that one file it occurs over 9,000 times and when I use Search->File it hangs eclipse forever (like over two hours) with 25% CPU and the "replace text matched" dialog box and the progress indicator somewhere in the middle.

Re: Helios Unhandled event loop exception [message #639538 is a reply to message #636264] Tue, 16 November 2010 20:16 Go to previous messageGo to next message
Chris Gage is currently offline Chris Gage
Messages: 73
Registered: July 2009
Member
nudge on this one, I really would like at least some advice.
Re: Helios Unhandled event loop exception [message #640370 is a reply to message #639538] Sun, 21 November 2010 06:15 Go to previous message
David Williams is currently offline David Williams
Messages: 176
Registered: July 2009
Senior Member
On 11/16/2010 03:16 PM, Chris Gage wrote:
> nudge on this one, I really would like at least some advice.

I don't have much advice I'm confident that would help, but maybe some
hints and tips.

First, a Megabyte size file is fairly large for our HTML Editor ... and
it's not really size that counts, but number of elements. so if there's
any way to remove "junk elements" first, that might help with subsequent
editing.

Also, I have had experience in past with "importing" pages from the web,
and the End-of-Line often didn't work well, so I'd end up with huge
files, that consisted of only a few lines, each 10 of thousands of
characters long. Another fringe case that doesn't edit well in Eclipse
(though there's been improvements over the years). So, if that's
happening to you, in these cases, simply formatting the file first
(before it is in an editor) can help subsequent editing (so .. that's be
right click on the file in navigator, and select 'source,format' (I
think) ... again, without opening it in an editor until after formatted.

I was going to suggest using only the file-search option (with file
specifically not open in an editor) but sounds like you have already
tried that and didn't work. (In the off chance you tried it, and editor
was open at same time, try it without an editor open ... having the
editor open causes lots of extra work, as you can imagine, to keep thing
in sync, notified, updated, etc.

While not very direct, you might look for some way to break the file up,
temporarily, say into three files, and then do the operations on each of
them, and then put them back together. The problem might be that
something is operating exponentially, so "small" chunks" could be
handled, but the longer they get, the more exponential time/memory is
taken.

Probably the most productive course of action is to use a small script
to do some of the preliminary clean-up editing first. Java, Ant, even
bash scripts are pretty powerful in doing this type of "stream editing".
If you don't know the tools or languages, ask a friend to help get you
started ... or search the web for some "how to" instructions.

Oh, and once you see those type of errors like "heap problem" then
thinks are probably left in a bad state and you do have to exit the
workbench and start over (don't save anything) .. not sure if that was
clear.
Previous Topic:How to avoid multiplication of linked resources
Next Topic:quickasist/markerresolution triggered by clicking on the left side editor icon?
Goto Forum:
  


Current Time: Sat Oct 25 17:36:49 GMT 2014

Powered by FUDForum. Page generated in 0.02753 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software