Author Topic: Boolean error. Doesn't like a space in folder name??  (Read 3969 times)

Frunple

  • Hero Member
  • *****
  • Posts: 774
    • View Profile
Boolean error. Doesn't like a space in folder name??
« on: November 02, 2010, 02:51:50 pm »
This has been a couple of versions now, not just .27.
I have a boolean that checks the power state of each nuvo zone on a page load.
For a little while now, not sure when it started, whenever the zone is on, the page hangs and doesn't allow any use of Elve.
Heres the log:

<rec><dt>2010-11-02 21:39:12.6726650Z</dt><s>Error</s><msg>An error occurred while executing the script TouchScreen.Boolean15.OnDisplayTextChanged.
ScriptEvaluatorException: An unknown error occurred while evaluating the script.  SocketException: An existing connection was forcibly closed by the remote host
SocketException SocketErrorCode: ConnectionReset

CodecoreTechnologies.Elve.DriverFramework.Scripting.ScriptEvaluatorException: An unknown error occurred while evaluating the script. ---&gt; System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host

Server stack trace:
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.Runtime.Remoting.Channels.SocketStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at System.Runtime.Remoting.Channels.SocketHandler.ReadFromSocket(Byte[] buffer, Int32 offset, Int32 count)
   at System.Runtime.Remoting.Channels.SocketHandler.Read(Byte[] buffer, Int32 offset, Int32 count)
   at System.Runtime.Remoting.Channels.SocketHandler.ReadAndMatchFourBytes(Byte[] buffer)
   at System.Runtime.Remoting.Channels.Tcp.TcpSocketHandler.ReadAndMatchPreamble()
   at System.Runtime.Remoting.Channels.Tcp.TcpSocketHandler.ReadVersionAndOperation(UInt16&amp; operation)
   at System.Runtime.Remoting.Channels.Tcp.TcpClientSocketHandler.ReadHeaders()
   at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders&amp; responseHeaders, Stream&amp; responseStream)
   at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)

