Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Bug reports ➜ tmp triggers crash

tmp triggers crash

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Cloud   Czech Republic  (12 posts)  Bio
Date Sun 29 Dec 2002 05:19 PM (UTC)
Message
I am not sure if this bug is in MC or in microsoft javascript, but I'll give it a try.

When I use following script MC crashes almost instantly. I am using Win2000 Pro where it just says MC has caused errors. I have also tried it under 98 where it gives error message:
MUSHCLIENT caused an invalid page fault in
module MUSHCLIENT.EXE at 015f:0042bff5.
Registers:
EAX=00000400 CS=015f EIP=0042bff5 EFLGS=00010246
EBX=00000000 SS=0167 ESP=007ef638 EBP=01582bdc
ECX=01582bdb DS=0167 ESI=01582bdc FS=4fdf
EDX=01582bdc ES=0167 EDI=00000000 GS=0000
Bytes at CS:EIP:
8b 4f 0c 89 5c 24 18 8b f1 89 5c 24 20 0b f0 c1
Stack dump:
01582be7 01582bdc 016730f0 00000000 ffffffff ffffffff 00000000 ffffffff 00000000 01582bdb 00000001 01672dd4 ffffffff 007ef6f0 0000002d 0000001e

The simplified part of the script that causes the crashes is:

/*<alias name="test1" script="test1" match="test1" enabled="y"/> */
function test1(thename, theoutput, wildcard) {
world.DeleteTemporaryTriggers();
}

/*<trigger custom_colour="2" enabled="y" match="In your dreams, or what?" name="test2" script="test2" sequence="100"/>*/
function test2(thename, theoutput, wildcard) {
world.addTrigger("test_trg","asdf","",1+1024+16384,1,0,"",""); // 32,8 doesn't matter, crashes anyways
}

When I enter "look;test1;look" (while sleeping to match the trigger) few times, it crashes. I tried in clean .mcl file on two different muds (circle and rom types), always the same. When in more complex situation the crash is not always immediate, but any line of input from mud causes number of error dialogues "Error executing regular expression". I suppose that it's one error for each regexp trigger. I hope it is connected with the above error, but I can't duplicate it without posting the entire script which wouldn't work on other computers or muds because it contains interfacing with my sql database and other non-portable parts.

I am using version 3.32.

Cloud
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Mon 30 Dec 2002 03:51 AM (UTC)
Message
I can't see offhand why it would crash, but in your full script you are not deleting temporary triggers from inside a temporary trigger are you? That would probably crash.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Cloud   Czech Republic  (12 posts)  Bio
Date Reply #2 on Mon 30 Dec 2002 08:39 PM (UTC)
Message
ad full script: I haven't thought of that, but anyways I am not doint that. I just need to cleanup old spam of triggers at certain point and the cleanup itself is triggered by prompt, which is permanent.

The script I posted here crashes as is without any modifications (after you put the now-commented alias and trigger in their proper place in .mcl file). It took me several hours of commenting various lines and blocks of original code to find the cause and reduce it to this size, I just hope the errors have same cause.

Cloud
Top

Posted by Dave   Australia  (93 posts)  Bio
Date Reply #3 on Wed 01 Jan 2003 03:37 AM (UTC)

Amended on Wed 01 Jan 2003 03:46 AM (UTC) by Dave

Message
I've set up the triggers/aliases/functions listed here and I can confirm this behaviour. It happens when you repeatedly type test1;look in quick succession. If you do it slowly, say, once a second, everything works fine.

The first time it happened it crashed, the second time it came up with the 'Error executing regular expression' msgbox, then the third it crashed again.

If I spam in just look on its own very quickly nothing happens, so it is obviously an issue with the temporary trigger deletion.. it doesn't seem likely, but could it have something to do with deleting the temporary triggers extremely soon before or after the trigger/script fires?

Dave

-- Followup:

I just tested doing a world.AddTrigger() followed by a world.DeleteTemporaryTriggers() in the same function and I can cause this crash without the alias itself by causing the trigger to fire in quick succession.

