LineageGlue Rule Winforms caused an exception

Ask general questions here.
vengaishiva
Posts: 62
Joined: Wed Mar 09, 2011 4:40 pm

LineageGlue Rule Winforms caused an exception

Post by vengaishiva » Tue Sep 06, 2011 8:56 am

Hi,
I am using Ranorex 3.0.1. I am trying to automate a WinForms Application through Visual Studio by including Ranorex dlls. Am getting the following error message sometimes.

"LineageGlueRule Winforms caused an exception on Execute method. Method Alert in type ****.MAINFORM from assembly **** version 5.14.1.10 culture - neutral Public KeyToken = null does not have an implementation".

Here **** represents my application name which is being automated.
Am getting the error message when the code tries to find the following rx path "/form[@controlname='MainForm']/element[@controlname='standaloneBarControl']/element/button[@accessiblename='New Trade |']"
Am using Host.Local.TryFindSingle to find this path in my code.

Please note that, this error message does not show up all the times. It appears sometimes and fails my automation.

Can you please explain me about this behaviour :roll:

Regards,
Siva R S

vengaishiva
Posts: 62
Joined: Wed Mar 09, 2011 4:40 pm

Re: LineageGlue Rule Winforms caused an exception

Post by vengaishiva » Tue Sep 06, 2011 2:56 pm

Hi Support Team,
Can you please reply soon. :cry:

Regards,
Siva R S

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

Re: LineageGlue Rule Winforms caused an exception

Post by Support Team » Tue Sep 06, 2011 3:34 pm

Hi,

Can you please describe the occurence of the problem more detailed?
Are there any other circumstances leading to this error?
Have you found any marginal conditions when getting this exception?

Regards,
Tobias
Support Team
.
Image

vengaishiva
Posts: 62
Joined: Wed Mar 09, 2011 4:40 pm

Re: LineageGlue Rule Winforms caused an exception

Post by vengaishiva » Tue Sep 06, 2011 5:22 pm

Hi,
Thanks for your reply.

So far the problem has occurred only for the rxpath path that i mentioned above. While this error occurs in a specific run, identification of other UI controls are done successfully by ranorex

Also I cannot point out to any circumstance leading to this exception. When i run the same automation code again after the error, it didn't show any such messages and works fine.

Kindly Help :?

Thanks,
Siva R S

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

Re: LineageGlue Rule Winforms caused an exception

Post by Support Team » Wed Sep 07, 2011 11:44 am

Hi,

Please send us a Ranorex Snapshot file of your application, and please send us some more information about your test machine and your AUT(OS, .NET Version, technologies used, ...).
You can also update to our new Ranorex 3.1 version. You can download the new version from the following link.

Regards,
Markus
Ranorex Support Team
.
Image

vengaishiva
Posts: 62
Joined: Wed Mar 09, 2011 4:40 pm

Re: LineageGlue Rule Winforms caused an exception

Post by vengaishiva » Wed Sep 07, 2011 11:52 am

Hi Marcus,
Thanks for the reply. The code and the application is in secured location. So i can't post the snapshot. But i can give you the information about the environment.

OS used : Windows 7
.NET Framework : 3.5
Application under test : .NET 3.5 WPF/Winforms mixed
Am accessing my machine via Remote Desktop

Can you please explain me about this behaviour. Why this error message occurs sometimes and what is the maning of the error message?

Thanks,
Siva R S

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

Re: LineageGlue Rule Winforms caused an exception

Post by Support Team » Wed Sep 07, 2011 12:33 pm

Hi,

That's a very difficult questions, and we would need your application and the test scripts to reproduce and locate the issue/error.
You can try to update to the new Ranorex 3.1 version, maybe the error won't appear any more.
The link to the new version.

Regards,
Markus
Ranorex Support Team
.
Image

vengaishiva
Posts: 62
Joined: Wed Mar 09, 2011 4:40 pm

Re: LineageGlue Rule Winforms caused an exception

Post by vengaishiva » Wed Sep 07, 2011 1:27 pm

Thanks,
I will try to get 3.1 :D

Siva R S

Paul
Posts: 2
Joined: Wed Mar 21, 2012 2:14 pm

Re: LineageGlue Rule Winforms caused an exception

Post by Paul » Wed Mar 21, 2012 3:42 pm

Hi,

I am seeing a very similar issue with Ranorex version 3.2.2. Can you please share any additional information learned since this issue was reported?

I am also seeing this error when testing a WinForms application and using TryFindSingle().

Thanks,
Paul

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

Re: LineageGlue Rule Winforms caused an exception

Post by Support Team » Thu Mar 22, 2012 12:29 pm

Hi,
Paul wrote:I am seeing a very similar issue with Ranorex version 3.2.2. Can you please share any additional information learned since this issue was reported?
Would it be possible to post us the LineageGlueRule exception you get?

Thanks in advance.

Regards,
Peter
Ranroex Team
.
Image

