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
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Wed Jul 16, 2008 12:29 am   

[2.30] Compatibitly crashes
 
This was brought about because of this quote:
Zugg wrote:
It crashed?? Send me the *.MUD zMUD file that you tried to check the compatibility of so that I can figure out why. I'm not aware of any crash bugs in the Compatibility Report in CMUD. Email the file as an attachment to sales@zuggsoft.com.


Someone else reported the crash, and I suppose I should have done this a long time ago (my compatibility report has been crashing for about the last 3-4 versions, I believe, but always thought it was a bug in my system)...

However, whenever I run compatibility report, it errors out on me with the following error:


As you can see, there is no way to send a crash report because, well, it simply does not give the option. This is on a brand new system (kind of a gift), so I know it wasn't my system faults. Disabling packages still managed to produce the same errors, too...

Charneus
Reply with quote
FiendishX
Wanderer


Joined: 19 Nov 2005
Posts: 53

PostPosted: Wed Jul 16, 2008 1:05 am   
 
You're lucky. I don't even get to click on "OK". It just exits for me.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Jul 16, 2008 1:39 am   
 
Grr! You should know better then to let a bug like that go! I know what the bug is since I that is the preferred PCRE.dll address space, and checking that specific address is the same code point where there was a crash before. It is a stack overflow problem.

In order to fix that crash I adjusted the dll optimizations to get the lowest memory usage (the right optimisaztion setting cut the memory usage by 50%), and I also worked out a more efficient regex for one of the compatibility reports tests. If you can narrow down the specific script that is causing the crash it would allow Zugg to test which of the compatibility reports regexes is causing the crash. If the offending regex can be improved that would be my aim, if it can't then either Zugg will have to adjust the stack options he is building with (I think currently 4MB main program, but only 1MB for each thread), or I shall have to switch the dll to use a slower stable mode. There might be a 4th option that can be thought of, but until we know more I can't guess at it.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Wed Jul 16, 2008 2:16 am   
 
