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
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Oct 24, 2008 11:55 am   

[2.36] AV from #C+ looping
 
Edit: Ignore basically everything in this post and jump down to a later one which has the proper procedure and diagnosis.


When a trigger with a priority in between the states of multistate trigger has the stop flag it causes an unhandled AV.

Procedure
1. Launch CMud
2. Close Sessions window (ESC)
3. Enter at the command line
Code:
#WIN test;#MODULE test;#TRIGGER "midpri" {*} {} "" {stop};#CALL %priority("midpri","trigger",45)
#MODULE x;#TRIGGER {v} {#C+ test};#COND {z} {#C-}

4. Enter at the command line
Code:
#SHOW v;#SHOW z

5. Enter at the command line
Code:
#SHOW v;#SHOW z


Having the script debugger open changes the reported addresses for the AV, but its outputs when opened as step 3a are useful.
Code:
c  untitled |  [1] untitled Comline : start :
a  untitled |v
l  untitled |    Trigger "v" compiled (Pattern) : v
f  untitled |    Pattern: v
l  untitled |    Trigger "v" compiled (Normal) : #C+ test
c  untitled |    exec : Pattern "v" : #C+ test
a  untitled |Capture text ON
h  untitled |<ESC>[1SCapture text ON<ESC>[0m
l  untitled |    Trigger "" compiled (Pattern) : z
a  untitled |z
a      test |z
f      test |    Pattern: z
l      test |    Trigger "" compiled (Normal) : #C-
c      test |    exec : Pattern "" : #C-
a      test |Capture text OFF
h      test |<ESC>[1SCapture text OFF<ESC>[0m
l      test |    Trigger "midpri" compiled (Pattern) : *
f      test |    Pattern: *
f      test |    Pattern: *
d  untitled |  [1] untitled Comline : stopped
Here we see the "z" substate pattern compiled by the untitled window, then its script is compiled and executed in the test window. However the priority value for that substate is 50 and should not have been matched within the test window. Its match should have occurred in the untitled window.

Keeping the script debugger window for step 5 indicates that the "z" gets displayed in the test window over 1000 times. The particular strange loop that is created by this combination is ultimate cause of the crash.
_________________
The only good questions are the ones we have never answered before.
Search the Forums

Last edited by Vijilante on Fri Oct 24, 2008 12:24 pm; edited 1 time in total
Reply with quote
intoK
Apprentice


Joined: 18 Feb 2007
Posts: 190

PostPosted: Fri Oct 24, 2008 12:09 pm   
 
not quite, this will crash as well
#WIN test;#MODULE test;#MODULE x;#TRIGGER {v} {#C+ test};#COND {z} {#C-}
at second v
it that module setting bleed i posted about isolated, good job!
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Oct 24, 2008 12:23 pm   
 
Wow, thanks intoK. That got the right thought in my head and I narrowed the bug down even further. The topic title will be changed to reflect this.

Procedure
1. Launch CMud
2. Close Sessions window (ESC)
3. Enter at the command line
Code:
#C+ untitled;#SHOW crash


With this new procedure we see that the actual problem is that a window should not be able to direct a capture to itself with #C+.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
intoK
Apprentice


Joined: 18 Feb 2007
Posts: 190

PostPosted: Fri Oct 24, 2008 12:34 pm   
 
hmm, i wouldnt be so sure thats the same one tho
Reply with quote
Zugg
MASTER


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

PostPosted: Fri Oct 24, 2008 5:23 pm   
 
I added this to the bug list.
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