Exception rethrown at
  • :

   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&amp; msgData, Int32 type)
   at CodecoreTechnologies.Elve.DriverFramework.Scripting.ScriptObject.SetProperty(String propertyName, ScriptObject value)
   at Common.ScriptEvaluator.ScriptEvaluator.variableAssignment()
   at Common.ScriptEvaluator.ScriptEvaluator.evaluateBlock()
   at Common.ScriptEvaluator.ScriptEvaluator.ifKeyword()
   at Common.ScriptEvaluator.ScriptEvaluator.tryKeyword()
   at Common.ScriptEvaluator.ScriptEvaluator.newKeyword()
   at Common.ScriptEvaluator.ScriptEvaluator.objectMemberAndArrayMember()
   at Common.ScriptEvaluator.ScriptEvaluator.postIncrementDecrement()
   at Common.ScriptEvaluator.ScriptEvaluator.factor()
   at Common.ScriptEvaluator.ScriptEvaluator.multiplicative()
   at Common.ScriptEvaluator.ScriptEvaluator.additive()
   at Common.ScriptEvaluator.ScriptEvaluator.bitwiseShift()
   at Common.ScriptEvaluator.ScriptEvaluator.relational()
   at Common.ScriptEvaluator.ScriptEvaluator.equality()
   at Common.ScriptEvaluator.ScriptEvaluator.bitwiseAnd()
   at Common.ScriptEvaluator.ScriptEvaluator.bitwiseExclusiveOr()
   at Common.ScriptEvaluator.ScriptEvaluator.bitwiseInclusiveOr()
   at Common.ScriptEvaluator.ScriptEvaluator.logicalAnd()
   at Common.ScriptEvaluator.ScriptEvaluator.logicalOr()
   at Common.ScriptEvaluator.ScriptEvaluator.variableAssignment()
   at Common.ScriptEvaluator.ScriptEvaluator.evaluateBlock()
   at Common.ScriptEvaluator.ScriptEvaluator.ifKeyword()
   at Common.ScriptEvaluator.ScriptEvaluator.tryKeyword()
   at Common.ScriptEvaluator.ScriptEvaluator.newKeyword()
   at Common.ScriptEvaluator.ScriptEvaluator.objectMemberAndArrayMember()
   at Common.ScriptEvaluator.ScriptEvaluator.postIncrementDecrement()
   at Common.ScriptEvaluator.ScriptEvaluator.factor()
   at Common.ScriptEvaluator.ScriptEvaluator.multiplicative()
   at Common.ScriptEvaluator.ScriptEvaluator.additive()
   at Common.ScriptEvaluator.ScriptEvaluator.bitwiseShift()
   at Common.ScriptEvaluator.ScriptEvaluator.relational()
   at Common.ScriptEvaluator.ScriptEvaluator.equality()
   at Common.ScriptEvaluator.ScriptEvaluator.bitwiseAnd()
   at Common.ScriptEvaluator.ScriptEvaluator.bitwiseExclusiveOr()
   at Common.ScriptEvaluator.ScriptEvaluator.bitwiseInclusiveOr()
   at Common.ScriptEvaluator.ScriptEvaluator.logicalAnd()
   at Common.ScriptEvaluator.ScriptEvaluator.logicalOr()
   at Common.ScriptEvaluator.ScriptEvaluator.variableAssignment()
   at Common.ScriptEvaluator.ScriptEvaluator.evaluateBlock()
   at Common.ScriptEvaluator.ScriptEvaluator.evaluate(ScriptParser parser, ScriptVariableCollection variables, EvaluateFunctionDelegate evaluatefunction, ScriptObjectTypeInfoCollection objectInfos, ScriptFunctionInfoCollection scriptFunctionInfos)
   --- End of inner exception stack trace ---
   at Common.ScriptEvaluator.ScriptEvaluator.evaluate(ScriptParser parser, ScriptVariableCollection variables, EvaluateFunctionDelegate evaluatefunction, ScriptObjectTypeInfoCollection objectInfos, ScriptFunctionInfoCollection scriptFunctionInfos)
   at Common.ScriptEvaluator.ScriptEvaluator.Evaluate(ScriptParser parser, ScriptVariableCollection variables, EvaluateFunctionDelegate evaluatefunction, ScriptObjectTypeInfoCollection objectInfos, ScriptFunctionInfoCollection scriptFunctionInfos)
   at Common.ScriptEvaluator.ScriptEvaluator.Evaluate(String s, ScriptPosition position, ScriptVariableCollection variables, EvaluateFunctionDelegate evaluatefunction, ScriptObjectTypeInfoCollection objectInfos, ScriptFunctionInfoCollection scriptFunctionInfos)
   at Common.ScriptEvaluator.ScriptEvaluator.Evaluate(String s, ScriptVariableCollection variables, EvaluateFunctionDelegate evaluatefunction, ScriptObjectTypeInfoCollection objectInfos, ScriptFunctionInfoCollection scriptFunctionInfos)
   at Common.ScriptEvaluator.ScriptEvaluator.Evaluate(String s, ScriptVariableCollection variables, EvaluateFunctionDelegate evaluatefunction, ScriptObjectTypeInfoCollection objectInfos)
   at Common.ScriptEvaluator.ScriptEvaluator.EvaluateNow(String s, ScriptVariableCollection variables, EvaluateFunctionDelegate evaluatefunction, ScriptObjectTypeInfoCollection objectInfos)
   at MasterService.ScriptRunner.RunNow(String scriptName, String script, ScriptVariableCollection extraScriptVariables, Boolean throwError)
Location in script: line 5, column 97.

      TouchScreen.ControlContainer1.TouchScreenName = @&quot;\MediaCenter800x600\Audio Folder86\NuvoS186&quot;;
                                                                                                ^
</msg><app>MasterService</app><ma>DIMENSION4550</ma><ct>Script</ct><cn>TouchScreen.Boolean15.OnDisplayTextChanged</cn></rec>
</log>


Here's the Boolean script:


if ( nuvo.ZonePowerStates[1] == true )
{
   if ( nuvo.ZoneSources[1] == 1 )
   {
      TouchScreen.ControlContainer1.TouchScreenName = @"\MediaCenter800x600\Audio Folder86\NuvoS186";
      TouchScreen.ControlContainer2.TouchScreenName = @"\MediaCenter800x600\Audio Folder86\ST2-1Bar86";
   }
   if ( nuvo.ZoneSources[1] == 2 )
   {
      TouchScreen.ControlContainer1.TouchScreenName = @"\MediaCenter800x600\Audio Folder86\NuvoS286";
      TouchScreen.ControlContainer2.TouchScreenName = @"\MediaCenter800x600\Audio Folder86\ST2-1Bar86";
   }
   if ( nuvo.ZoneSources[1] == 3 )
   {
      TouchScreen.ControlContainer1.TouchScreenName = @"\MediaCenter800x600\Audio Folder86\NuvoS386";
   }
   if ( nuvo.ZoneSources[1] == 4 )
   {
      TouchScreen.ControlContainer1.TouchScreenName = @"\MediaCenter800x600\Audio Folder86\NuvoS486";
   }
}