Hah... much easier than I expected. Here is the offending xml:

Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <class name="Questing">
    <alias name="QUD">
      <value>#case %db( @All_Questing_DB, QuestStatus) {#SEND %if( %0, %0, %db( @All_Questing_DB, qreportchan)) " @cI am Currently Able to Quest.@Y"} {#SEND %if( %0, %0, %db( @All_Questing_DB, qreportchan)) " @cThere Are @W@qtime @cMinutes Remaining Until I Can Quest Again@W."} {#SEND %if( %0, %0, %db( @All_Questing_DB, qreportchan)) "@RC@rurrent @RQ@ruest@W: @cI Have @W"%db( @All_Questing_DB, CurrentQuestTime)" @cMinutes To Kill @C"%db( @All_Questing_DB, QuestMob)"@W, @cIn @C"%db( @All_Questing_DB, QuestRoom)"@c Of @C"%db( @All_Questing_DB, QuestArea)"@W.@Y"}</value>
    </alias>
    <alias name="QAv">
      <value><![CDATA[questcalculate
#IF (%0) {#SEND %0 "@RQ@ruest @RS@rtats@W: @W"%format( "&1.0n", %db( @All_Questing_DB, QuestsCompleted))"@c Quests@W. @W"%format( "&1.0n", %db( @All_Questing_Bonuses_DB, TriviaPointsCurrent))" @cTPs@W. @W"%format( "&1.0n", %db( @All_Questing_Bonuses_DB, TrainsCurrent))" @cTrains@W. @W"%format( "&1.0n", %db( @All_Questing_Bonuses_DB, PracticesCurrent))" @cPracs@W. @W"%format( "&1.0n", %db( @All_Questing_DB, QuestQPsCurrent))"@W @cQPs @W"%db( @All_Questing_Bonuses_DB, perqav)" @C( @Y"%db( @All_Questing_Bonuses_DB, qptav)"@C + @Y"%db( @All_Questing_Bonuses_DB, qbonusta)"@C + @Y"%db( @All_Questing_Db, TierQPBonus)"@C + @Y"%db( @All_Questing_DB, MCCP)"@C) @cQPs/Quest@W. @W"%format( "&1.0n", %db( @All_Questing_DB, QuestGoldCurrent))" @cGold @C( @Y"%db( @All_Questing_Bonuses_DB, qpgpc)" @cper@C)@W. @cAverage Time Per: @W"%db( @All_Questing_Time_DB, qendmta)"@cm @W"%db( @All_Questing_Time_DB, qendsta)"@cs@W."} {
  #say
  #say %ansi( high, green)@padright(%format( "&1.0n", %db( @All_Questing_DB, QuestsCompleted)),10," ")"Quests Completed."
  #say %ansi( high, green)@padright(%format( "&1.0n", %db( @All_Questing_Bonuses_DB, TriviaPointsCurrent)),10," ")"Bonus TPs."
  #say %ansi( high, green)@padright(%format( "&1.0n", %db( @All_Questing_Bonuses_DB, TrainsCurrent)),10," ")"Bonus Trains."
  #say %ansi( high, green)@padright(%format( "&1.0n", %db( @All_Questing_Bonuses_DB, PracticesCurrent)),10," ")"Bonus Practices."
  #say %ansi( high, green)@padright(%format( "&1.0n", %db( @All_Questing_Bonuses_DB, QuestBonusQPsCurrent)),10," ")"Bonus QPs"
  #say %ansi( high, green)@padright(%format( "&1.0n", %db( @All_Questing_DB, QuestGoldCurrent)),10," ")"Total Gold earned."
  #say %ansi( high, green)@padright(%db( @All_Questing_Bonuses_DB, qpgpc),10," ")"Gold per Quest."
  #say %ansi( high, green)@padright(%format( "&1.0n", %db( @All_Questing_Time_DB, perqavt)),10," ")"Total QPs earned."
  #say %ansi( high, green)@padright(%db( @All_Questing_Time_DB, qendmta)"m "%db( @All_Questing_Time_DB, qendsta)"s ",10," ")"Per Quest."
  #say
  #say %ansi( high, green)%format( "&1.0n", %db( @All_Questing_Bonuses_DB, perqav)) %ansi( white)"("%ansi( high, green)%db( @All_Questing_Bonuses_DB, qptav)%ansi( high, white)"+"%ansi( high, green)%db( @All_Questing_Bonuses_DB, qbonusta)%ansi( high, white)"+"%ansi( high, green)%format( "&1.0n", %db( @All_Questing_DB, TierQPBonus))%ansi( high, white)"+"%ansi( high, green)%format( "&1.0n", %db( @All_Questing_DB, MCCP))%ansi( high, white)") "%ansi( cyan)"QPs/Quest."
  }]]></value>
    </alias>
    <alias name="QAvr">
      <value>#if {%yesno( "Reset the quest tracker?")} {#ADDKEY All_Questing_Bonuses_DB {QuestBonusStatus|PracticesCurrent|TrainsCurrent|TriviaPointsCurrent|QuestBonusQPsCurrent|Trains|Practices|TriviaPoints} 0;#ADDKEY All_Questing_Time_DB {Lastquest|QSMinute|QSSecond|timeqc|qendta|qendmta|qendsta|perqavt|qendm|qends|timeqct|timeqc} 0;#ADDKEY All_Questing_DB {QuestsCompleted|TierQPBonusCurrent|QuestGoldCurrent|QuestQPsCurrent|MCCP|TierQPBonus|TotalQuestQP|QuestDoubleBonus|QuestQPs|QuestGold} 0;#say %ansi( high, green)"-=+ "%ansi( high, yellow)"Quest Stats Reset "%ansi( high, green)"+=-"}</value>
    </alias>
    <alias name="QAlert">
      <value>#addkey All_Questing_DB QuestAlert %mod( %eval( %db(@All_Questing_DB, QuestAlert)+1), 4);#case %db(@All_Questing_DB, QuestAlert) {#say %ansi( high, cyan)"-=+ "%ansi( high, white)"No Alerts "%ansi( high, cyan)"+=-"} {#say %ansi( high, cyan)"-=+ "%ansi( high, white)"Audible Alert (1 beep) "%ansi( high, cyan)"+=-"} {#say %ansi( high, cyan)"-=+ "%ansi( high, white)"Visual alert (seen in any window) "%ansi( high, cyan)"+=-"} {#say %ansi( high, cyan)"-=+ "%ansi( high, white)"Audible and Visual Alert "%ansi( high, cyan)"+=-"}</value>
    </alias>
    <alias name="LQ">
      <value>#IF (%0) {questreport %0} {questreport}</value>
    </alias>
    <alias name="QSet">
      <value>#addkey All_Questing_DB qreportchan %prompt( %db( @All_Questing_Db, qreportchan), "Enter the channel to report on");#if %yesno( "Use capture window for quest info?") {#addkey All_Questing_DB QuestCapture 1} {#addkey All_Questing_DB QuestCapture 0}</value>
    </alias>
    <alias name="QHelp">
      <value>#say %ansi( high, white)"// Quest Info Script v4.4 Written by Atreidess \";#say %ansi( grey)"           // Colorizing by Davos \";#say;#say %ansi( high, cyan)"This script the following configuration commands:";#say %ansi( high, green)"-=: QSet              :=- "%ansi( high, yellow)" Changes default channel to output info on.";#say %ansi( high, green)"-=: QAlert            :=- "%ansi( high, yellow)" Toggles quest time alert type (Audio/Visual/None/Both)";#say;#say %ansi( high, cyan)"This script the following output commands:";#say %ansi( high, green)"-=: QAv (X)           :=- "%ansi( high, yellow)" Shows your questing averages, optional output to channel (X)";#say %ansi( high, green)"-=: QAvT (X)          :=- "%ansi( high, yellow)" Shows your all-time questing stats, optional output to channel (X)";#say %ansi( high, green)"-=: QUD (X)           :=- "%ansi( high, yellow)" * See Below";#say %ansi( high, green)"-=: LQ (X), LQI (X)   :=- "%ansi( high, yellow)" Shows info about your last quest to default chan or optional chan (X)";#say %ansi( high, green)"-=: QAvR              :=- "%ansi( high, yellow)" Resets questing averages (not all time)";#say %ansi( high, green)"-=: LQR               :=- "%ansi( high, yellow)" Removes your last quest from all-time and current averages";#say %ansi( high, red)"The LQR command is useful for when a note sets off the script / you forget to q complete / etc";#say;#say %ansi( high, cyan)"Some notes about the 'QUD' command:";#say %ansi( grey)"The QUD command only works if you set your prompt to display your quest time as:";#say %ansi( cyan)"Qtime: (X)";#say %ansi( grey)"The (X) is, of course, your quest time (%q prompt option)";#say;#say %ansi( grey)"The QUD command is a very versatile command that reports either your time to quest, your";#say %ansi( grey)"current quest information, or other similar information to gt or optional channel (X)";#say;#say %ansi( high, magenta)"Some additional aliases you may or may not wish to use:";#say %ansi( high, magenta)"QC "%ansi( grey)"- Quest complete. "%ansi( high, magenta)"QCC "%ansi( grey)"- Home, Quest complete. "%ansi( high, magenta)"QCCC "%ansi( grey)"- Enter portal, home, quest complete.";#say %ansi( high, magenta)"QR "%ansi( grey)"- Quest request. "%ansi( high, magenta)" QRR "%ansi( grey)"- Home, Quest request. "%ansi( high, magenta)" QRRR "%ansi( grey)"- Enter portal, home, quest request.";#say %ansi( high, magenta)"QF "%ansi( grey)"- Quest fail. "%ansi( high, magenta)"    QFF "%ansi( grey)"- Home, Quest fail. "%ansi( high, magenta)"    QFFF "%ansi( grey)"- Enter portal, home, quest fail.";#say %ansi( high, magenta)"QI "%ansi( grey)"- Quest info. "%ansi( high, magenta)"    HH "%ansi( grey)" - Enter portal, home"</value>
    </alias>
    <alias name="QuestReport">
      <value><![CDATA[#addkey All_Questing_DB TotalQuestQP {%eval( %db( @All_Questing_DB,QuestQPs)+%db( @All_Questing_Bonuses_DB,QuestBonusQPs)+%db( @All_Questing_DB,MCCP)+%db( @All_Questing_DB,TierQPBonus)+%db( @All_Questing_DB,QuestDoubleBonus))};#gagon;#SEND %if( %0,  %0, %db( @All_Questing_DB, qreportchan)) "@c-=@C(@RQ@ruest @RC@romplete@C)@c=-   @cQPs@W: "%int( %db( @All_Questing_DB, QuestQPs))%if( %int( %db( @All_Questing_DB, MCCP))>0, "@C+@W"%db( @All_Questing_DB, MCCP))%if( %int( %db( @All_Questing_DB, TierQPBonus))>0, "@C+@W"%db( @All_Questing_DB, TierQPBonus))%if( %int( %db( @All_Questing_Bonuses_DB, QuestBonusQPs))>0, "@C+@W"%db( @All_Questing_Bonuses_DB, QuestBonusQPs))%if( %int( %db( @All_Questing_DB, QuestDoubleBonus))>0, "@C+@W"%db( @All_Questing_DB, QuestDoubleBonus))" @C= @W"%db( @All_Questing_DB, TotalQuestQP)"@W. @cGold@W: @W"%db( @All_Questing_DB, QuestGold)"   @c-=@C(@c Time@W: "%db( @All_Questing_Time_DB, qendm)"@cm @W"%db( @All_Questing_Time_DB, qends)"@cs @C)@c=-"%if( %int( %db( @All_Questing_Bonuses_DB, QuestBonusStatus))>0, @questreward"@Y",  "@Y");#gagoff]]></value>
    </alias>
    <alias name="LQI">
      <value>#SEND (%if( %0, %0, %db( @All_Questing_DB, qreportchan))) "@RL@rast @RQ@ruest@W: @W"%db( @All_Questing_DB, CurrentQuestTime)" @cMinutes To Kill @C"%db( @All_Questing_DB, QuestMob)"@W, @cIn @C"%db( @All_Questing_DB, QuestRoom)"@c Of @C"%db( @All_Questing_DB, QuestArea)"@W.@Y"</value>
    </alias>
    <alias name="QuestTime">
      <value>#addkey All_Questing_Time_DB qendm {%eval( %db( @All_Questing_Time_DB,timeqc)/60)};#addkey All_Questing_Time_DB qends {%eval( %db( @All_Questing_Time_DB,timeqc)-(%db( @All_Questing_Time_DB,qendm)*60))};#addkey All_Questing_Time_DB qendta {%eval( %db( @All_Questing_Time_DB,timeqct)/%db( @All_Questing_DB,QuestsCompleted))};#addkey All_Questing_Time_DB qendmta {%eval( %db( @All_Questing_Time_DB,qendta)/60)};#addkey All_Questing_Time_DB qendsta {%eval( %db( @All_Questing_Time_DB,qendta)-(%db( @All_Questing_Time_DB,qendmta)*60))}</value>
    </alias>
    <alias name="TierQuestBonusAverageUnuser">
      <value>#MATH qptemp ((@ttqpbonus*100)/%db( @All_Questing_DB, QuestsCompleted)) {GroupInfo|Questing};#MATH ttqpbonusa (@qptemp/100) {GroupInfo|Questing};ttqpbonusa2=%mod( @qptemp, 100);#IF (@ttqpbonusa2 < 10) {ttqpbonusa2=%concat( "0", @ttqpbonusa2)};#va ttqpbonusa {%concat( @ttqpbonusa, ".")} _nodef {GroupInfo|Questing};#va ttqpbonusa {%concat( @ttqpbonusa, @ttqpbonusa2)} _nodef {GroupInfo|Questing};#va ttqpbonusa {%replace( @ttqpbonusa, " ", "")};#noop ------------------------------------------------------------</value>
    </alias>
    <alias name="QuestCalculate">
      <value>questtime;#addkey All_Questing_Time_DB perqavt {%eval( %eval( %db( @All_Questing_DB,MCCP)*%db( @All_Questing_DB,QuestsCompleted))+%db( @All_Questing_Bonuses_DB,QuestBonusQPsCurrent)+%db( @All_Questing_DB,TierQPBonusCurrent)+%db( @All_Questing_DB,QuestQPsCurrent))};#addkey All_Questing_Bonuses_DB perqav {@QuestMath(%db(@All_Questing_Time_DB,perqavt),%db( @All_Questing_DB,QuestsCompleted))};#addkey All_Questing_Bonuses_DB qbonusta {@QuestMath(%db( @All_Questing_Bonuses_DB,QuestBonusQPsCurrent),%db( @All_Questing_DB,QuestsCompleted))};#addkey All_Questing_Bonuses_DB qptav {@QuestMath(%db( @All_Questing_DB,QuestQPsCurrent),%db( @All_Questing_DB,QuestsCompleted))};#addkey All_Questing_Bonuses_DB qpgpc {@QuestMath(%db( @All_Questing_DB,QuestGoldCurrent),%db( @All_Questing_DB,QuestsCompleted))}</value>
    </alias>
    <alias name="QavT">
      <value><![CDATA[questcalculateall
#IF (%0) {#SEND %0 "All-time @RQ@ruest @RS@rtats@W: @W"%format( "&1.0n", %db( @All_Questing_DB, QuestsCompletedTotal))"@c Quests@W. @W"%format( "&1.0n", %db( @All_Questing_Bonuses_DB, TriviaPointsTotal))" @cTPs@W. @W"%format( "&1.0n", %db( @All_Questing_Bonuses_DB, TrainsTotal))" @cTrains@W. @W"%format( "&1.0n", %db( @All_Questing_Bonuses_DB, PracticesTotal))" @cPracs@W. @W"%format( "&1.0n", %db( @All_Questing_DB, QuestQPsTotal))"@W @cQPs @W"%db( @All_Questing_Bonuses_DB, perqavTotal)" @C~@Y"%db( @All_Questing_Bonuses_DB, qptavTotal)"@C + @Y"%db( @All_Questing_Bonuses_DB, qbonustaTotal)"@C + @Y"%db( @All_Questing_Db, TierQPBonusTotal)"@C + @Y"%db( @All_Questing_DB, MCCP)"@C) @cQPs Per Quest@W. @W"%format( "&1.0n", %db( @All_Questing_DB, QuestGoldTotal)) "@cGold @C(@Y"%db( @All_Questing_Bonuses_DB, qpgpcTotal)" @cper@C)@W. @cAverage Time Per: @W"%db( @All_Questing_Time_DB, qendmtaTotal)"@cm @W"%db( @All_Questing_Time_DB, qendstaTotal)"@cs@W."} {
  #say
  #say %ansi( high, green)@padright( %format( "&1.0n", %db( @All_Questing_DB, QuestsCompletedTotal)),10," ")" Quests Completed."
  #say %ansi( high, green)@padright( %format( "&1.0n", %db( @All_Questing_Bonuses_DB, TriviaPointsTotal)),10," ")" Bonus TPs."
  #say %ansi( high, green)@padright( %format( "&1.0n", %db( @All_Questing_Bonuses_DB, TrainsTotal)),10," ")" Bonus Trains."
  #say %ansi( high, green)@padright( %format( "&1.0n", %db( @All_Questing_Bonuses_DB, PracticesTotal)),10, " ")" Bonus Practices."
  #say %ansi( high, green)@padright( %format( "&1.0n", %db( @All_Questing_Bonuses_DB, QuestBonusQPsTotal)),10," ")" Bonus QPs"
  #say %ansi( high, green)@padright( %format( "&1.0n", %db( @All_Questing_DB, QuestGoldTotal)),10," ")" Total Gold earned."
  #say %ansi( high, green)@padright( %db( @All_Questing_Bonuses_DB, qpgpcTotal),10," ")" Gold per Quest."
  #say %ansi( high, green)@padright( %format( "&1.0n", %db( @All_Questing_Time_DB, perqavtTotal)),10," ")" Total QPs earned."
  #say %ansi( high, green)@padright( %db( @All_Questing_Time_DB, qendmtaTotal)"m "%db( @All_Questing_Time_DB, qendstaTotal)"s",10," ")" Per Quest."
  #say
  #say %ansi( high, green)%db( @All_Questing_Bonuses_DB, perqavTotal) %ansi( high, white)"("%ansi( high, green)%db( @All_Questing_Bonuses_DB, qptavTotal)%ansi( high, white)"+"%ansi( high, green)%db( @All_Questing_Bonuses_DB, qbonustaTotal)%ansi( high, white)"+"%ansi( high, green)%db( @All_Questing_DB, TierQPBonusTotal)%ansi( high, white)"+"%ansi( high, green)%db( @All_Questing_DB, MCCP)%ansi( high, white)") "%ansi( cyan)"QPs/Quest."
  }]]></value>
    </alias>
    <alias name="QuestCalculateAll">
      <value>#addkey All_Questing_Time_DB qendtaTotal {%eval( %db( @All_Questing_Time_DB, timeqctAll)/%db( @All_Questing_DB, QuestsCompletedTotal))}
#addkey All_Questing_Time_DB qendmtaTotal {%eval( %db( @All_Questing_Time_DB, qendtaTotal)/60)}
#addkey All_Questing_Time_DB qendstaTotal {%eval( %db( @All_Questing_Time_DB, qendtaTotal)-(%db( @All_Questing_Time_DB, qendmtaTotal)*60))}
#addkey All_Questing_Time_DB perqavtTotal {%eval( %eval( %db( @All_Questing_DB, MCCP)*%db( @All_Questing_DB, QuestsCompletedTotal))+%db( @All_Questing_Bonuses_DB, QuestBonusQPsTotal)+%db( @All_Questing_DB, TierQPBonusTotal)+%db( @All_Questing_DB, QuestQPsTotal))}
#addkey All_Questing_Bonuses_DB perqavTotal {@QuestMath( %db( @All_Questing_Time_DB, perqavtTotal), %db( @All_Questing_DB, QuestsCompletedTotal))}
#addkey All_Questing_Bonuses_DB qbonustaTotal {@QuestMath( %db( @All_Questing_Bonuses_DB, QuestBonusQPsTotal), %db( @All_Questing_DB, QuestsCompletedTotal))}
#addkey All_Questing_Bonuses_DB qptavTotal {@QuestMath( %db( @All_Questing_DB, QuestQPsTotal), %db( @All_Questing_DB, QuestsCompletedTotal))}
#addkey All_Questing_Bonuses_DB qpgpcTotal {@QuestMath( %db( @All_Questing_DB, QuestGoldTotal), %db( @All_Questing_DB, QuestsCompletedTotal))}</value>
    </alias>
    <alias name="LQR">
      <value>#if {%db( @All_Questing_DB, LQR)=1} {
  #addkey All_Questing_DB QuestsCompleted {%eval( %int( %db( @All_Questing_DB, QuestsCompleted)-1))}
  #addkey All_Questing_DB QuestsCompletedTotal {%eval( %int( %db( @All_Questing_DB, QuestsCompletedTotal)-1))}
  #addkey All_Questing_DB QuestQPsCurrent {%eval( %int( %db( @All_Questing_DB, QuestQPsCurrent)-%db( @All_Questing_DB, QuestQPs)))}
  #addkey All_Questing_DB QuestQPsTotal {%eval( %int( %db( @All_Questing_DB, QuestQPsTotal)-%db( @All_Questing_DB, QuestQPs)))}
  #addkey All_Questing_DB QuestGoldCurrent {%eval( %int( %db( @All_Questing_DB, QuestGoldCurrent)-%db( @All_Questing_DB, QuestGold)))}
  #addkey All_Questing_DB QuestGoldTotal {%eval( %int( %db( @All_Questing_DB, QuestGoldTotal)-%db( @All_Questing_DB, QuestGold)))}
  #addkey All_Questing_DB TierQPBonusCurrent {%eval( %int( %db( @All_Questing_DB, TierQPBonusCurrent)-%db( @All_Questing_DB, TierQPBonus)))}
  #addkey All_Questing_DB TierQPBonusTotal {%eval( %int( %db( @All_Questing_DB, TierQPBonusTotal)-%db( @All_Questing_DB, TierQPBonus)))}
  #addkey All_Questing_Bonuses_DB QuestBonusQPsCurrent {%eval( %int( %db( @All_Questing_Bonuses_DB, QuestBonusQPsCurrent)-%db( @All_Questing_DB, QuestBonusQPs)))}
  #addkey All_Questing_Bonuses_DB QuestBonusQPsTotal {%eval( %int( %db( @All_Questing_Bonuses_DB, QuestBonusQPsTotal)-%db( @All_Questing_DB, QuestBonusQPs)))}
  #addkey All_Questing_Time_DB timeqct {%eval( %int( %db( @All_Questing_Time_DB, timeqct)-%db( @All_Questing_Time_DB, timeqc)))}
  #addkey All_Questing_Time_DB timeqctAll {%eval( %int( %db( @All_Questing_Time_DB, timeqctAll)-%db( @All_Questing_Time_DB, timeqc)))}
  #addkey All_Questing_Bonuses_DB TriviaPointsTotal {%eval( %int( %db( @All_Questing_Bonuses_DB, TriviaPointsTotal)-%db( @All_Questing_Bonuses_DB, TriviaPoints)))}
  #addkey All_Questing_Bonuses_DB TriviaPointsCurrent {%eval( %int( %db( @All_Questing_Bonuses_DB, TriviaPointsCurrent)-%db( @All_Questing_Bonuses_DB, TriviaPoints)))}
  #addkey All_Questing_Bonuses_DB PracticesTotal {%eval( %int( %db( @All_Questing_Bonuses_DB, PracticesTotal)-%db( @All_Questing_Bonuses_DB, Practices)))}
  #addkey All_Questing_Bonuses_DB PracticesCurrent {%eval( %int( %db( @All_Questing_Bonuses_DB, PracticesCurrent)-%db( @All_Questing_Bonuses_DB, Practices)))}
  #addkey All_Questing_Bonuses_DB TrainsTotal {%eval( %int( %db( @All_Questing_Bonuses_DB, TrainsTotal)-%db( @All_Questing_Bonuses_DB, Trains)))}
  #addkey All_Questing_Bonuses_DB TrainsCurrent {%eval( %int( %db( @All_Questing_Bonuses_DB, TrainsCurrent)-%db( @All_Questing_Bonuses_DB, Trains)))}
  #addkey All_Questing_Bonuses_DB {Trains|Practices|TriviaPoints} 0
  #addkey All_Questing_DB LQR 0
  #say %ansi( high, cyan)"-=+ "%ansi( high, white)"Last Quest Removed from Records! "%ansi( high, cyan)"+=-"
  } {#say %ansi( high, cyan)"-=+ "%ansi( high, white)"You've already removed your most recent quest! "%ansi( high, cyan)"+=-"}</value>
    </alias>
    <alias name="temp">
      <value>questcalculateall;#IF (%0) {%0 "@RQ@ruest @RS@rtats@W: @W"%db( @All_Questing_DB,QuestsCompletedTotal)"@c Quests@W. @W"%db( @All_Questing_Bonuses_DB,TriviaPointsTotal)" @cTPs@W. @W"%db( @All_Questing_Bonuses_DB,TrainsTotal)" @cTrains@W. @W"%db( @All_Questing_Bonuses_DB,PracticesTotal)" @cPracs@W. @W"%db( @All_Questing_DB,QuestQPsTotal)"@W @cQPs @W"%db( @All_Questing_Bonuses_DB,perqavTotal)" @C(@Y"%db( @All_Questing_Bonuses_DB,qptavTotal)"@C + @Y"%db( @All_Questing_Bonuses_DB,qbonustaTotal)"@C + @Y"%db( @All_Questing_Db,TierQPBonusTotal)"@C + @Y"%db( @All_Questing_DB,MCCP)"@C) @cQPs Per Quest@W. @W"%db( @All_Questing_DB,QuestGoldTotal)" @cGold @C(@Y"%db( @All_Questing_Bonuses_DB,qpgpcTotal)" @cper@C)@W. @cAverage Time Per: @W"%db( @All_Questing_Time_DB,qendmtaTotal)"@cm @W"%db( @All_Questing_Time_DB,qendstaTotal)"@cs@W."} {#say %ansi( high, White)%db( @All_Questing_DB, QuestsCompletedTotal)" Quests Completed.";#say %ansi( high, red)%db( @All_Questing_Bonuses_DB, TriviaPointsTotal)" Bonus TPs.";#say %ansi( high, blue)%db( @All_Questing_Bonuses_DB, TrainsTotal)" Bonus Trains.";#say %ansi( high, blue)%db( @All_Questing_Bonuses_DB, PracticesTotal)" Bonus Practices.";#say %ansi( high, grey)%db( @All_Questing_Bonuses_DB, QuestBonusQPsTotal)" Bonus QPs";#say %ansi( high, yellow)%db( @All_Questing_DB, QuestGoldTotal)" Total Gold earned.";#say %ansi( high, yellow)%db( @All_Questing_Bonuses_DB, qpgpcTotal)" Gold per Quest.";#say %ansi( high, green)%db( @All_Questing_Time_DB, perqavtTotal)" Total QPs earned.";#say %ansi( high, yellow)%db( @All_Questing_Bonuses_DB, perqavTotal) %ansi( high, white)"("%ansi( high, yellow)%db( @All_Questing_Bonuses_DB, qptavTotal)%ansi( high, white)" + "%ansi( high, yellow)%db( @All_Questing_Bonuses_DB, qbonustaTotal) %ansi( high, white)"+ "%ansi( high, yellow)%db( @All_Questing_DB, TierQPBonusTotal)%ansi( high, white)" + "%ansi( high, yellow)%db( @All_Questing_DB, MCCP)%ansi( high, white)") "%ansi( high, green)"QPs Per Quest.";#say %ansi( high, cyan)%db( @All_Questing_Time_DB, qendmtaTotal)"m "%db( @All_Questing_Time_DB, qendstaTotal)"s per quest."}</value>
    </alias>
    <func name="QuestMath">
      <value>%if( %1>%eval( %2/1000), %concat( %format( "&amp;1.0n", %eval( %int( %eval( 100*%eval( %float( %1)/%2)))/100)), ., %if( %mod( %int( %eval( 100*%eval( %float( %1)/%2))), 100)<10,  "0",  ""), %mod( %int( %eval( 100*%eval( %float( %1)/%2))), 100)), %concat( "0", ., "00"))</value>
    </func>
    <func name="QuestSpacing">
      <value>%if( %len( "%1")=1, %concat( "           "), %if( %len( "%1")=2, %concat( "          "), %if( %len( "%1")=3, %concat( "         "), %if( %len( "%1")=4, %concat( "        "), %if( %len( "%1")=5, %concat( "       "), %if( %len( "%1")=6, %concat( "      "), %if( %len( "%1")=7, %concat( "     "), %if( %len( "%1")=8, %concat( "    "), %if( %len( "%1")=9, %concat( "   "), %if( %len( "%1")=10, %concat( "  "), %if( %len( "%1")=11, %concat( " "), %if( %len( "%1")=12, %concat( "")))))))))))))%ansi(cyan)</value>
    </func>
    <trigger priority="10850">
      <pattern>* tells you 'I thought you could handle such a simple task.'$</pattern>
      <value>#addkey All_Questing_DB QuestStatus 2;#SEND %db( @All_Questing_DB, qreportchan) "@c-=@C(@RQ@ruest @RF@railed@C)@c=-@Y"</value>
    </trigger>
    <trigger priority="10860">
      <pattern>QUEST: You may now quest again.$</pattern>
      <value>#gagon;#SEND %db( @All_Questing_DB, qreportchan) "@c-=@C(@RQ@ruest @RT@rime@C)@c=-@Y";#gagoff;#addkey All_Questing_DB QuestStatus 1;#case %db( @All_Questing_DB, QuestAlert) {%null} {#beep} {#mess Quest Time} {#beep;#mess Quest Time}</value>
    </trigger>
    <trigger priority="10870">
      <pattern>^~(Group~) (*): 'qtime?'$</pattern>
      <value>#if {%1!=%char} {qud}</value>
    </trigger>
    <trigger priority="10880">
      <pattern>^You inform * that you have completed your quest.$</pattern>
      <value>#T+ {GroupInfo|Questing|QuestTracking};#addkey All_Questing_Bonuses_DB {QuestBonusStatus|QuestBonusQPs|Trains|Practices|TriviaPoints} 0;#addkey All_Questing_DB {QuestDoubleBonus|MCCP|TierQPBonus} 0;#addkey All_Questing_Time_DB {qendmta|qendsta|timeqc} 0;questreward=%null</value>
    </trigger>
    <trigger priority="10890">
      <pattern>You ask * for a quest.$</pattern>
      <value>#T+ {GroupInfo|Questing|QuestTracking}</value>
    </trigger>
    <class name="QCGAliases">
      <alias name="hh">
        <value>pmyst;home</value>
      </alias>
      <alias name="qff">
        <value>home;qf</value>
      </alias>
      <alias name="qc">
        <value>quest complete</value>
      </alias>
      <alias name="qr">
        <value>quest request</value>
      </alias>
      <alias name="qi">
        <value>quest info</value>
      </alias>
      <alias name="qcc">
        <value>home;qc</value>
      </alias>
      <alias name="qf">
        <value>quest fail</value>
      </alias>
      <alias name="qrr">
        <value>hh;qr</value>
      </alias>
      <alias name="qccc">
        <value>hh;qc</value>
      </alias>
      <alias name="qrrr">
        <value>hh;qr</value>
      </alias>
      <alias name="qfff">
        <value>hh;qf</value>
      </alias>
    </class>
    <class name="QuestBonus" enabled="false">
      <trigger priority="11030">
        <pattern>^~*~* You gain a bonus training session ~*~*</pattern>
        <value>#if {%db( @All_Questing_Bonuses_DB, QuestBonusStatus)>0} {#va questreward %concat( @questreward, "@W,@c" Train)} {#va questreward %concat( @questreward, "@c" Train)};#addkey All_Questing_Bonuses_DB QuestBonusStatus {%eval( (%db( @All_Questing_Bonuses_DB,QuestBonusStatus)+1))};#addkey All_Questing_Bonuses_DB Trains 1;#addkey All_Questing_Bonuses_DB TrainsTotal {%eval( (%db( @All_Questing_Bonuses_DB,TrainsTotal)+1))};#addkey All_Questing_Bonuses_DB TrainsCurrent {%eval( (%db( @All_Questing_Bonuses_DB,TrainsCurrent)+1))}</value>
      </trigger>
      <trigger priority="11040">
        <pattern>^~*~* You gain a bonus practice ~*~*</pattern>
        <value>#if {%db( @All_Questing_Bonuses_DB, QuestBonusStatus)>0} {#va questreward %concat( @questreward, "@W,@c" Practice)} {#va questreward %concat( @questreward, "@c" Practice)};#addkey All_Questing_Bonuses_DB QuestBonusStatus {%eval( (%db( @All_Questing_Bonuses_DB,QuestBonusStatus)+1))};#addkey All_Questing_Bonuses_DB Practices 1;#addkey All_Questing_Bonuses_DB PracticesTotal {%eval( (%db( @All_Questing_Bonuses_DB,PracticesTotal)+1))};#addkey All_Questing_Bonuses_DB PracticesCurrent {%eval( (%db( @All_Questing_Bonuses_DB,PracticesCurrent)+1))}</value>
      </trigger>
      <trigger priority="11050">
        <pattern>^~*~* You gain a bonus (%d) practices ~*~*</pattern>
        <value>#if {%db( @All_Questing_Bonuses_DB, QuestBonusStatus)>0} {#va questreward %concat( @questreward, "@W," %1 "@c"Pracs)} {#va questreward %concat( @questreward, "@W" %1 "@c"Pracs)};#addkey All_Questing_Bonuses_DB QuestBonusStatus {%eval( (%db( @All_Questing_Bonuses_DB,QuestBonusStatus)+1))};#addkey All_Questing_Bonuses_DB Practices %1;#addkey All_Questing_Bonuses_DB PracticesTotal {%eval( (%db( @All_Questing_Bonuses_DB,PracticesTotal)+%1))};#addkey All_Questing_Bonuses_DB PracticesCurrent {%eval( (%db( @All_Questing_Bonuses_DB,PracticesCurrent)+%1))}</value>
      </trigger>
      <trigger priority="11060">
        <pattern>^~*~* You gain a bonus trivia point! ~*~*</pattern>
        <value>#if {%db( @All_Questing_Bonuses_DB, QuestBonusStatus)>0} {#va questreward %concat( @questreward, "@W,@c" Trivia Point)} {#va questreward %concat( @questreward, "@c" Trivia Point)};#addkey All_Questing_Bonuses_DB QuestBonusStatus {%eval( (%db( @All_Questing_Bonuses_DB,QuestBonusStatus)+1))};#addkey All_Questing_Bonuses_DB TriviaPoints 1;#addkey All_Questing_Bonuses_DB TriviaPointsTotal {%eval( (%db( @All_Questing_Bonuses_DB,TriviaPointsTotal)+1))};#addkey All_Questing_Bonuses_DB TriviaPointsCurrent {%eval( (%db( @All_Questing_Bonuses_DB,TriviaPointsCurrent)+1))}</value>
      </trigger>
    </class>
    <class name="QuestTracking" enabled="false">
      <trigger priority="11080">
        <pattern>You gain an extra (%d) quest points 'MCCP Bonus'.$</pattern>
        <value>#T- {GroupInfo|Questing|QuestTracking};#addkey All_Questing_DB LQR 1;#addkey All_Questing_DB MCCP %1;#addkey All_Questing_Time_DB LastQuestEnd {%time(mm-dd-yy"at"hh:mmA/P)};#addkey All_Questing_Time_DB timeqc {%eval( %eval( 60 * %eval( %time(nn)-%db( @All_Questing_Time_DB,QSMinute))) + %eval( %time(ss)-%db( @All_Questing_Time_DB,QSSecond)))};#if { %db( @All_Questing_Time_DB, timeqc)>0} {} {#addkey All_Questing_Time_DB timeqc {%eval( %db( @All_Questing_Time_DB,timeqc)+3600)}};#addkey All_Questing_Time_DB timeqct {%eval( %int( %db( @All_Questing_Time_DB,timeqct)+%db( @All_Questing_Time_DB,timeqc)))};#addkey All_Questing_Time_DB timeqctAll {%eval( %int( %db( @All_Questing_Time_DB,timeqctAll)+%db( @All_Questing_Time_DB,timeqc)))};questtime;#if {%db( @All_Questing_Bonuses_DB, QuestBonusStatus) > 1} {#va questreward %concat( "   @c"Bonuses:, @questreward)} {#if {%db( @All_Questing_Bonuses_DB, QuestBonusStatus) > 0} {#va questreward %concat( "   @c"Bonus, @questreward)}};questreport</value>
      </trigger>
      <trigger priority="11090">
        <pattern>tells you 'An enemy of mine, (*), is making vile'$</pattern>
        <value>#addkey All_Questing_DB QuestMob %1</value>
      </trigger>
      <trigger priority="11100">
        <pattern>tells you 'of (*).'$</pattern>
        <value>#addkey All_Questing_DB QuestArea %subregex(%1,"^The ")</value>
      </trigger>
      <trigger priority="11110">
        <pattern>tells you 'You have (%d) minutes to complete your quest.'$</pattern>
        <value>#T- {GroupInfo|Questing|QuestTracking}
#addkey All_Questing_Time_DB QSMinute %time( nn)
#addkey All_Questing_Time_DB QSSecond %time( ss)
#addkey All_Questing_DB CurrentQuestTime %1
#addkey All_Questing_DB QuestStatus 3
qud
findroombyarea %db( @All_Questing_DB, QuestRoom) %db( @All_Questing_DB, QuestArea)</value>
      </trigger>
      <trigger priority="11120">
        <pattern>tells you 'As a reward, I am giving you (%d) quest points and (%d) gold.'</pattern>
        <value>#T+ {GroupInfo|Questing|QuestBonus}
#alarm +2 {#T- {GroupInfo|Questing|Questbonus}}
#addkey All_Questing_DB QuestStatus 2
#addkey All_Questing_DB QuestsCompleted {%eval( %db( @All_Questing_DB, QuestsCompleted)+1)}
#addkey All_Questing_DB QuestsCompletedTotal {%eval( %db( @All_Questing_DB, QuestsCompletedTotal)+1)}
#addkey All_Questing_DB QuestQPs %1
#addkey All_Questing_DB QuestQPsCurrent {%eval( %db( @All_Questing_DB, QuestQPsCurrent)+%1)}
#addkey All_Questing_DB QuestQPsTotal {%eval( %db( @All_Questing_DB, QuestQPsTotal)+%1)}
#addkey All_Questing_DB QuestGold %2
#addkey All_Questing_DB QuestGoldCurrent {%eval( %db( @All_Questing_DB, QuestGoldCurrent)+%2)}
#addkey All_Questing_DB QuestGoldTotal {%eval( %db( @All_Questing_DB, QuestGoldTotal)+%2)}</value>
      </trigger>
      <trigger priority="11130">
        <pattern>tells you 'Aardwolf's most heinous criminal, (*),'$</pattern>
        <value>#addkey All_Questing_DB QuestMob %1</value>
      </trigger>
      <trigger priority="11140">
        <pattern>You get lucky and gain an extra (%d) quest points.$</pattern>
        <value>#addkey All_Questing_Bonuses_DB QuestBonusQPs %1;#addkey All_Questing_Bonuses_DB QuestBonusQPsCurrent {%eval( %int( %db( @All_Questing_Bonuses_DB,QuestBonusQPsCurrent))+%1)};#addkey All_Questing_Bonuses_DB QuestBonusQPsTotal {%eval( %int( %db( @All_Questing_Bonuses_DB,QuestBonusQPsTotal))+%1)}</value>
      </trigger>
      <trigger priority="11150">
        <pattern>tells you 'of (*) which is in the general area'$</pattern>
        <value>#addkey All_Questing_DB QuestRoom %1</value>
      </trigger>
      <trigger priority="11160">
        <pattern>tells you 'I am also giving you (%d) quest poin* tier bonus.'$</pattern>
        <value>#addkey All_Questing_DB TierQPBonus %1;#addkey All_Questing_DB TierQPBonusCurrent {%eval( %db( @All_Questing_DB,TierQPBonusCurrent)+%1)};#addkey All_Questing_DB TierQPBonusTotal {%eval( %db( @All_Questing_DB,TierQPBonusTotal)+%1)}</value>
      </trigger>
      <trigger priority="11170">
        <pattern>^The gods reward you (%d) bonus quest points</pattern>
        <value>#addkey All_Questing_DB QuestDoubleBonus %1</value>
      </trigger>
    </class>
    <var name="All_Questing_Time_DB" type="Record">LastQuestEnd=07-15-08a8:44 PM08:44P|QSSecond=49|timeqc=27|qendm=0|qends=27|qendta=10|Lastquest=0|qendmtaTotal=0|QSMinute=43|QuestScriptInstall=06-30-08at03:26A|qendtaTotal=-23|perqavtTotal=22|perqavt=428|qendmta=0|qendsta=10|timeqctAll=774|qendstaTotal=-23|timeqct=735</var>
    <var name="All_Questing_DB" type="Record">TierQPBonus=0|TierQPBonusCurrent=0|TierQPBonusTotal=0|QuestsCompleted=71|QuestQPs=17|QuestDoubleBonus=0|QuestStatus=2|TotalQuestQP=19|MCCP=2|CurrentQuestTime=60|QuestCapture=0|QuestsCompletedTotal=65|qreportchan=gt|QuestQPsCurrent=1007|QuestAlert=1|QuestQPsTotal=1028|LQR=1|QuestMob=the devil|QuestGold=3270|QuestGoldCurrent=269957|QuestGoldTotal=269957|QuestArea=Foolish Promises|QuestRoom=In The Teeth Of The Gale</var>
    <var name="All_Questing_Bonuses_DB" type="Record">qpgpc=3,802.60|Practices=2|QuestBonusQPsTotal=24|TrainsCurrent=5|QuestBonusStatus=1|Trains=0|PracticesCurrent=16|PracticesTotal=17|TriviaPoints=0|qbonusta=0.36|TriviaPointsCurrent=1|QuestBonusQPsCurrent=24|TriviaPointsTotal=1|perqavTotal=0.00|TrainsTotal=5|qpgpcTotal=0.00|qptav=14.76|QuestBonusQPs=0|perqav=17.12|qptavTotal=0.00|qbonustaTotal=0.00</var>
    <var name="questreward">   @cBonuses:@W,2@cPracs</var>
  </class>
</cmud>


There we go. I believe this is the offending script, if not, let me know - I've got a couple others that could be tried out. Granted, it's not as clean as it should be for CMUD, but that's why I was looking through the compatibility report to begin with. :P

Charneus


Last edited by charneus on Wed Jul 16, 2008 2:24 am; edited 1 time in total
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Wed Jul 16, 2008 2:19 am   
 
Hmmm... maybe I'll just... see if I can truncate it quite a bit... Give me a few. :P

Charneus
Reply with quote
FiendishX
Wanderer


Joined: 19 Nov 2005
Posts: 53

PostPosted: Wed Jul 16, 2008 2:28 am   
 
I don't have that script. I sent my mud file to zugg anyway like he asked.
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Wed Jul 16, 2008 2:31 am   
 
Mine wasn't a straight conversion - it was all manual. Therefore, I didn't have .mud file to send. I use compatibility report to sort of throw things my way that I may have overlooked. Like the #PRI commands I missed earlier.

Charneus
Reply with quote
Rorso
Wizard


Joined: 14 Oct 2000
Posts: 1368

PostPosted: Wed Jul 16, 2008 8:12 am   
 
When testing this I found that the problem is related to many statements separated by the semi-colon.
Code:

<alias name="makeTest" id="2">
  <value>#local $temp
#loop 1,2000 {
  $temp = %concat($temp, "a;")
}
#alias crashit {$temp}
#echo Test case generated. Please run compatibility report.</value>
</alias>


