Hi,
I am getting a System.AccessViolation Exception when I load a particular form in my application. It is an MFC Based application and when I try to load the particular page or form I get the exception
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
After this the Test execution tool (we use NUnit) crashes.
The exception log gives the following details:
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at Ranorex.NativeMethods.RxFormGetFirstChild(Int32 handle)
at Ranorex.Form.GetControls()
System.AccessViolationException
Which Ranorex version do you use?
If V1.1.0 or earlier, then please update it to V1.2.0.
We fixed a similar bug in V1.2.0
You can read all controls in a form as follows (in V1.2.0):
Jenö
Ranorex Team
If V1.1.0 or earlier, then please update it to V1.2.0.
We fixed a similar bug in V1.2.0
You can read all controls in a form as follows (in V1.2.0):
Code: Select all
foreach (Control control in form.Controls)
{
Console.WriteLine("Text= " + control.Text);
}
Ranorex Team
Hi,
I get the same error as Michael. Our Ranorex version is 1.5.1.
System.AccessViolationException: Poging tot het lezen of schrijven van beveiligd geheugen. Dit duidt er vaak op dat ander geheugen is beschadigd.
bij Ranorex.NativeMethods.RxControlSendKeys(Int32 hWnd, String keys, Int32 pressDelay, Int32 downTime)
bij Ranorex.Control.SendKeys(String keys)
Sorry for the dutch part.
The SendKeys method is called from a wrapper I created, to set the text in a TextBox:
Mouse.ClickControl(textBox, MouseButtonType.LeftButton, new Point(-1, -1), 2, 100);
textBox.SendKeys(value);
Any ideas?
I get the same error as Michael. Our Ranorex version is 1.5.1.
System.AccessViolationException: Poging tot het lezen of schrijven van beveiligd geheugen. Dit duidt er vaak op dat ander geheugen is beschadigd.
bij Ranorex.NativeMethods.RxControlSendKeys(Int32 hWnd, String keys, Int32 pressDelay, Int32 downTime)
bij Ranorex.Control.SendKeys(String keys)
Sorry for the dutch part.
The SendKeys method is called from a wrapper I created, to set the text in a TextBox:
Mouse.ClickControl(textBox, MouseButtonType.LeftButton, new Point(-1, -1), 2, 100);
textBox.SendKeys(value);
Any ideas?