Page 1 of 1

Application crashes during test cases

Posted: Tue Jan 24, 2017 5:17 am
by ranonub
Application crashes during test cases.
I am testing an application with VB6 and WPF controls on it and it crashes randomly when I am testing VB6 part of it. It seems like crash happens when initiating an action with an element, it could be a form, button, dropdown list button, etc.
Process goes like this.
Setup Jira
Run test cases
Teardown – Post and issue on JIRA if there is an error
I have attached the ranorex log and the windows error message. I have added a line in to text file, it is ‘ThisIsWhereItCrashes’ to indicate where crash happens.
This error never seems to happen when I am dealing with modules which have WPF components in the application.
In error5 text file program crashes when it moved on to next test module.
In error6 text file program crashed when it pressed a button.
As I said this could happen anytime during the test cases when dealing with VB6 components.

Re: Application crashes during test cases

Posted: Tue Jan 24, 2017 7:12 am
by ranonub
Turns out this is caused by adding unrecognised elements to GDI capture list. Removing everything from the GDI list fixed the issue. However, we still need to add some items to GDI capture list in order to complete some test cases. An example to that would be getting the rawtext value from a textbox to compare it with a variable. I need MSHFlexGridWndClass$ to be in the list in order to get that text value.


The GDI capture list looked liked this before;
window class
^MSHFlexGridWndClass$
^ThunderRT6UserControlDC$
^ThunderRT6UserControl$

I have tried adding MSGFlexGridWndClass$ and removing everything else, so for it works fine with that on the list. I am not sure which class is causing my application to crash at the moment.

Re: Application crashes during test cases

Posted: Tue Jan 24, 2017 8:12 am
by odklizec
Hi,

I'm afraid, there is not much anyone here can do without seeing your app and your Ranorex test. I think your best hope is to contact directly Ranorex support at [email protected] and provide them with your app and test suite. Good luck.

Re: Application crashes during test cases

Posted: Fri Feb 03, 2017 2:42 pm
by BSullivan
Anything come of this yet?

I think that I am having a similar issue in Ranorex 6.2.1

Re: Application crashes during test cases

Posted: Mon Feb 06, 2017 2:25 pm
by Support Team
Hi BSullivan,

Unfortunately, we would need additional information about your application under test. May I ask you if you could upload a Ranorex Snapshot? Please also describe the observed behavior in more detail.
Thank you in advance.

Regards,
Markus (S)

Re: Application crashes during test cases

Posted: Wed Feb 08, 2017 3:29 pm
by BSullivan
Markus,

Here is the snapshot:
Snapshot.rxsnp
The object in question is here:
analysis button.png
During execution at what seems to be random times, the AUT crashes. The exception references a failed callback and when I attempt to debug it, I am held up by VS asking for the location of Ranorex.Core.Injector.pdb.

The crash is intermittent, it can run through the tests without issue, fail on test 1, fail on the last test, or anywhere in-between.

When the AUT crashes, my test executable is stuck at this method:
method.png
I am currently unable to figure out what the interaction is between Ranorex and the AUT that is causing the crash so that we can handle the exception if possible.

Let me know if you need anything else.

Thanks,
Bryon

Re: Application crashes during test cases

Posted: Thu Feb 09, 2017 10:02 am
by Support Team
Hi Bryon,
Thank you for the snapshot. It helped me a lot to get a better overview about your system and application.

Since you mentioned that the test executable is stuck at a specific line of code, we would like to fetch some additional details (stack trace, dump file, etc).
In your profile I've seen that you are located in NY. Due to the time difference to our office in Graz, I'd suggest getting in touch with our support engineers located in Clearwater, FL ([email protected]) for any further assistance.

Thank you for your understanding.

Regards,
Markus (S)

Re: Application crashes during test cases

Posted: Fri Feb 10, 2017 9:31 am
by Stub
Ooooo, Ranorex.Core.Injector, I have been getting frequent but random crashes in my AUT from that Ranorex item as well. I've been completely unable to reproduce it on command, though I've taken to restarting Ranorex entirely when it starts happening.

In my case it's a battle between the CodeJock Toolkit Pro v15.2.1 and Ranorex by the looks of the call stack. I happen to have a Ranorex screenshot of the problem dialog, which I'll attach for reference as that's all the additional material I have to hand at the moment.

FWIW I have been using Ranorex since v6.0 last summer and only started seeing this problem in 2017 after I upgraded to v6.2.0 and v6.2.1. I'm currently using v6.2.1 on Win10-x64.
Ranorex.Core.Injector.AUT.problem.png

Re: Application crashes during test cases

Posted: Tue Feb 14, 2017 9:23 pm
by BSullivan
After contacting Support, they recommended this:

"Attempt to turn off “Ensure Visible” in the repository. Ensure Visible is actually a method that Ranorex executes inside your application, so if Ensure Visible throws an exception in your application (because it doesn’t exist, or similar) then you will end up in the situation that you are in. On repository object properties there are three settings for Ensure Visible if you right click the parent object in the repository and go to “properties”. These settings are default (governed by global setting), true, and false. Set this to “false” if you just want to turn it off on single object. This does not inherit to children. If you want to turn it off globally, then in Ranorex Studio open “settings” and it is the very first option on the general tab."

So far I have not had an issue, but I did have to turn it back on for certain repo items individually (ListItems, TreeItems, Tables, etc..) so that they would be scrolled to, then clicked/validated in their respective tree, combobox, listbox, or grid control.

Only time will tell... fingers crossed.

Re: Application crashes during test cases

Posted: Wed Feb 15, 2017 8:15 pm
by Support Team
Hi Bryon,

Thank you for updating this forum post. Please do notify us if the problem occurs again.
Thank you.

Regards,
Markus (S)

Re: Application crashes during test cases

Posted: Fri Jun 30, 2017 2:30 pm
by Stub
After a few months of successful test running, our primary test machine has just started firing off this exact same Ranorex.Core.Injector error! Because it didn't occur on our test machine, but did on my own machine I figured it was probably something local to me. But since it has started happening on the test machine the other day, it's beginning to happen consistently, which is deeply concerning as it completely borks out tests.

I did try clearing the Use Ensure Visible by default checkbox as suggested above.
EnsureVisibleByDefault.png
Our test machine is running Ranorex v6.2.1 on Win7/x64. I'm going to have to try Ranorex v7.1 to see how I get on.

Re: Application crashes during test cases

Posted: Wed Jul 05, 2017 8:51 pm
by Support Team
Hi Stub,

May I ask you to get in touch with me by email? ([email protected]). I'd like to arrange a short remote session to analyze this behavior directly on your machine.

Thank you in advance.

Regards,
Markus (S)

Re: Application crashes during test cases

Posted: Thu Jul 06, 2017 9:33 am
by Stub
I will do, Markus. The only reason I haven't brought this up directly with you guys so far is that it's highly non-deterministic. I can't reproduce it at will. It just occurs randomly.

I've noticed that on our dedicated Win7 test machine it particularly strikes when I'm attempting to test the x64 flavour of our application, but I've not narrowed it down much further than that yet: I've moved back to testing the x86 flavour to monitor whether it strikes there now too.

I'm going to upgrade to Ranorex v7.1 once I get all our tests finished (real soon now!) and try that. I've also got a fresh new machine to setup with Win10 and try it there. So I'm still gathering data.