In Charneus script the offending alias is QHelp. If I do edit->Reformat the compatibility report doesn't crash afterwards.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Jul 16, 2008 11:12 am   
 
Thank you for the procedure Rorso. I am seeing the crash with my test app and the pattern I wrote for doing %nn stuff.
I am pretty much out of time this morning so I will work on improving the regex as soon as possible.
I can probably adjust some of the quantifiers to make it greedier and more able to lock things in properly.
As it stands now it appears that any really long line can cause the crash. For those that care this is the regex
Code:
(?<=\n|\r|\A)(?<QH>(?>[^\042\n\r]|[\n\r](*FAIL)|(?<=\176)\042)*(?<!\176)\042(?>[^\042\045\n\r]|[\n\r](*FAIL)|(?<=\176)[\042\045]|\045(?!\{?[tx-]?\d+\}?))*(?:\042(?&QH))?)\045\{?[tx-]?\d+\}?[^\n\r]*


I guess I may also try to come up with a way to trap the stack overflow in the dll, and return an out of memory error. This would help to protect the user from some bad patterns.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Wed Jul 16, 2008 12:19 pm   
 
Hah! I can't believe that was the reason, but sure enough, it was... I thought I had gone through and reformatted all of the aliases/triggers and whatnots. Guess I still missed some. :P Thanks, Rorso! And thanks, Vijilante, for looking into this. :P

