Microsoft AX Dynamics dynamic IDs generate stack overflow

Bug reports.
AdamH
Posts: 21
Joined: Thu Aug 08, 2013 9:20 am

Microsoft AX Dynamics dynamic IDs generate stack overflow

Post by AdamH » Mon Nov 25, 2013 11:59 am

Hi,

I'm currently trialing Ranorex to test a Microsoft Dynamics AX application. A large number of the application objects contain dynamic IDs. After having read the posts on your forums on this subject there were no alternative attributes that I could use instead of the "control id". Therefore I have had to turn the "control id" portion of the XPath into a regular expression.

When I execute the test and it hits the test step which contains an object which has a regular expression for its "control id" the following error is raised in the small Ranorex execution logging window:

Code: Select all

LineageGlueRule 'msaa_child' caused OverflowException on Execute. Arithmetic operation resulted in an overflow.
The test execution pauses at this point for a period of time before continuing.

Why is this error being raised and how do I stop it being raised?
Many thanks

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Microsoft AX Dynamics dynamic IDs generate stack overflow

Post by Support Team » Wed Nov 27, 2013 1:47 pm

Hello Adam,

Could you please provide more information about your issue?

Which Ranorex version do you use?

Please post a Ranorex Snapshot of your application.
Additionally, please send us a report if possible.
This would help us in analyzing your issue.

Please take a look at our User Guide for more information on how to create snapshot files.
Thanks in advance.

Regards,
Markus (T)

AdamH
Posts: 21
Joined: Thu Aug 08, 2013 9:20 am

Re: Microsoft AX Dynamics dynamic IDs generate stack overflow

Post by AdamH » Wed Feb 12, 2014 5:29 pm

Hi Markus,

Many thanks for your response and apologies for my rather slow reply to you. Unfortunately testing of our AX application has been temporarily shelved while we focus on other applications on our system. Once we return to testing of the AX application I'll capture the requested information for you and post back again...

Many thanks...

AdamH
Posts: 21
Joined: Thu Aug 08, 2013 9:20 am

Re: Microsoft AX Dynamics dynamic IDs generate stack overflow

Post by AdamH » Fri Mar 07, 2014 1:25 pm

Hi Markus,

We've been able to return to this issue now in our test automation program. In response to your questions below:
  • - We're currently using Version 4.15 of Ranorex for this area of testing.
    - I've attached an execution report including a snapshot of the object that generates the exception when we interact with it.
    - I've also attached a screenshot of the Ranorex logger window which shows the actual exception message.
In the AX application we're finding a lot of controls that contain dynamic id's in their properties. I think the exception gets raised whenever we interact with an object which has a dynamic id. When this exception occurs the test is delayed approximately 20-30 seconds before continuing.

The following are lines of code that we have all found to generate this error:

Code: Select all

// Identify the button control
Ranorex.Text defaultCountryTxt = Home.FindSingle<Ranorex.Text>("?//text[@accessiblename='" + defaultCountry + "']");

Code: Select all

IList<Ranorex.RawText> RawCountry = Form.Find<Ranorex.RawText>("?/?/element[@controlid~'[0-9]*']/rawtext[@rawtext='" + countryCode + "']");
You do not have the required permissions to view the files attached to this post.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Microsoft AX Dynamics dynamic IDs generate stack overflow

Post by Support Team » Tue Mar 11, 2014 4:03 pm

Hello AdamH,

Unfortunately we were not able to reproduce your issue. I may ask you to provide following data to us:

Report file with the Report level set to debug.
  • (Right click on your Test Suite and select Report Level : Debug)
TestSuiteSettings_ReportLevel.png
Internal log file :

In order to enable the internal logging functionality for Ranorex Studio, please open the following file and change the <root> tag as described below.

„C:\Program Files (x86)\Ranorex 5.0\RanorexStudio\RanorexStudio.exe.config“

Code: Select all

<root>    
  <level value=" Trace" />    
  <appender-ref ref="ColoredConsoleAppender" />    
  <appender-ref ref="FileAppender" />    
</root>
After a restart of Ranorex Studio the log file can be found in the following directory “C:\Program Files (x86)\Ranorex 5.0\RanorexStudio\bin”.

If you are running your test outside Ranorex Studio please enable the internal logging for all Ranorex tools.

You will find the configuration file for logging in the following locations.
C:\Program Files (x86)\Ranorex 5.0\Bin\NLog.config
C:\Program Files (x86)\Ranorex 5.0\Bin\x64\NLog.config

Please open these files with a text editor and edit the following rule (from “Off” to “Trace”):

Code: Select all

<!-- Set the minlevel attribute to enable logging to a local file -->
<logger name="*" minlevel="Trace" writeTo="logfile" />
Please copy this modified NLog.Config-file to the destination of your TestExecutable.

Regards,
Robert
You do not have the required permissions to view the files attached to this post.

Karzone
Posts: 8
Joined: Thu Feb 06, 2014 6:16 pm

Re: Microsoft AX Dynamics dynamic IDs generate stack overflow

Post by Karzone » Fri Mar 21, 2014 12:15 am

Hi,

Any update on this issue. Please suggest us a solution to this exception, as this is causing a performance issue during execution.

Thank you.

AdamH
Posts: 21
Joined: Thu Aug 08, 2013 9:20 am

Re: Microsoft AX Dynamics dynamic IDs generate stack overflow

Post by AdamH » Tue Mar 25, 2014 11:53 am

Hi Karzone,

