Repeatable issue with SetVariable (holding back my dev)

Report any bugs here that you may have found in MainLobby
kicksome
Newbie
Newbie
Posts: 4
Joined: Thu Aug 24, 2006 5:09 pm
Contact:

Repeatable issue with SetVariable (holding back my dev)

Postby kicksome » Fri Nov 10, 2006 5:16 am

I'm running into a fairly serious error that is preventing my development of MLServeCMD Macros. The following MLServeCMD macro is issued:

MLServeCMD.Macro|
MLConditional|IsEqual##{{aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa}}##0##SetVariable|aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa~1##SetVariable|aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa~0##

It just takes a variable with a long variable name, and flips its value back and forth. This MLServeCMD Macro executes properly *almost* every time.

To demonstrate that there is an intermittent problem, we simply execute the above MLServeCMD many times within the same macro:

MLServeCMD.Macro|
MLConditional|IsEqual##{{aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa}}##0##SetVariable|aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa~1##SetVariable|aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa~0##
MLConditional|IsEqual##{{aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa}}##0##SetVariable|aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa~1##SetVariable|aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa~0##
MLConditional|IsEqual##{{aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa}}##0##SetVariable|aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa~1##SetVariable|aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa~0##
.
.
.

Repeating this at least 10 or more times in the macro will give you a sufficient occurance rate of the bug for observation.

Now, executing this macro with a button multiple times and watching the MLServer Events log, you will see an error occur every few times the button is pushed. The error I get is as follows:

Class=Error, Client=MLProcess via () SETVARIABLE, Description=Error# 9 - Subscript out of range raised by MLProcess via () SETVARIABLE

This problem seems to be related to SetVariable when used with longer variable names. It is repeatable even without Conditionalizing the sets. I first noticed it when i had buttons that set 5-10 variables at once, and were failing once in a while.

This problem is holding back my dev, and i would appreciate a comment asap... thanks

Kyle Parrington

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Postby CinemarDave » Fri Nov 10, 2006 9:53 pm

Kyle,

I've tested this in a command map with 100 MLConditionals and I cannot see this error. I am using MLServer 3.0.138. Are you doing this in a command map or is all this text in a button on a scene? Also what version of the server are you running. And, if possible post, or email me, the verbose MLServer log showing this error.

kicksome
Newbie
Newbie
Posts: 4
Joined: Thu Aug 24, 2006 5:09 pm
Contact:

Postby kicksome » Sun Nov 12, 2006 5:32 am

Hey,

Thanks for the quick response. This is not a command map, it is macro written in the MLServeCmd field of the button. Is the parsing for this text field not the same as for a command map? It seems buggy. I have noticed serveral irregularities with the parsing of this field, actually. Newlines are not handled properly and seem to replicate as the button is used. Macros of a certain size seem to cause large CPU usage.

As for your other questions - I am running version 3.0.138 of MLServer and 3.00.37 of the client. The verbose error is as stated in my previous post:

Class=Error, Client=MLProcess via () SETVARIABLE, Description=Error# 9 - Subscript out of range raised by MLProcess via () SETVARIABLE

Thanks for the help!

kylep

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Postby CinemarDave » Sun Nov 12, 2006 10:22 am

Thanks for the quick response. This is not a command map, it is macro written in the MLServeCmd field of the button. Is the parsing for this text field not the same as for a command map?

For the sake of efficiency macros of this size should be put into a command map. Not necessary but less traffic between the client and the server. There is only one central parsing routine regardless of how the command comes in.
It seems buggy.

Cannot discount the fact that there may still be a bug here or there but I would need some examples of cause and effect. If you see something that is buggy then show me the exact command you are trying to execute and the entire event log of what the server did during that time. That's the only way I can work on an issue.

I have noticed serveral irregularities with the parsing of this field, actually.

Examples?
Newlines are not handled properly and seem to replicate as the button is used.

Newlines are command terminators. They should not be embedded in a command.

Macros of a certain size seem to cause large CPU usage.

Absolutely. CPU utilization is directly proprotional to what you are asking the server to do.

As for the existing issue. Please post your entire MLServeCmd that you have assigned to the button. And then post the entire MLServer log that was a result of you pressing that button. Then I'll see what is going on.

kicksome
Newbie
Newbie
Posts: 4
Joined: Thu Aug 24, 2006 5:09 pm
Contact:

Postby kicksome » Sun Nov 12, 2006 2:47 pm

Ya, I can see that for command maps there would be less traffic between the client and server, because the command, in its entirety, need not be transferred from client to server. However, this bug relates MLServeCmd macros.

As for the newline thing, I am talking about multiple commands in a macro. Try it out, I haven't checked if it still happens in new versions.

The CPU utilization i am talking about regarding large MLServeCmds relates not to the runtime of a button press (when the server is involved) but during the *entry of the large amount of text*. (just the client) The button Edit window gets really slow and difficult to operate. Just try it out...

Finally, there's the issue that's affecting me... To replicate, paste the following into the MLServeCmd field of a button on the client:

MLServeCMD.Macro|
MLConditional|IsEqual##{{aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa}}##0##SetVariable|aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa~1##SetVariable|aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa~0##!
MLConditional|IsEqual##{{aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa}}##0##SetVariable|aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa~1##SetVariable|aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa~0##!
MLConditional|IsEqual##{{aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa}}##0##SetVariable|aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa~1##SetVariable|aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa~0##!
MLConditional|IsEqual##{{aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa}}##0##SetVariable|aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa~1##SetVariable|aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa~0##!
MLConditional|IsEqual##{{aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa}}##0##SetVariable|aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa~1##SetVariable|aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa~0##!
MLConditional|IsEqual##{{aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa}}##0##SetVariable|aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa~1##SetVariable|aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa~0##!
MLConditional|IsEqual##{{aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa}}##0##SetVariable|aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa~1##SetVariable|aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa~0##!
MLConditional|IsEqual##{{aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa}}##0##SetVariable|aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa~1##SetVariable|aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa~0##!
MLConditional|IsEqual##{{aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa}}##0##SetVariable|aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa~1##SetVariable|aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa~0##!
MLConditional|IsEqual##{{aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa}}##0##SetVariable|aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa~1##SetVariable|aaaaaaaaaa_aaaaaaaaaa_aaaaaaaaaa~0##

Press the button multiple times to capture the error. The resulting Verbose error message on the server is:

Class=Error, Client=MLProcess via () SETVARIABLE, Description=Error# 9 - Subscript out of range raised by MLProcess via () SETVARIABLE

Let me know if you need any additional info to replicate this bug!

Thanks,

kylep


Return to “MainLobby Public Bug Report”

Who is online

Users browsing this forum: No registered users and 1 guest