Charneus
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Jul 16, 2008 5:52 pm   
 
I found the problem. It works fine in CMUDPro. But not in CMUD. I'm glad Vijilante posted about the PCRE stuff because I would have never found this otherwise.

The problem was with the stack size build option for CMUD. In Delphi 2007, there are different "build configurations". For example, "Release", "Debug", etc. When I'm testing here, I build stuff with the "Debug" configuration to trap memory leaks, etc. The versions built for everyone else is the "Release" version.

Well, it turns out that Delphi 2007 has different stack size options for each different build configuration. In CMUDPro, *both* Release and Debug had a stack size of $00800000. But in regular CMUD, the stack size for Debug was $00800000 but the stack size for Release was just $00100000.

So, I have fixed this for v2.32 so that CMUD will have the proper stack size. When tested on this stack size, I don't get any crashes with the current regular expressions.
Reply with quote
Zhiroc
Adept


Joined: 04 Feb 2005
Posts: 246

PostPosted: Thu Jul 17, 2008 12:31 am   
 
Unfortunately, I'm having the same problem in 2.32. I had done a clean uninstall, and install of 2.30 yesterday or so, and just installed 2.32 on top of this.

I specified a .mud file for the package name. It converted it, and I got the access violation when trying to look at the compatibility report.

Opening the session online, and then trying to open the PE on the converted .pkg file hangs CMUD. What was displayed before the hang showed a couple classes repeated l5-10 times, and at the root level (i.e., not children of the .mud package).