Frunple

  • Hero Member
  • *****
  • Posts: 774
    • View Profile
Re: Boolean error. Doesn't like a space in folder name??
« Reply #1 on: November 02, 2010, 02:54:36 pm »
The error got a little misaligned when pasted, the caret actually points at the space in "Audio Folder86".

John Hughes

  • Administrator
  • Hero Member
  • *****
  • Posts: 2851
    • View Profile
    • Codecore Technologies
Re: Boolean error. Doesn't like a space in folder name??
« Reply #2 on: November 02, 2010, 05:20:13 pm »
It looks like the error occurs on this script line:

TouchScreen.ControlContainer1.TouchScreenName = @"\MediaCenter800x600\Audio Folder86\NuvoS186";

The error indicates that the network connection between was lost.

Do you think the error message was written at the time of the boolean change or when you terminated touch screen viewer?

Can you please export your relevant touch screens and send them to me so I can duplicate the issue?

Thanks
John Hughes
Codecore Technologies

Frunple

  • Hero Member
  • *****
  • Posts: 774
    • View Profile
Re: Boolean error. Doesn't like a space in folder name??
« Reply #3 on: November 03, 2010, 06:58:26 am »
Not sure if it's when I disconnect, it justs locks up so I have to kill the task in taskmanager.
Doesn't happen at the time of the change but the change is the cause.
I'll try to explain.
If the nuvo state is off and I go to my "Zone" page, the page only loads the nuvo controls.
If the nuvo state is on, the page will load the nuvo controls AND the appropriate source controls based on the boolean selection.
So when the zone is on and I go to select that zones page it just hangs and never load either the nuvo zone control or source info.
I'll get the TS's to you now.

John Hughes

  • Administrator
  • Hero Member
  • *****
  • Posts: 2851
    • View Profile
    • Codecore Technologies
Re: Boolean error. Doesn't like a space in folder name??
« Reply #4 on: November 06, 2010, 02:33:35 pm »
I received your touch screens.  There were quite a few... which ones are suspect? Or what do I need to do to reproduce the issue? You mention Zone page, does it matter which one?
John Hughes
Codecore Technologies

Frunple

  • Hero Member
  • *****
  • Posts: 774
    • View Profile
Re: Boolean error. Doesn't like a space in folder name??
« Reply #5 on: November 07, 2010, 05:26:00 pm »
I think there were only 4, wasn't there?
You'll need them all.
Start at the Audio86, click rooms, this opens the Audio Zones86 in a Container. Click any zone to open the Zone(x)86 (x being whatever zone number you opened) and you'll find the boolean control in the upper left corner. If the zone selected is on, the boolean causes the problem.

John Hughes

  • Administrator
  • Hero Member
  • *****
  • Posts: 2851
    • View Profile
    • Codecore Technologies
Re: Boolean error. Doesn't like a space in folder name??
« Reply #6 on: November 07, 2010, 05:52:51 pm »
I copied your boolean control and both inner touch screens to a new touch screen just for simpler testing, and I changed the boolean control to bind to a global variable.


When I changed the global variable (which triggers the boolean event) the event script runs successfully loads "\MediaCenter800x600\Audio Folder86\NuvoS186".


There is no issue with the space.


It was not able to load "\MediaCenter800x600\Audio Folder86\ST2-1Bar86" since you didn't send me that one however it looks like it error before that line anyways.


Are you using Russound and Nuvo devices? I see references to both.


I'm wondering if one of the russound properties you are showing is cause the thread to block and then when you kill the app you see the error.


Also in your script, instead of referencing nuvo.ZoneSources[1] a lot, you should use "else" statements or make a copy of the value since that is so inefficient. You'll get better performance if you use something like:





Code: [Select]
if ( nuvo.ZonePowerStates[1] == true )
{
if ( nuvo.ZoneSources[1] == 1 )
{
TouchScreen.ControlContainer1.TouchScreenName = @"\MediaCenter800x600\Audio Folder86\NuvoS186";
TouchScreen.ControlContainer2.TouchScreenName = @"\MediaCenter800x600\Audio Folder86\ST2-1Bar86";
}
else if ( nuvo.ZoneSources[1] == 2 )
{
TouchScreen.ControlContainer1.TouchScreenName = @"\MediaCenter800x600\Audio Folder86\NuvoS286";
TouchScreen.ControlContainer2.TouchScreenName = @"\MediaCenter800x600\Audio Folder86\ST2-1Bar86";
}
else if ( nuvo.ZoneSources[1] == 3 )
{
TouchScreen.ControlContainer1.TouchScreenName = @"\MediaCenter800x600\Audio Folder86\NuvoS386";
}
else if ( nuvo.ZoneSources[1] == 4 )
{
TouchScreen.ControlContainer1.TouchScreenName = @"\MediaCenter800x600\Audio Folder86\NuvoS486";
}
}
John Hughes
Codecore Technologies