Paul
Posts: 2
Joined: Wed Mar 21, 2012 2:14 pm

Re: LineageGlue Rule Winforms caused an exception

Post by Paul » Fri Apr 13, 2012 4:56 pm

Hi, sorry I had to work on some higher priority stuff, but would like to get back to this and understand what may be causing the following error:

"LineageGlueRule 'winforms' caused TypeLoadException on Execute. Could not load type '<application class library name>' from assembly '<assembly name>, Version...."

Any insight into what could be causing this would be appreciated. At the point during execution that this occurs, it prevents the next Ranorex command from succeeding. I've tried changing up the test steps at this point and it hasn't made a difference. Everything fails and test run has to be killed.

Thanks,
Paul

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

Re: LineageGlue Rule Winforms caused an exception

Post by Support Team » Mon Apr 16, 2012 4:09 pm

Hi,
Paul wrote:"LineageGlueRule 'winforms' caused TypeLoadException on Execute. Could not load type '<application class library name>' from assembly '<assembly name>, Version...."
Please could you post the full LineageGlueRule exception including the details? Would it be also possible to post us your Ranorex Report when the exception occurs? Did you try to re-install Ranorex on this machine?

Regards,
Peter
Ranorex Team
.
Image

Phil
Posts: 1
Joined: Mon Jun 04, 2012 6:19 pm

Re: LineageGlue Rule Winforms caused an exception

Post by Phil » Mon Jun 04, 2012 7:49 pm

This issue was backburnered again, but is now being reinvestigated and I have been asked to look further into it. Here are some details on the error:

LineageGlueRule 'winforms' caused TypeLoadException on Execute. Could not load type '<application class library name>' from assembly '<assembly name>, Version...."

Show/Hide Stacktrace

at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) at System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) at Ranorex.Libs.WinForms.AssemblyResolver.ResolveType(String assemblyQualifiedTypeName, Boolean reflectionOnly) at Ranorex.Libs.WinForms.ControlProxy.get_ControlType() at Ranorex.Libs.WinForms.ControlProxy.get_IsManaged() at Ranorex.Libs.WinForms.Desktop.GetProxy(IntPtr windowHandle, IList`1 assemblyNamesAndPaths) at Ranorex.Plugin.LocalCommonControls.Ranorex.Plugin.ICommonControls.GetControlProxy(IntPtr hwnd, IList`1 assemblyNamesAndPaths) at Ranorex.Plugin.WinFormsFlavorElement.FromHandle(IntPtr handle, IList`1& limitations) at Ranorex.Plugin.WinFormsRule.Execute(GlueRuleExecutionState state) at Ranorex.Core.ElementEngine.ApplyGlueRules(Element element, GlueRuleExecutionState state)


Any help would be greatly appreciated! :D

Thanks,

Phil

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

Re: LineageGlue Rule Winforms caused an exception

Post by Support Team » Tue Jun 05, 2012 5:21 pm

Hi Phil,

Can you also describe when the error occurs, which action was executed (try find single), can you determine any circumstances which could lead to this exception, which Ranorex version are you using (still 3.2.2)?
Which Os and .Net version are you using and is your application a WinForms one?
Is it possible to send us the specific Ranorex report file?

Regards,
Markus
Ranorex Support Team
.
Image

pierre2
Posts: 6
Joined: Tue Nov 03, 2015 11:16 am

Re: LineageGlue Rule Winforms caused an exception

Post by pierre2 » Thu Nov 12, 2015 11:54 am

Hello Support,

I seldom get the same error, LineageGlueRule...

My software, Ranorex Studio and in fine the whole Java and window processes get stuck. I need to force reboot my computer. Unfortunately I cannot get the message, it is only shown in the Ranorex debug window. Once I have rebooted the report log is empty.

The only thing I can mention in this occurence is that this error takes place during test suite execution, ten seconds after the error "You tried to access protected memory". When I got this first error, I clicked pause and decided to continue the test. Eventually the Java LineageGlueRule froze the applications and Java as if the process was stuck in an infinite loop. The processes cannot be killed in the Task Manager of Window.

When I restart Ranorex I get an error saying that it cannot access the solution preferences and can't open my project:

Failed to load preferences for project '...'.
System.Xml.XmlException: Das Stammelelement ist nicht vorhanden (the trunk element is not available).
bei System.Xml.XmlTextReaderImpl.Throw(Exception e)
bei System.Xml.XmlTextReaderImpl.ParseDocumentContent()
bei System.Xml.XmlTextReaderImpl.Read()
bei System.Xml.XmlTextReader.Read()
bei ICSharpCode.core.Properties.Load(String fileName)
bei ICSharpCode.SharpDevelop.Project.ProjectService.ApplyConfigurationAndReadPreferences()

After trying three times I can (sometimes) load the project again, otherwise I need to delete the AppData to get a clean Ranorex Studio.

I can unfortunately not provide more information. But this error is blocking.

Thank you!