Application crashes during test cases

Bug reports.
ranonub
Posts: 6
Joined: Fri Jan 13, 2017 1:23 am
Location: Sydney, Australia

Application crashes during test cases

Post by ranonub » Tue Jan 24, 2017 5:17 am

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.
Attachments
ErrorLogsAndCrashMessage.zip
(22.9 KiB) Downloaded 49 times

ranonub
Posts: 6
Joined: Fri Jan 13, 2017 1:23 am
Location: Sydney, Australia

Re: Application crashes during test cases

Post by ranonub » Tue Jan 24, 2017 7:12 am

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.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Application crashes during test cases

Post by odklizec » Tue Jan 24, 2017 8:12 am

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.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

BSullivan
Posts: 29
Joined: Thu Jun 04, 2015 6:31 pm
Location: HorseHeads NY
Contact:

Re: Application crashes during test cases

Post by BSullivan » Fri Feb 03, 2017 2:42 pm

Anything come of this yet?

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

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

Re: Application crashes during test cases

Post by Support Team » Mon Feb 06, 2017 2:25 pm

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)
.
Image

BSullivan
Posts: 29
Joined: Thu Jun 04, 2015 6:31 pm
Location: HorseHeads NY
Contact:

Re: Application crashes during test cases

Post by BSullivan » Wed Feb 08, 2017 3:29 pm

Markus,

Here is the snapshot:
Snapshot.rxsnp
(166.71 KiB) Downloaded 36 times
The object in question is here:
analysis button.png
analysis button.png (99.83 KiB) Viewed 1490 times
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
method.png (10.8 KiB) Viewed 1490 times
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

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

Re: Application crashes during test cases

Post by Support Team » Thu Feb 09, 2017 10:02 am

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)
.
Image

User avatar
Stub
Posts: 173
Joined: Fri Jul 15, 2016 1:35 pm

Re: Application crashes during test cases

Post by Stub » Fri Feb 10, 2017 9:31 am

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
Call stack of Ranorex/AUT crash.
Ranorex.Core.Injector.AUT.problem.png (171.04 KiB) Viewed 1471 times

BSullivan
Posts: 29
Joined: Thu Jun 04, 2015 6:31 pm
Location: HorseHeads NY
Contact:

Re: Application crashes during test cases

Post by BSullivan » Tue Feb 14, 2017 9:23 pm

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.

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

Re: Application crashes during test cases

Post by Support Team » Wed Feb 15, 2017 8:15 pm

Hi Bryon,

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

Regards,
Markus (S)
.
Image

User avatar
Stub
Posts: 173
Joined: Fri Jul 15, 2016 1:35 pm

Re: Application crashes during test cases

Post by Stub » Fri Jun 30, 2017 2:30 pm

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
EnsureVisibleByDefault.png (30 KiB) Viewed 1136 times
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.

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

Re: Application crashes during test cases

Post by Support Team » Wed Jul 05, 2017 8:51 pm

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)
.
Image

User avatar
Stub
Posts: 173
Joined: Fri Jul 15, 2016 1:35 pm

Re: Application crashes during test cases

Post by Stub » Thu Jul 06, 2017 9:33 am

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.