Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
chris-74269
Magician


Joined: 23 Nov 2004
Posts: 364

PostPosted: Wed Jun 03, 2009 3:02 am   

Trigger crashing cmud
 
There is a trigger that is crashing cmud versions 2.37, and 3.08. However, I cannot reproduce this on my cpu (latest version of windows xp). All people using vista however, have been saying my package is freezing their computer when this trigger is executed.

Code:

<trigger name="mipwarders" priority="4" ansi="true" regex="true" prompt="true" id="337">
  <pattern>(?:^)?\#K\%(?:@mipcode)(?miplen:\d{3})(?miptag:\a{3})(?mipstringa:.*)</pattern>
  <value><![CDATA[#print ok
//GUILD VARIABLES:
//dhp,dsp,method,form,cs,sts,skillgxp,gtnl,lgxp,hits
//%1=miptag, %2=mipstring, %3=leftover
//FFF tag is missing some letters
//BAB is ignored
//CAA is the chatmonitor, it is done but needs to be ansified
//missing tags: AAF, more, check the MIP window, if a tag isn't registerred itll go there with the mipstring
#if (%len( %stripansi( @mipstringa)) < (%int( @miplen)-3)) {#abort all}
#call %vartype( @mipstring, 3)
#call %vartype( @nonmipstring, 3)
#call %vartype(@mipstringa,3)
mipstring=%left( %stripansi( @mipstringa), (@miplen-3))
nonmipstring=%right( @mipstringa, (@miplen-3))
#gag
#switch (@miptag = FFF) {
  hpstring=%subregex( %replace(@mipstring,|,Ñ), "~", |)
  #delitem hpstring {}
  #if (%ismember( A, @hpstring)) {
    $inum=%ismember( A, @hpstring)
    hpcur=%item( @hpstring, ($inum+1))
    #delnitem hpstring $inum
    #delnitem hpstring $inum
    }
  #if (%ismember( B, @hpstring)) {
    $inum=%ismember( B, @hpstring)
    hpmax=%item( @hpstring, ($inum+1))
    #delnitem hpstring $inum
    #delnitem hpstring $inum
    }
  #if (%ismember( C, @hpstring)) {
    $inum=%ismember( C, @hpstring)
    spcur=%item( @hpstring, ($inum+1))
    #delnitem hpstring $inum
    #delnitem hpstring $inum
    }
  #if (%ismember( D, @hpstring)) {
    $inum=%ismember( D, @hpstring)
    spmax=%item( @hpstring, ($inum+1))
    #delnitem hpstring $inum
    #delnitem hpstring $inum
    }
  #if (%ismember( I, @hpstring)) {
    $inum=%ismember( I, @hpstring)
    $istring=%subregex(%item(@hpstring,($inum+1)),"\:\[\<|\>\]\s+",|)
    #delitem $istring {}
    dhp=%right(%subregex(%item($istring,1),">.*"),3)
    dsp=%subregex(%item($istring,1),".*\s<c")
    method=%right(%item($istring,3),1)
    form=%right(%item($istring,5),1)
    cs=%right(%item($istring,7),1)
    sts=%subregex(%item($istring,8),"[^0-9\s+\%]+")
    #delnitem hpstring $inum
    #delnitem hpstring $inum
    }
  #if (%ismember( J, @hpstring)) {
    $inum=%ismember( J, @hpstring)
    $glinea=%subregex(%item( @hpstring, ($inum+1)),">\]|:|\s+\[",|)
    skillgxp=%trim(%item($glinea,(%ismember("[<cSk",$glinea)+1)))
    gtnl=%right(%item($glinea,(%ismember("GTNL",$glinea)+1)),3)
    lgxp=%trim(%item($glinea,(%ismember("<yLGxp",$glinea)+1)))
    hits=%right(%item($glinea,(%ismember("  Hits",$glinea)+1)),3)
    #delnitem hpstring $inum
    #delnitem hpstring $inum
    }
  #if (%ismember( K, @hpstring)) {
    $inum=%ismember( K, @hpstring)
    mobname=%item( @hpstring, ($inum+1))
    #delnitem hpstring $inum
    #delnitem hpstring $inum
    }
  #if (%ismember( L, @hpstring)) {
    $inum=%ismember( L, @hpstring)
    ehealth=%item( @hpstring, ($inum+1))
    #delnitem hpstring $inum
    #delnitem hpstring $inum
    }
  } (@miptag = BAD) {currentroom=@mipstring} (@miptag = DDD) {croomexits=@mipstring} (@miptag = AAC) {reboottime=@mipstring} (@miptag = BAE) {mudlag=@mipstring} (@miptag = AAF) {uptime=@mipstring} (@miptag = AAB) {
  mipstring=%replace( @mipstring, "~")
  mobexamine=@mipstring
  } (@miptag = BAB) {
    //#if (%regex( @nonmipstring, "\e.*you")) {} {
    //mipstring=%replace( @mipstring, "~", |)
    //#delitem mipstring {}
    //#if (%ismember( x, @mipstring)) {
    //  #delnitem mipstring 1
    //  #window tell {%ansi( white)To %pop( mipstring): %pop( mipstring)}
    //  } {#window tell {%ansi( white)From %pop( mipstring): %pop( mipstring)}}}
    } (@miptag = CAA) {
  mipstring=%replace( @mipstring, "~", |)
  #window chat %item( @mipstring, %numitems( @mipstring))
  } (@miptag = CDF) {
  mipstring=%replace( @mipstring, "~", "|")
  #file 1 %item( @mipstring, 2).txt
  } (@miptag = CCF) {#write 1 {@mipstring}} (@miptag = CEF) {#close 1} {#window MIP @miptag :@mipstring}
//#if (%regex(@nonmipstring,"\e\[0m$")) {#print bad msg - @nonmipstring}
#if (%regex(@nonmipstring,"^\e")) {#say @nonmipstring} {#say %ansi(reset)@nonmipstring}]]></value>
</trigger>


The code within it is probably useless, as the pattern is what I believe is causing the freezing. After turning this trigger on, type:

#var mipcode 28001
then
#show #K~%@{mipcode}009FFFA~~~123

For 3 people I have had do these steps cmud has immediate frozen up and needed to be ended w/ control + alt + delete.


Last edited by chris-74269 on Fri Jun 05, 2009 4:25 pm; edited 1 time in total
Reply with quote
wrym
Magician


Joined: 06 Jul 2007
Posts: 349
Location: The big palace, My own lil world

PostPosted: Wed Jun 03, 2009 9:09 am   
 
I just tested your pattern, and on windows vista It executed fine, if I add in your code I still do not get it to fail. Something in your trigger is interfering with something else in your package and causing your problems.
_________________
"To the engineer, all matter in the universe can be placed into one of two categories: (1) things that need to be fixed, and (2) things that will need to be fixed after you've had a few minutes to play with them" - Scott Adams, The Dilbert Principle
Reply with quote
chris-74269
Magician


Joined: 23 Nov 2004
Posts: 364

PostPosted: Wed Jun 03, 2009 3:15 pm   
 
The package works flawlessly on my computer, so I would doubt the trigger is interfering with anything else in the package. Every player who has reported cmud freezing up when activating these triggers has been a vista user. I'll try to find another of those players and see if I can do a remote connect to try and parse the issue down to its bare essentials (as in just a pattern crashing it, no code)
Reply with quote
adalius
Beginner


Joined: 23 May 2009
Posts: 15

PostPosted: Thu Jun 04, 2009 11:43 pm   
 
Hey Chris, just for note, I'm on XP SP3 not Vista. Assuming this is the one crashing me from when we talked anyway. And just for note, thats with no other packages installed except those that come with CMud.
Reply with quote
chris-74269
Magician


Joined: 23 Nov 2004
Posts: 364

PostPosted: Fri Jun 05, 2009 4:38 pm   
 
Same here (XP SP3), so that's pretty odd to me that the package works flawlessly for me in a blank session w/ only the english dirs/keypad enabled but crashes yours and a few others. A good amount of people are using this package w/o issues too. Is it possible that maybe there are issues with the regex engine and certain setups? I saw your package and being as you use some regex too that may not be the case, but looking over the script I really can't think of anything other than regex which could be the cause of the script making a handful of users crash. Perhaps it is b/c I use the "trigger on newline/trigger on prompt" option instead of having 2 triggers? Or maybe something with #say causing an infinite recursion for some users...I doubt that though.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net