John Hughes

  • Administrator
  • Hero Member
  • *****
  • Posts: 2851
    • View Profile
    • Codecore Technologies
Re: Boolean error. Doesn't like a space in folder name??
« Reply #7 on: November 07, 2010, 06:00:10 pm »
Ok I reran my test with a slightly modified version of yours. I just changed your boolean control to look at a global variable instead of a nuvo and I forced the script to load the 1st set of touch screens.


Again this was successful after clicking through based on your given steps. I then set the global variable to true using EMS and that triggered the On Text Changed script to run.


As with before, the 1st touch screen loaded fine.


So at this point I am wondering what would happen if you temporarily removed some of the labels in the 1st inner touch screen to see if one of them is causing the issue.
John Hughes
Codecore Technologies

Frunple

  • Hero Member
  • *****
  • Posts: 774
    • View Profile
Re: Boolean error. Doesn't like a space in folder name??
« Reply #8 on: November 08, 2010, 06:48:27 am »
Not sure what you mean by the 1st inner ts?

John Hughes

  • Administrator
  • Hero Member
  • *****
  • Posts: 2851
    • View Profile
    • Codecore Technologies
Re: Boolean error. Doesn't like a space in folder name??
« Reply #9 on: November 08, 2010, 08:41:30 am »
MediaCenter800x600\Audio Folder86\NuvoS186
John Hughes
Codecore Technologies

Frunple

  • Hero Member
  • *****
  • Posts: 774
    • View Profile
Re: Boolean error. Doesn't like a space in folder name??
« Reply #10 on: November 09, 2010, 07:17:47 am »
Well, I had to reboot the elve pc and after that everythig is working as it should again??? Odd.
I'll keep an eye on it, I definitely got an eror from this but it seems to be ok again.

John Hughes

  • Administrator
  • Hero Member
  • *****
  • Posts: 2851
    • View Profile
    • Codecore Technologies
Re: Boolean error. Doesn't like a space in folder name??
« Reply #11 on: November 09, 2010, 01:04:38 pm »
I'll close this for now but please do let us know if you see it again. And if you so see it again try restarting devices one by one to see if one of the drivers might be locking it.
John Hughes
Codecore Technologies

Frunple

  • Hero Member
  • *****
  • Posts: 774
    • View Profile
Re: Boolean error. Doesn't like a space in folder name??
« Reply #12 on: November 16, 2010, 02:54:09 pm »
This is back again. Gonna send you the log, can you take a look if you get a chance?

John Hughes

  • Administrator
  • Hero Member
  • *****
  • Posts: 2851
    • View Profile
    • Codecore Technologies
Re: Boolean error. Doesn't like a space in folder name??
« Reply #13 on: November 16, 2010, 09:11:16 pm »
Based on your most recent log it looks like you are a couple different ip addresses in the log.

Are you running the master service and touch screen viewer on different machines?

If so then:

A. Try testing it from the same machine to see if it fixes the issue? (this will help us better understand the issue)
B. If that works then try temporarily disabling the firewall on the touch screen viewer pc and retest from that machine.
C.Do the 2 machines span across a router?
D. Are you using NAT via a firewall between the 2 machines?
John Hughes
Codecore Technologies

Frunple

  • Hero Member
  • *****
  • Posts: 774
    • View Profile
Re: Boolean error. Doesn't like a space in folder name??
« Reply #14 on: November 17, 2010, 05:56:55 am »
Based on your most recent log it looks like you are a couple different ip addresses in the log.

Are you running the master service and touch screen viewer on different machines?

Yes, but I tried it on the same pc and it does the same thing from there. I believe this answers all 4 questions below.
I also tried removing the power state boolean and it then loads fine.
I also put in the "Else if" that you suggested, didnt make any difference at all.
So don't get caught up in the two different machines, it happens when running the viewer from any machine including the master server.
In the log there appears to be a lot of errors loading different TS's, is there a problem with the naming I did?

Quote
If so then:

A. Try testing it from the same machine to see if it fixes the issue? (this will help us better understand the issue)
B. If that works then try temporarily disabling the firewall on the touch screen viewer pc and retest from that machine.
C.Do the 2 machines span across a router?
D. Are you using NAT via a firewall between the 2 machines?