|
geniusclown Magician
Joined: 23 Apr 2003 Posts: 358 Location: USA
|
Posted: Sun Oct 02, 2011 1:27 pm
CMUD Locking up |
I am having a problem with CMUD locking up at random intervals again. Last time I had this particular issue, it took a month to track it down, and it turned out that an expression variable was firing when it shouldn't have been and the fix was to use an #IF command at the beginning of said trigger to verify that the expressions were true. To be very specific, here is the "fixed" code:
Code: |
<trigger name="queueTick" type="Expression" priority="5" trigontrig="false" newline="false" id="35">
<pattern>@rt=0 and (@queue or @loop)</pattern>
<value>#SECTION queueTick {
#IF (%numitems(@/core/queue/queue) or %numitems(@/core/queue/loop)) {
#T- queueTick
#IF (@/core/queue/queue) {
/core/queue/queueExec=%pop(queue)
} {
/core/queue/queueExec=%item(@/core/queue/loop,1)
/core/queue/loop=%additem(%pop(/core/queue/loop),@/core/queue/loop)
}
#EXEC %replace(@/core/queue/queueExec," noRt","")
#T+ queueTock
#IF (%ends(@/core/queue/queueExec," noRt")) {
/Core/queue/noRt=1
#ALARM +.05 {rt} Core/queue
} {
/Core/queue/noRt=0
}
}}</value>
</trigger> |
The problem was that both of the variables @queue and @loop were empty, but the trigger fired anyway (notice the expression trigger looks for (@loop or @queue), so should only fire if there's something in one or the other) and later in the code would %additem(%pop(loop),@loop), which is fine when there's something in loop - it just takes the first item of the list and moves it to the end... but if @loop is empty, then it tries to %pop nothing out and add it to the end of nothing, yielding an infinite "CONCAT needs two arguments" loop, which was almost always unseen because CMUD would just freeze without giving any error message.
In the process of tracking this particular bug, I created the following trigger:
Code: |
<trigger name="loopanomoly" type="Expression" priority="6710" trigontrig="false" id="542">
<pattern>%numitems(@loop)=1 and %len(@loop)=0</pattern>
<value>#ECHO loopanamoly detected... correcting
#WAIT 250
#IF (%numitems(@loop)=1 and @loop="") {
loop=""
#T- queueTock
#T+ queueTick
}</value>
</trigger> |
This trigger has been firing on occasion recently. It shouldn't be possible for this to fire, but it does anyway... how can a string list have an item in it but have zero length?
Anyway, a couple times yesterday, and twice already this morning (in under half an hour), CMUD locked up like it used to, so I assume it's getting stuck in one of these infinite loops - but not the one described above, as every lockup has occurred when I have several items in @loop.
So, here's my big question: how can I determine what (if anything) is going into an infinite loop? The Tools>Script Debugger is very difficult to use because if I turn off any one setting, it stops tracking entirely (which means my scripts that are working fine spam so much that it's very difficult to see when something is awry), and even if I do have the Script Debugger open when this error occurs, it simply freezes like the rest of the program and I don't get any useful information from it.
I have poured through my code looking for other expression triggers that would crash if fired without the appropriate variables (like the earlier problem did), but couldn't find anything. I have a total of 13 expression triggers in my package, and 8 of them are disabled by default (enabled by other scripts then disable themselves when fired). The remaining 5 include the offensive trigger described above, and the other four don't look like they could cause this particular problem.
Tough problem, I know, but any help would be appreciated. |
|
_________________ .geniusclown |
|
|
|
geniusclown Magician
Joined: 23 Apr 2003 Posts: 358 Location: USA
|
Posted: Mon Oct 03, 2011 9:16 pm |
[sarcasm]I just love when I get this:
Quote: |
ERROR: Operator NEQ requires two arguments
ERROR: Operator unrecognized function requires two arguments
ERROR: Operator alarm pattern expected requires two arguments
ERROR: Operator unrecognized function requires two arguments
ERROR: Operator expression not allowed here requires two arguments |
[/sarcasm]
What the heck is NEQ? If the system doesn't recognize a function, how can it require two arguments? Is "alarm pattern expected" the name of an operator? How about "expression not allowed here"? If it is the name of an operation, what two arguments could it possibly need?
It would be exceptionally helpful if there was a way to set these error messages to show the line of code causing them. Anything? |
|
_________________ .geniusclown |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Mon Oct 03, 2011 9:53 pm |
Try to note what line you receive when this happens and then look at all the scripts related to any line of input/output 2-3 lines before and after that.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
geniusclown Magician
Joined: 23 Apr 2003 Posts: 358 Location: USA
|
Posted: Thu Oct 20, 2011 5:15 pm |
I'm continuing to experience this same problem. It's intermittant, which makes it very difficult to track down, and the lockup tends to be where CMUD just stops responding. The error I quoted earlier is baffling, and I'd still like to know what it means. Specifically, what is NEQ? Additionally, I've been getting the following errors scrolling down the page locking up the program:
Quote: |
ERROR: Operator AND requires two arguments
ERROR: Operator Binaryint requires two arguments
ERROR: Operator STRMARK requires two arguments |
SO, what's STRMARK?
I'm also looking for a response to the other question: how is it possible for %len(@queue)=0 and %numitems(@queue)=1? This seems to be faulty logic to me. If one expression trigger is firing on this, how do I track down any other triggers that are firing on faulty logic?
On a related note, the Script Debugger window doesn't seem to work correctly, or I completely misunderstand its purpose. If I deselect anything in the tree view of the script debugger, it stops reporting entirely. Specifically, when I uncheck the box next to the class "Core" (which activates a series of scripts to update the Status Window every second making it hard to see other stuff being reported), the window just stops reporting, whether variables change or triggers fire in classes besides Core. The program doesn't lock up or anything, and if I reselect the same checkbox, it starts reporting everything again. |
|
_________________ .geniusclown |
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Thu Oct 20, 2011 6:30 pm |
geniusclown wrote: |
SO, what's STRMARK? |
What you are seeing with that and the AND, NEQ, CONCAT etc is the internal workings of Delphi, they are the functions that are ultimately getting called when the zScript engine does it work. Exactly as you have said they are pointing to something odd going wrong in your scripts, like trying to use concat with only one string.
geniusclown wrote: |
how is it possible for %len(@queue)=0 and %numitems(@queue)=1? This seems to be faulty logic to me. |
It also seems faulty to me though I guess it is possible that something like a string terminator of \0 is getting left in the list which has a zero length but could be causing the list to have an item. I'm not saying that is happening just an odd possibility that could explain it. |
|
_________________ Taz :) |
|
|
|
geniusclown Magician
Joined: 23 Apr 2003 Posts: 358 Location: USA
|
Posted: Thu Oct 20, 2011 6:58 pm |
Thanks for the references. I'm completely ignorant of Delphi - I only know that it's a machine language that other languages are built on, but that's the limit of it. Is there any way to get CMUD to report what's going on with CMUD whenever these errors occur? I certainly do consider what scripts could be firing when these errors occur, but there are just too many possibilities to narrow the field down. And since I can't replicate the error, I don't have the option of turning off this class or that just to track the bug - if I disable the any of classes that I suspect are the cause, then none of my other scripts will work and I can't just keep playing as normal until I get an error or not. Even if I could get by with these suspect classes disabled, since the errors are so sporadic I won't know if it's solved or not. Sometimes I'll go days (ready many, many hours of running the scripts) without a lockup.
|
|
_________________ .geniusclown |
|
|
|
geniusclown Magician
Joined: 23 Apr 2003 Posts: 358 Location: USA
|
Posted: Thu Oct 20, 2011 7:45 pm |
I'm just having all sorts of issues this morning. Here's one that I've seen three times (does not crash the program):
Quote: |
loopanomaly detected... correcting
ERROR: Operator command expected requires two arguments
ERROR: Operator unrecognized function requires two arguments
ERROR: Operator alarm pattern expected requires two arguments
ERROR: Operator unrecognized function requires two arguments
ERROR: Operator INT64MARK requires two arguments
ERROR: Operator command expected requires two arguments |
The first line "loopanamoly detected... correcting" is from my trigger that catches the illogical %len(@loop)=0 and %numitems(@loop)=1. The bit of code that reacts badly to this anomaly of logic (in the first message of this thread) starts by checking to see if there's actually something in the @loop before executing the code. But I think this is the same issue. |
|
_________________ .geniusclown |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Thu Oct 20, 2011 8:20 pm |
I'm not sure you can trust %len on a stringlist. Since the structure of stringlists has changed from Zmud, it may be that %len does not work consistently on them. But I don't know whether that's the cause of your discrepancy. You need to be somewhat cautious when you treat a stringlist as a pure string; they aren't really the same.
As for your original problem, did you verify that @loop and @queue were actually pointing to @/core/queue/loop and @/core/queue/queue? If you had a spurious variable laying around, that could explain why the trigger fired when you thought it shouldn't. |
|
|
|
geniusclown Magician
Joined: 23 Apr 2003 Posts: 358 Location: USA
|
Posted: Thu Oct 20, 2011 8:34 pm |
That would make sense, and I've already adjusted all of the scripts that manipulate these variables to point specifically at the /core/queue/ class. When things start to go wonky, one of the first things I look for is extra variables by the same name, and I haven't had an extra @queue or @loop since I made those changes a couple months ago.
As for not trusting %len... The only trigger that uses %len is the one that catches the anomaly. The expression trigger that's supposed to fire has a value of "@rt and (@loop or @queue)", and fires even when both @loop and @queue are empty. The %len is actually more reliable than %numitems or just having the variable in the expression trigger's value. In fact now that I'm thinking about this, I'm going to adjust the trigger to look for the length of the variable rather than its value. |
|
_________________ .geniusclown |
|
|
|
geniusclown Magician
Joined: 23 Apr 2003 Posts: 358 Location: USA
|
Posted: Thu Oct 20, 2011 8:35 pm |
Heh. Made the adjustment, and CMUD immediately locked up. So using %len in the trigger isn't the solution.
|
|
_________________ .geniusclown |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Fri Oct 21, 2011 1:59 pm |
You are still using @loop and @queue in your trigger pattern instead of @/core/queue/loop and @/core/queue/queue, but if you've checked for the existence of duplicate variables then that isn't your problem.
I do see a problem with your trigger logic. If @loop and @queue both equalled {0}, your trigger pattern would evaluate to FALSE even though both variables had an item. However, it looks like the values being added to the variables should never be 0, that should not be a problem. In any case, your current problem is the trigger firing when not expected, instead of not firing when expected.
Ah! Now I think I see a problem that could be causing your symptoms. You are using an expression trigger on certain variables, and then changing those variables. The trigger will be tested every time one of the variables is changed, and fire if the pattern tests TRUE. The freshly fired trigger will wait for the current execution to finish before starting execution. This should work, but as your code is currently written, you can sometimes change one of the variables twice. You use the #SECTION command, which I think may cause this code to execute in a separate thread from the command line. I wonder whether this would cause the trigger to be tested twice, as you change the variable twice. If it does, you could end up with a backlog of fired triggers waiting for the , some of which will try to execute after the loops are emptied. If this is what is happening, the trigger fired while the @queue and @loop had items, but sometimes don't execute until they don't. |
|
|
|
geniusclown Magician
Joined: 23 Apr 2003 Posts: 358 Location: USA
|
Posted: Fri Oct 21, 2011 8:42 pm |
Thank you very much for examining my code. I'm very frustrated with these frequent
I put the #SECTION command in there to prevent this. I thought by assigning it as a section, it would execute the entire block before doing anything else, preventing unexpected tampering with the variables involved while executing. I didn't realize that it would create any sort of backlog stack.
Notice that the first thing the script actually does is turn itself off (Line 3, after #SECTION and #IF). I've adjusted the script so it turns itself off in the very first line, which required an extra line at the end. I've also adjusted how it handles the looping string. Here's the tweaked setting:
Code: |
<trigger name="queueTick" type="Expression" priority="5" trigontrig="false" newline="false" enabled="false" id="35">
<pattern>@rt=0 and (@queue or @loop)</pattern>
<value>#T- queueTick
#SECTION queueTick {
#IF (%numitems(@/core/queue/queue) or %numitems(@/core/queue/loop)) {
#IF (@/core/queue/queue) {
/core/queue/queueExec=%pop(queue)
} {
/core/queue/queueExec=%pop(/core/queue/loop)
/core/queue/loop=%additem(@queueExec,@/core/queue/loop)
}
#EXEC %replace(@/core/queue/queueExec," noRt","")
#T+ queueTock
#IF (%ends(@/core/queue/queueExec," noRt")) {
/Core/queue/noRt=1
#ALARM +.05 {rt} Core/queue
} {
/Core/queue/noRt=0
}
} {#T+ queueTick}
}</value>
</trigger> |
I'm still not certain that this setting is the culprit, but it's the most likely.
Any comment on the Script Debugger? Any reason unchecking a class stops reporting for the entire package? |
|
_________________ .geniusclown |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Sat Oct 22, 2011 1:04 pm |
What the #SECTION command does is prevent any other #SECTION with the same name from executing at the same time. This is to prevent separate threads from interfering by changing the same variables at the same time; those other threads have to wait to execute that section until the running section finishes. But it does not prevent any other thread which does not have a section with the same name from running. The test for whether a variable used in an expression trigger has changed occurs in the main thread, and does not happen in a named section. If this code were not in a #SECTION, it would run in the main thread, and the test would perforce occur after the entire trigger was finished--you would not have this particular problem (but might have other problems if you have other threads trying to change these variables). The main thread continously runs through a loop of activities, such as parsing input from the mud, checking and executing commands from the command line, checking alarms, and checking for changed variables used in expression triggers. What I thought was happening is that your script (running in a separate thread) changes one of the variables twice, and there is a small probability that the main thread happens to check the variables during the small interval between the two changes. When it does, it tests the expression and fires the trigger and starts executing, but then has to wait until the already running #SECTION finishes. Then the variable changes the second time and the trigger is fired again sometime later.
However, you just pointed out that you use #T- to turn off the trigger, before the variables are changed. I think that should prevent this scenario from happening. So, I'm at a loss again. It still sounds like some kind of obscure thread interference, but I can't see what it could be. |
|
|
|
geniusclown Magician
Joined: 23 Apr 2003 Posts: 358 Location: USA
|
Posted: Sat Oct 22, 2011 1:50 pm |
So what you're saying is that the inclusion of the #SECTION does absolutely nothing if there is not another setting with #SECTION using the same name? I thought it protected any of the settings that are referenced in the #SECTION.
Even after the changes outlined above, I'm still getting the occasional lockup. The only other script that is (almost?) always running when I get a lockup is my timer script. Perhaps this is the culprit? (this is a lot less than it looks at first glance - each setting is just a few lines)
Code: |
<class name="roundtimer" id="2">
<button type="Gauge" autosize="false" width="80" height="15" toolbar="2" toolstyle="true" color="red" textcolor="white" gaugelowcol="None" priority="11" id="3">
<caption>RT: %switch(@stunned,"STUNNED!",@busy,"Busy...",1,%leftback(%int(@/core/roundtimer/rt+900),3))%if(@corepulse,,)</caption>
<value>rt</value>
<expr>@rt</expr>
<gaugemax>@rtm</gaugemax>
</button>
<var name="rt" type="Integer" usedef="true" id="4">
<value>0</value>
<default>0</default>
</var>
<var name="rtm" type="Integer" usedef="true" id="5">
<value>20000</value>
<default>1</default>
</var>
<trigger name="rtDetect" type="Expression" priority="4" newline="false" id="6">
<pattern>@/core/roundtimer/rt>0 and !%trigger(rtCount) and @CorePulse</pattern>
<value>#SECTION rtDetect {
#T+ /core/roundtimer/rtCount
}</value>
</trigger>
<trigger priority="300" id="7">
<pattern>Roundtime{:|}%s(%n) sec</pattern>
<value>/core/roundtimer/rtEnd=@timecode+%1*1000-@/core/roundtimer/lag
/core/roundtimer/rt=%1*1000
/core/roundtimer/rtm=%1*1000</value>
</trigger>
<var name="lag" type="Integer" id="8">250</var>
<var name="rtEnd" usedef="true" id="9">
<value>1932014828</value>
<default>0</default>
</var>
<alias name="rt" id="10">
<value>/core/roundtimer/rtEnd=@timecode+250
/core/roundtimer/rt=@/core/roundtimer/rt+250
/core/queue/queueExec=""</value>
</alias>
<trigger priority="9630" id="11">
<pattern>^...wait (%n) seconds.</pattern>
<value>pq %lastcom%if(@noRt," noRt")
/core/queue/queueExec=""
/core/roundtimer/rtEnd=@timecode+%1*1000
/core/roundtimer/rt=%1*1000
#IF (%inwalk) {#STOP;#T+ ContinuePath}</value>
</trigger>
<var name="rtIncrement" type="Float" id="12">0.3</var>
<trigger name="rtCount" type="Alarm" priority="5" trigontrig="false" newline="false" id="13">
<pattern>@/core/roundtimer/rtIncrement</pattern>
<value>#SECTION rtCount {
/core/roundtimer/rt=@/core/roundtimer/rtEnd-@timecode
#IF (@/core/roundtimer/rt<0) {
/core/roundtimer/rt=0
#T- /core/roundtimer/rtCount
}
}</value>
</trigger>
</class>
<var name="timecode" type="String" id="1198">%eval(%time(d)*86400000+%time(h)*3600000+%time(n)*60000+%time(s)*1000+%time(z))</var> |
I don't see anything in here that could be causing an infinite loop, but as I said, it's running almost all of the time and includes expression triggers, so is a likely problem. |
|
_________________ .geniusclown |
|
|
|
geniusclown Magician
Joined: 23 Apr 2003 Posts: 358 Location: USA
|
Posted: Sun Oct 23, 2011 7:08 pm |
Here's an interesting one:
Quote: |
ERROR: argument still on stack: wear cane noRt|get stick noRt|stow stick noRt|rem cane noRt|<font calibri 9> Spellq: (bolt 5) Prepping: Targetting: Buffs: Consume: <color cyan> hunt|wear cane noRt|get stick noRt Quarter Staff: 2 34|0|17|34|0|20|23|0|5|6|9|0|14|16|34|1|8|5|2|9|0|0|0|1|34|0|0|2|13|0|0|8|0|0|5|4
ERROR: Operator OR requires two arguments
ERROR: Operator command expected requires two arguments |
I've been noticing my Status Window blank out or show strange stuff (such as a list of numbers like in this error message) on occasion, and think it may be connected to this lockup issue. But since the strangeness only occurs for a very brief moment or at the time of lockup, I can never see what's happening to cause it. This is the first time I've gotten this error message and I think it's a big clue - maybe even the solution to this problem!
The first part "wear cane noRt|get stick noRt|stow stick noRt|rem cane noRt|" looks to be from an alias named "q":
Code: |
<alias name="q" id="29">
<value>#IF (%1) {#IF (@/core/queue/queue) {/core/queue/queue=%concat(@/core/queue/queue,|,%-1)} {/core/queue/queue=%-1}} {/core/queue/queue="";#IF (!@rt) {rt}}</value>
</alias> |
As you can see, this uses an unconventional way to add items to a list - this is because I may add several items at once, and I wanted to eliminate the need for looping because this alias is used very frequently by a lot of different scripts, so was a potential problem - by crunching the items into a single line with no need for a loop, I was hoping to avoid any conflicts. However, I think the problem may be caused by the logical fallacy mentioned way above, where the system sometimes reports that a list string has a value (at least one item) even when it is null. If this is happening here, it would be the cause for the frequent %concat errors. I have a couple ways of tweaking this, and I'll see if either works.
Beyond that in the error message, from "<font calibri 9>" all the way to "get stick noRt" looks like part of my Status Window.
"Quarter Staff:" is the beginning of the caption on the first of many buttons in a separate Class. The list of numbers is from the same class as the buttons, but isn't actually displayed on the buttons (they dictate the level of the gauges). However, those numbers did trip another trigger that created the list of commands that seems to be at offense right now. That is to say, because of an expression trigger not quoted anywhere in this thread, the numbers in that string first called the alias "q" which added "wear cane noRt|get stick noRt" to @queue, then immediately triggered again to add "stow stick noRt|rem cane noRt". This seems to be where the problem occurred. |
|
_________________ .geniusclown |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Mon Oct 24, 2011 2:11 am |
Aha...you have a potential thread interference here. You have that other code where you change the value of @queue surrounded by #SECTION, but you don't have this code in a #SECTION. That means these two pieces of code could be running at the same time, and the value of @queue could change between the time that you test the value of @queue and the time you go to use it within the same code.
As I indicated before, #SECTION does not automatically protect the variables within that piece of code. It merely provides a mechanism for such protection. If you have different pieces of code which might be running at the same time in separate threads changing the value of the same global variables, you need to put all those pieces of code into a #SECTION with the same name. Try not to put more code within #SECTION than is necessary, to avoid blocking other threads more than you need to.
Before doing this, tell me: do any sections of code manipulating @queue actually need to be in a separate thread? If they don't, then the easiest solution is to not use any thread commands in those scripts. Right now, your #SECTION command is putting that one script into a separate thread. If all of your other code manipulating @queue is running in the main thread, just take out the #SECTION command completely. |
|
|
|
geniusclown Magician
Joined: 23 Apr 2003 Posts: 358 Location: USA
|
Posted: Mon Oct 24, 2011 7:33 pm |
I'm not quite sure whether or not I need separate threads but I don't think so. I'm not formally trained in programming, and I'm not entirely clear on how threads work but I'm slowly piecing them together. Maybe I'm sewing them together. With thread. At any rate, I've removed from my package every instance of #SECTION until I learn to use them responsibly. They only existed in my core scripts, which are the ones in question, with the purpose of preventing this error.
I just did a search for "queue=" and there are only 6 settings that directly assign a value to @queue (not including a couple #ADD/DELITEM commands). Three are pattern triggers which are definitely not the problem. The other three settings are aliases that I use all the time and are called by many many other scripts. The one used most frequently is the alias "q", which I've brought under the proverbial microscope.
After the error yesterday (described in my post above), I changed the alias from this:
Code: |
<alias name="q" id="29">
<value>#IF (%1) {#IF (@/core/queue/queue) {/core/queue/queue=%concat(@/core/queue/queue,|,%-1)} {/core/queue/queue=%-1}} {/core/queue/queue="";#IF (!@rt) {rt}}</value>
</alias> |
to this:
Code: |
<alias name="q" id="29">
<value>#IF (%1) {#IF %len(@/core/queue/queue) {/core/queue/queue=%concat(@/core/queue/queue,|,%-1)} {/core/queue/queue=%-1}} {/core/queue/queue="";#IF (!@rt) {rt}}</value>
</alias> |
...and I haven't had any unexplained errors or lockups since. Not proof positive as I've gone many hours without lockups recently, but I usually get some random errors. Whodathunkit? |
|
_________________ .geniusclown |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Mon Oct 24, 2011 8:26 pm |
If you aren't using #THREAD, #WAIT, #WAITFOR, #WAITSIGNAL, or #WAITTHREAD, then you aren't using threads and don't need #SECTION. All your #SECTION would be doing in that case is creating a thread you don't need, and exposing you to potential thread problems. If you don't need to use those commands, then it is always safest to avoid threads entirely. Threads can cause lots of subtle problems that are hard to debug.
I strongly suspect that most of your problems, including the apparent firing of triggers and #IFs when you think the variables are empty, were caused by creating a separate thread for that trigger and the consequent thread collisions.
It sounds like you have it working, which is great! If it becomes a problem again, let us know. |
|
|
|
geniusclown Magician
Joined: 23 Apr 2003 Posts: 358 Location: USA
|
Posted: Fri Oct 28, 2011 1:12 pm |
The problem is persisting. I went for quite a while with no indication that there was any problem with the scripts, but now I'm getting locked up again... I'm open to new suggestions.
|
|
_________________ .geniusclown |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Sun Oct 30, 2011 3:16 pm |
The only new idea I have off the top of my head is that perhaps the lockup is in a different section of code. You were only assuming that the recent lockups were in this code because you had had a problem with it before.
|
|
|
|
geniusclown Magician
Joined: 23 Apr 2003 Posts: 358 Location: USA
|
Posted: Sun Oct 30, 2011 4:21 pm |
I was not assuming that only because I had a problem with it before, though that's a primary reason. I've also narrowed down the problem by disabling non-essential classes, and the Core class is the only one that's been active every single time CMUD has locked up.
If I could understand what's up with the Script Debugger, I think it would go a long way to continue narrowing down, but no one seems to have any input on why the Script Debugger's class filter doesn't work. Oh, well. I'll keep trying little bits until it stops locking up. |
|
_________________ .geniusclown |
|
|
|
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Mon Oct 31, 2011 5:18 am |
There seems to be an issue with that XML. Anyone else able to import that class above? I get an error on line 51 stating invalid XML name.
|
|
|
|
geniusclown Magician
Joined: 23 Apr 2003 Posts: 358 Location: USA
|
Posted: Wed Nov 02, 2011 5:05 pm |
I'm not entirely sure how the < got in there when I think I copied and pasted from the XML tab. The error you're getting is because in XML the < symbol means the beginning of a tag, but I mean it to be the logical qualifier of less than, which in XML code is replaced with <
Here's the adjustment, also including other changes I've made to the script:
Code: |
<class name="roundtimer" id="2">
<button type="Gauge" autosize="false" width="80" height="15" toolbar="2" toolstyle="true" color="red" textcolor="white" gaugelowcol="None" priority="11" id="3">
<caption>RT: %switch(@stunned,"STUNNED!",@busy,"Busy...",1,%leftback(%int(@/core/roundtimer/rt+900),3))%if(@corepulse,,)</caption>
<value>rt</value>
<expr>@rt</expr>
<gaugemax>@rtm</gaugemax>
</button>
<var name="rt" type="Integer" usedef="true" id="4">
<value>0</value>
<default>0</default>
</var>
<var name="rtm" type="Integer" usedef="true" id="5">
<value>1</value>
<default>1</default>
</var>
<trigger name="rtDetect" type="Expression" priority="4" newline="false" id="6">
<pattern>@/core/roundtimer/rt>0 and !%trigger(rtCount) and @CorePulse</pattern>
<value>#T+ /core/roundtimer/rtCount</value>
</trigger>
<trigger priority="300" id="7">
<pattern>^~[Round Time: (%n)~]</pattern>
<value>/core/roundtimer/rtEnd=@timecode+%1*1000-@/core/roundtimer/lag
/core/roundtimer/rt=%1*1000
/core/roundtimer/rtm=%1*1000</value>
</trigger>
<var name="lag" type="Integer" id="8">250</var>
<var name="rtEnd" usedef="true" id="9">
<value>0</value>
<default>0</default>
</var>
<alias name="rt" id="10">
<value>/core/roundtimer/rtEnd=@timecode+250
/core/roundtimer/rt=@/core/roundtimer/rt+250
/core/queue/queueExec=""</value>
</alias>
<trigger priority="9630" id="11">
<pattern>^...wait (%n) seconds.</pattern>
<value>pq %lastcom%if(@noRt," noRt")
/core/queue/queueExec=""
/core/roundtimer/rtEnd=@timecode+%1*1000
/core/roundtimer/rt=%1*1000
#IF (%inwalk) {#STOP;#T+ ContinuePath}</value>
</trigger>
<var name="rtIncrement" type="Float" id="12">0.3</var>
<trigger name="rtCount" type="Alarm" priority="5" trigontrig="false" newline="false" enabled="false" id="13">
<pattern>@/core/roundtimer/rtIncrement</pattern>
<value>/core/roundtimer/rt=@/core/roundtimer/rtEnd-@timecode
#IF (@/core/roundtimer/rt<0) {
/core/roundtimer/rt=0
#T- /core/roundtimer/rtCount
}</value>
</trigger>
<trigger priority="300" id="1399">
<pattern>Roundtime{:|}%s(%n) sec</pattern>
<value>/core/roundtimer/rtEnd=@timecode+%1*1000-@/core/roundtimer/lag
/core/roundtimer/rt=%1*1000
/core/roundtimer/rtm=%1*1000</value>
</trigger>
</class> |
I really appreciate folks looking at my code... it's driving me batty trying to figure out where the error is coming from. |
|
_________________ .geniusclown |
|
|
|
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Thu Nov 03, 2011 3:43 am |
Yeah I found it. Change that less than symbol to "& lt;" without the space. For some reason, the code tags aren't working when it comes to this.
Then it will import fine. Also put spaces in your code geesh. Makes it hard to read it without them. |
|
|
|
|
|
|
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
|
|