|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: 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
5. Enter at the command line
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 |
|
|
|
intoK Apprentice
Joined: 18 Feb 2007 Posts: 190
|
Posted: 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! |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: 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 |
|
|
|
intoK Apprentice
Joined: 18 Feb 2007 Posts: 190
|
Posted: Fri Oct 24, 2008 12:34 pm |
hmm, i wouldnt be so sure thats the same one tho
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Fri Oct 24, 2008 5:23 pm |
I added this to the bug list.
|
|
|
|
|
|