LineageGlueRule 'flex_child_elements' caused RemotingExcept

Bug reports.
xiaohua11111
Posts: 5
Joined: Thu Sep 18, 2014 3:30 am

LineageGlueRule 'flex_child_elements' caused RemotingExcept

Post by xiaohua11111 » Thu Sep 18, 2014 3:47 am

Dear sir/madam,
hi,
I have a problem concerning the "LineageGlueRule" class. it throws out an exception while I haven't reference the class "LineageGlueRule" in my code. the problem was as follows:
"LineageGlueRule 'flex_child_elements' caused RemotingException on Execute. 向 IPC 端口写入失败: 管道正在被关闭。 "
Below was the detailed information:

"Show/Hide Stacktrace
Server stack trace: 在 System.Runtime.Remoting.Channels.Ipc.IpcPort.Write(Byte[] data, Int32 offset, Int32 size) 在 System.Runtime.Remoting.Channels.Ipc.PipeStream.Write(Byte[] buffer, Int32 offset, Int32 count) 在 System.Runtime.Remoting.Channels.ChunkedMemoryStream.WriteTo(Stream stream) 在 System.Runtime.Remoting.Channels.Ipc.IpcClientHandler.SendRequest(IMessage msg, ITransportHeaders headers, Stream contentStream) 在 System.Runtime.Remoting.Channels.Ipc.IpcClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders& responseHeaders, Stream& responseStream) 在 System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg) Exception rethrown at [0]: 在 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) 在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) 在 ShockwaveFlashObjects.IShockwaveFlash.CallFunction(String request) 在 Ranorex.Plugin.ComFlashInvoker.CallFunction(String data) 在 Ranorex.Plugin.FlexFlavorElement.InvokeGetTreeChildIds(Int64 parentRxId, Int64 itemRxId) 在 Ranorex.Plugin.FlexChildrenRule.Execute(GlueRuleExecutionState state) 在 Ranorex.Core.ElementEngine.ApplyGlueRules(Element element, GlueRuleExecutionState state)"

MY os information is "windows 7 32bit"
my edition is " Ranorex 4.1.4."


I'm sorry for not really understanding the Bug Reports ,maybe it happens due to codings as follows:
public static void SelectAndClickTreeItem(TreeItem rootItem, string labelName, bool currentLevel)
		{
			if(currentLevel)
			{
				//rootItem.Expand();	//只展开当前节点
				if(rootItem.Expanded == false)
				{
					clickToExpandCurrentTreeItem(rootItem);
				}
			}
				
			else
			{
				if(rootItem.Expanded == false)
				{
					//rootItem.ExpandAll(); //展开该节点所有子成员
					clickToExpandAllDescendentTreeItem(rootItem);
				}
			}
			
			//选中跟节点, 下面通过键盘操作定位到要选的设备.
			//取巧办法, 通过滚动条拖拽比较麻烦
			rootItem.Click();

			int maxKeydownNumber = 200;
			bool found = false;
			// 遍历所有子节点, 找到标签, 取得屏幕位置, 鼠标点击
			foreach(TreeItem item in rootItem.DescendantItems)
			{
				if(item.Text.Equals(labelName))
				{
					Report.Info("Info", "Found Item: " + item.ToString());
					while(item.Selected == false && maxKeydownNumber>0)
					{
						Keyboard.Press("{Down}");
						Delay.Milliseconds(100);
						maxKeydownNumber--;
					}
					Mouse.Click(item.ScreenRectangle.X+5,item.ScreenRectangle.Y+5);
					found = true;
					break;
					
				}
			}
			if(found)
			{
				Report.Info("item " + labelName + "has been found");
			}
			else
			{
				Report.Failure("item " + labelName + " hasn't been found");
			}
		}

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: LineageGlueRule 'flex_child_elements' caused RemotingExcept

Post by Support Team » Fri Sep 19, 2014 1:08 pm

Hi xiaohua11111,

This is a Ranorex "internal" exception so it is just indirectly connected to your code.
Could you debug your code to check after which code line the exception gets thrown?

This exception could be related to some bad timings, meaning that Ranorex found an element wants to perform an action and during that the element gets updated.
You may be able to workaround this exception by adding a small delay before the action which indirectly triggers the exception.

Regards,
Markus
.
Image