If you want the .mud file, I can send it.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Thu Jul 17, 2008 1:22 am   
 
Zhiroc, your problem sounds like a conversion error. I would suggest sending a copy to Zugg.

It is good to hear the stack size is bumped up, that should take care of immediate problems with the compatibility report.
I will probably still run some further tests on the regex to see if I can improve it. I didn't quite like the speed numbers I was
seeing while replicating the crash procedure.

Also it is important to note that last time I checked threads use a 1MB stack size in CMud. Since most user scripts are run in a
thread other then the main thread it is very possible for a user to cause such a crash. I am going to have to spend some more
time seeing if I can plug it once and for all. Hopefully I can find some C standard functions that get me details on the stack size,
and then I can put in some code to return an out of memory that I could reasonably submit to the author of the PCRE.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Thu Jul 17, 2008 2:14 am   
 
Zhiroc: Definitely send me the *.MUD file that causes the hang to sales@zuggsoft.com.

Vijilante: Remember that CMUD doesn't actually use threads unless it is necessary. The command line uses a thread (so that ESC can be used to abort it), but other scripts, like triggers, only use a thread if the script uses the #WAITxxx or other thread commands.

So for trigger matching, threads are not as common as you might think.

I tried to do some testing of methods to catch the stack overflow that was happening. Unfortunately, once the stack has overflowed, you're pretty much screwed. Can't call anything or do anything. The only way to really fix it would be to create a recursion "counter" in the PCRE source and allow a limit to be specified to control the recursion. Since Delphi actually stores the stack on the heap, I'm not sure sure the traditional C stack size routines are going to return the correct info or not. Maybe since PCRE is written in C it will be ok.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Thu Jul 17, 2008 9:24 pm   
 
