Pob Tray 3.1 (Beta 5 & 4) Stops responding with reg exs

Found a serious/minor bug in PopTray? Tell me about it.

Moderators: KY Dave, jojobear99, Rdsok

Locked
henchard
Still here
Posts: 19
Joined: Fri Apr 16, 2004 9:54 am
Location: Dorset UK

Pob Tray 3.1 (Beta 5 & 4) Stops responding with reg exs

Post by henchard » Mon May 17, 2004 4:58 pm

Hi,

Its taken me a while to try to track down what appears to be a bug. I've started using regular expressions with a vengence and have quite a lot I use; some very long.

Recently pop tray has started 'locking up' i.e. not responding when checking emails. I have two PC's one with win98 one with xp. The problem occurs on both when the conditions are right.

By going through my regular expression rules with an enabling/disabling process of elimination one group of rules is causing this to happen when there is an email on the account that is presumably recognised as spam.

The syntax of each row checks out as correct but there is definitely some conflict causing it to hang.

if I just disable this rule it works fine. I shall try to find which row (i.e exactly which regular expression) is causing the problem and post it here.

In the meantime anyone else getting this to happen?

BTW I was running beta 4 but upgraded to see if this solved it; but it doesn't. It happens with both betas.

Borgtex
Groupie
Posts: 52
Joined: Mon Mar 08, 2004 1:32 pm

Post by Borgtex » Mon May 17, 2004 5:57 pm

"regular expressions with a vengeance" lol

I use a lot of regular expressions, and poptray never locked up so far. Try to post the rule, maybe has some kind of paradox that Poptray can't solve

Borgtex
Groupie
Posts: 52
Joined: Mon Mar 08, 2004 1:32 pm

Post by Borgtex » Wed May 19, 2004 8:41 pm

"Never say never again"

Poptray locked today while testing an account with 250 mails (most of them spam). The rotating star just freezed, use of cpu increased to 60%, and I had to terminate it. Then, I just disabled some RegExp rules, checked the mail, the active rules deleted about 120 messages, I reactivated the other rules, checked again and all worked fine.

henchard
Still here
Posts: 19
Joined: Fri Apr 16, 2004 9:54 am
Location: Dorset UK

The problem?

Post by henchard » Thu May 20, 2004 9:41 am

After a bit more detective work I discovered this if you create a rule like this (below) which checks out as having a valid syntax in PT

([a-z]+\w+){40}

use it in the Body area and just enable this rule (i.e. for test purposes disable your other rules).

Then send yourself an email with a long string of characters in the message such as xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

it causes PT to lock up on both my PC's.

However, when I checked the rule with an online regular expression checker and with Expresso it seems to cause them problems as well (locking up in the first case) so it would seem that it is not PT but the problem is with the regular expression or the way it is parsed (is that the correct geek speak?- anyway you know what I mean).

User avatar
Rdsok
PopTray Family
Posts: 1416
Joined: Fri Mar 19, 2004 11:36 pm
Location: Norman, Oklahoma USA
Contact:

Post by Rdsok » Thu May 20, 2004 6:45 pm

I'm able to create the problem on my system also. I'm using PopTray 3.1 beta 5, Expresso, Regex Workbench and TestRExp. I going to take a shot in the dark, I think it is caused by bad logic in the expression itself. Let me explain by breaking the expression down into components.

'[a-z]+' means any character in "a-z" (one or more times)
'\w+' means any word character (one or more times)
'{40}' means the previous character(s) exactly 40 times

I know you just meant this as an example but here are the problems that the example bring with it. The first illogical item to point out, the [a-z] is already included in the variable statement '\w', that won't lock you up or loop the expression, its just a bad example I think. The next problem, and the one that causes the lockups or loops, you're saying for both 'one or more times' followed by an 'exactly 40 times'. I don't think you can say 'one or more' with 'exactly 40' also. Using the example as the basis for writing the rule if you are trying to capture 40 or more characters or numbers including '_', simply say '\w{40,}'. that is not only shorter, but doesn't contain the logic error of saying in two places 'one or more' and in another place 'exactly 40 times'.

Using this to judge the rules you may actually have in place, just remember, for any one area where you use an iterator (defining a number of times) use just one iterator for that area or the expression won't know if it needs to use the first iterator or the second.

Locked

Who is online

Users browsing this forum: No registered users and 3 guests