Also, each AddTrigger is returning eOK, incase you were wondering.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #4 on Wed 01 Jan 2003 07:53 AM (UTC)
Message
In AddTrigger are you adding temporary or normal triggers?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Dave   Australia  (93 posts)  Bio
Date Reply #5 on Wed 01 Jan 2003 08:21 AM (UTC)
Message
1 (eEnabled) + 1024 (eReplace) + 16384 (eTemporary)
Top

Posted by Ovvi   Poland  (13 posts)  Bio
Date Reply #6 on Wed 01 Jan 2003 12:36 PM (UTC)
Message

I have similiar problem with crash Mushclient.

Ovvi
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #7 on Thu 02 Jan 2003 07:47 AM (UTC)
Message
If you delete temporary triggers from inside a temporary trigger I am not surprised it crashes. Deleting the trigger frees up the memory used by the script, and the script is currently executing. I would go about it a different way.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Dave   Australia  (93 posts)  Bio
Date Reply #8 on Thu 02 Jan 2003 07:54 AM (UTC)
Message
It's not being deleted in a temporary trigger. A temporary trigger is being created/deleted in a script executed by a permanent trigger.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #9 on Thu 02 Jan 2003 08:06 AM (UTC)
Message
Hmm, I see. I don't have my development environment with me right now so I can't reproduce it, or if I could I can't see why it is happening. Could be a bug in temporary trigger deletion. :)

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Cloud   Czech Republic  (12 posts)  Bio
Date Reply #10 on Tue 22 Apr 2003 12:12 AM (UTC)
Message
It seems that you have your development environment with you as you released few new versions :) Still there is no information about this error.

In later versions (3.38) the error has changed a bit:
(using the same script as in my first note) now spamming few look;test1;look will just occasionaly show message box about error matching regular expression. The crash can be caused by 'look', then sometimes later /world.DeleteTemporaryTriggers() and then entering triggers configuration dialog - and this time it doesn't depend on time difference of the two actions (tried waiting about 10 seconds before deleting).

The reason I am reviving again this old thread is that in current version the same error message box about regular expressions, followed by a crash, started poping in script that worked fine in 3.32. I suspect that DeleteTemporaryAliases() is causing it this time, but I can't be sure because the error doesn't appear every time I run the function - most of the time it works fine.

Since the original error has not been fixed yet, it is probable that it has similar cause.

I hope that my description will help in finding and killing that damned bug - at least it includes a way how to reproduce the error.

Cloud
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #11 on Tue 22 Apr 2003 04:43 AM (UTC)
Message
I have found and fixed a bug in DeleteTemporaryTriggers and DeleteTemporaryAliases. Fixed in 3.39.

The problem was that MUSHclient internally maintains two lists for triggers and aliases - by name, and by sequence number.

When you did DeleteTemporaryTriggers in earlier versions it only deleted them from one list - accessing them from the other would very likely cause a crash or a message about bad regular expression.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Ian   (1 post)  Bio
Date Reply #12 on Sun 25 Apr 2004 04:54 AM (UTC)
Message
I had the same error problem, but under circumstances that I don't see the connection with. I had a trigger that was

'*** <charname> joins in, looking for some adventure.'

which played a sound.

Upon reading a note on that MUD's note system, I got the "Error executing regular expression message" and a section of the note was basically chopped out, and than after the output was done, the section was placed afterwards and I got the message again.

I'm just posting more because I figured I did something that I wasn't really supposed to, but I don't know for sure what. I've disabled the trigger and I am no longer having problems.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #13 on Sun 25 Apr 2004 05:12 AM (UTC)
Message
One potential problem here is that the asterisk is a wildcard, and you have three in a row, which doesn't make a huge amount of sense.

You probably should have it as a regular expression, and escape out the wildcard, eg.

^\*\*\* <charname> joins in, looking for some adventure\.$

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


33,650 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.