[Therion] Bug#751471: Bug#751471: Therion hanging after compile

Olly Betts olly at survex.com
Tue Jan 13 01:01:51 CET 2015


On Mon, Jan 12, 2015 at 04:29:09PM +0100, Stacho Mudrak wrote:
> I am sorry, I was never able replicate this bug.

You need a large log file for it to be noticeable, as the problem seems
to be that trying to match this pattern causes Tcl's regexp engine to do
a lot of backtracking:

  set rx {\S*[^\]\s]\s+\[\d+\]}

I don't really follow the Tcl code around this, but if this is trying to
match on lines such as:

2253> input:42871 -- gemse.th [4]

Then adding "-- " to the start of the pattern and then adjusting the
offsets when highlighting in the text widget should address the problem.
The fixed substring "-- " serves as a way to efficiently limit where the
regexp engine tries to match the pattern.

> If it is this regex that causes problems, it can be removed completely. It
> is used to enable clicking on error source and opening in in appropriate
> editor. Feature almost never used.

If you think it's best just to kill it, that's fine, but I can probably
package up the example that we hit this on if you want to take a look,
and I can certainly test a patch.

Cheers,
    Olly



More information about the Therion mailing list