I think I finished tweaking around on the regex. I probably went a bit over with the possesiveness, but it seems to match all the lines it should and fail all the lines it should. It also is quite happy with a %repeat("a",20000) test in a 1Mb stack Very Happy.
Code:
(?<=\n|\r|\A)(?<QH>(?>[^\042\n\r]++|[\n\r]+(*FAIL)|(?<=\176)\042)*(?<!\176)\042(?>[^\042\045\n\r]+|[\n\r]+(*FAIL)|(?<=\176)[\042\045]|\045(?!\{?[tx-]?\d+\}?))*(?:\042(?&QH))?)\045\{?[tx-]?\d+\}?[^\n\r]*

As ussual appropiate changes for the %i..%n test.

I would also like to suggest adding a few other things to the Compatibility Report.
1. ~ within quotes now has no special meaning; I will write the regex based on the above working one
2. #SEND changed, please see help #SEND, #SENDRAW; regex is pretty basic
3. #FUNCTION command changed to #VARFUNC; regex is "#FU(N(C(T(I(O(N)?)?)?)?)?)?"
4. Functions have been expanded, see help #FUNCTION; regex would be applied to variables and would be "^(?:%|@)", this is mostly a pointer for incoming users

I will still aim at getting something into the dll to permenantly stop this kind of crash. I don't actually use any regexes quite that complex in my scripts, but some are rather close.
Being just a little off should not cause crashes like that.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Thu Jul 17, 2008 9:36 pm   
 
Thanks Vijilante! I'll get that new regex into the next version and will consider some of the other suggestions.
I think I also need to improve the regular expression that looks for the old [] immediate expansion syntax and handle ~ characters before the brackets.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Thu Jul 17, 2008 10:20 pm   
 
Hrm, the [] evaluation might be easier then the <> expansion. I think for the [] all that is really needed is to check for a
tilde before the openining (?<!\176) and then make sure the close is on the same line. That makes the regex this "(?<!\176)[[^\n\r];]*]".
If anyone thinks it needs more detail speak up.

The immediate expansion is much harder because it needs to know a lot more about what is around it. Consider the text
"#IF ((a<b) && (b>c))" we don't want that to match the <> pattern. We also don't want anything in an #MXP command to match, but #SAY, #SHOW, #ECHO, and thier
prompt versions should match when the is no preceding tilde. I am not sure it can be done with a straight regex, but I will think about it.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Fri Jul 18, 2008 3:07 am   
 
OK, thanks for the regex. I'm actually not as worried about the < > syntax because it wasn't used nearly as much as the [ ] syntax.
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