Since there might always be a parser result producing Error instancies with some extensive objects map attached to the parameters field the error cannot be simply fixed at the JS side.
The only proper way how to fix this problem securely is not to pass the org.netbeans.modules.csl.api.Error instancies directly to the ErrorsCache.setErrors() but use an artificial object which holds the minimum information required by showing the error in the tasklist. This introduces a smaller memory overhead since some of the error's fields needs to be cloned, but it is much better than holding some errors with megabytes of object attached to them.
fixed in web-main#c9421f66dbba
Honzo, can you please review the change so I can put it to 7.0? Thanks
The patch seems fine to me, thanks. Note that the idea is that TLIndexer's errors map should contain errors only from one file.
(In reply to comment #2)
> The patch seems fine to me, thanks. Note that the idea is that TLIndexer's
> errors map should contain errors only from one file.
private static final Map<Indexable, Collection<SimpleError>> errors = new IdentityHashMap<Indexable, Collection<SimpleError>>();
Integrated into 'main-golden', will be available in build *201103110400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Marek Fukala <firstname.lastname@example.org>
fixed in 7.0 http://hg.netbeans.org/releases/rev/c9421f66dbba