There's been some e-mail exchange on this topic sending in files to Ranorex support, etc. The latest response is that this issue has now been passed onto their development team to look into. Hopefully we'll hear more soon...

Kind regards

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Microsoft AX Dynamics dynamic IDs generate stack overflow

Post by Support Team » Thu Jun 12, 2014 2:18 pm

Hello,

After a detailed analyze together with our development department we found out that the OverFlow Exception is caused from an MSAA element which reports less than zero child elements.
Please make sure that only valid elements are used within your test suite. Check the RxPath of the repository items as well as the paths from folder elements. Maybe there are some invalid elements.

Regards,
Robert

Balrog28
Posts: 1
Joined: Tue Jul 22, 2014 10:08 pm

Re: Microsoft AX Dynamics dynamic IDs generate stack overflow

Post by Balrog28 » Tue Jul 22, 2014 10:17 pm

I've encountered this issue with a basic validation in Dynamics AX, and it too reduces the performance of my test execution. The Validation in the rxlog shows as Success, however on screen during the execution, and in the below log, the user can see the reported problem above:
LineageGlueRule 'msaa_child' caused OverflowException on Execute. System.OverflowException: Arithmetic operation resulted in an overflow.
"

I've made the above detailed necessary changes to my Trace level logging and receive the following in my '.Runner.log':

2014-07-22 16:02:34.0229|INFO|Ranorex.Report|Validation: Validating AttributeEqual (Visible='True') on item 'FormMicrosoftDynamicsAXInnerWorking.File'.
2014-07-22 16:02:34.1729|TRACE|Ranorex.Plugin.WebFlavor|Trying to get embedded browser from handle 3540462...
2014-07-22 16:02:34.2929|TRACE|Ranorex.Plugin.WebFlavor|Trying to get embedded browser from handle 920814...
2014-07-22 16:02:34.3029|TRACE|Ranorex.Plugin.WebFlavor|Trying to get embedded browser from handle 395570...
2014-07-22 16:02:34.3029|TRACE|Ranorex.Plugin.WebFlavor|Trying to get embedded browser from handle 3672724...
2014-07-22 16:02:34.6729|DEBUG|Ranorex.Report|Plugins: LineageGlueRule 'msaa_child' caused OverflowException on Execute. Arithmetic operation resulted in an overflow.
2014-07-22 16:02:34.6829|FATAL|Ranorex.Report|LineageGlueRule 'msaa_child' caused OverflowException on Execute. System.OverflowException: Arithmetic operation resulted in an overflow.
at Ranorex.Plugin.MsaaFlavorElement.GetChildren(Boolean filter)
at Ranorex.Plugin.MsaaFlavorElement.get_Children()
at Ranorex.Plugin.MsaaChildRule.Execute(GlueRuleExecutionState state)
at Ranorex.Core.ElementEngine.ApplyGlueRules(Element element, GlueRuleExecutionState state)
2014-07-22 16:02:34.9729|TRACE|Ranorex.Core.Watchdog|Disposing watchdog instance
2014-07-22 16:02:34.9729|TRACE|Ranorex.Core.Watchdog|Disposing watchdog instance
2014-07-22 16:02:34.9729|TRACE|Ranorex.Core.Watchdog|Disposing watchdog instance
2014-07-22 16:02:34.9729|TRACE|Ranorex.Core.Watchdog|Disposing watchdog instance
2014-07-22 16:02:34.9729|TRACE|Ranorex.Core.Watchdog|Disposing watchdog instance
2014-07-22 16:02:34.9729|TRACE|Ranorex.Core.Watchdog|Disposing watchdog instance
2014-07-22 16:02:34.9729|INFO|Ranorex.Report|Validation: Attribute 'Visible' of element for item 'Jimbo_AXRepository.FormMicrosoftDynamicsAXInnerWorking.File' does match the specified value.
2014-07-22 16:02:35.1429|INFO|Ranorex.Report|Validation: Validating AttributeEqual (Visible='True') on item 'FormMicrosoftDynamicsAXInnerWorking.Home'.
2014-07-22 16:02:35.2029|DEBUG|Ranorex.Report|Plugins: LineageGlueRule 'msaa_child' caused OverflowException on Execute. Arithmetic operation resulted in an overflow.
2014-07-22 16:02:35.2129|FATAL|Ranorex.Report|LineageGlueRule 'msaa_child' caused OverflowException on Execute. System.OverflowException: Arithmetic operation resulted in an overflow.
at Ranorex.Plugin.MsaaFlavorElement.GetChildren(Boolean filter)
at Ranorex.Plugin.MsaaFlavorElement.get_Children()
at Ranorex.Plugin.MsaaChildRule.Execute(GlueRuleExecutionState state)
at Ranorex.Core.ElementEngine.ApplyGlueRules(Element element, GlueRuleExecutionState state)
2014-07-22 16:02:43.1836|TRACE|Ranorex.Core.Watchdog|Disposing watchdog instance
2014-07-22 16:02:43.1936|INFO|Ranorex.Report|Validation: Attribute 'Visible' of element for item 'Jimbo_AXRepository.FormMicrosoftDynamicsAXInnerWorking.Home' does match the specified value.

Your answer above questions the validity of the element in question - however as seen by my log - the element exists and the Validation in the rxlog is successful. If the MSAA element reports less than zero child elements - this exception should be handled by your code (not mark as FATAL in Trace log) and not report as an issue - nor cause a performance degradation in execution - correct?