Ranorex

Unknown Software Exception

 
Post new topic   Reply to topic    Ranorex Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
jtoporowski



Joined: 05 Apr 2007
Posts: 7
Location: BC Canada

PostPosted: Tue Apr 10, 2007 8:10 pm    Post subject: Unknown Software Exception
I am running VS 2005 and Windows XP 64. I got the RanorexCore.dll running in 32 bit mode and everything was working great. Now I get this exception:

The exception unknown software exception (0xc0000005) occurred in the application at the location 0x7d621137.

There is no JIT or further messages.

If I comment out the line:

Control b = form.FindControlName("loginButton");

there are no further issues. Any idea what's happening? I figured it should return null rather then explode.


My code is below:

Form form = null;

while (form == null)
{
Application.GetForms();

form = Application.FindFormTitle("Untitled - Notepad");

if (form != null)
{
form.GetControls();

Control b = form.FindControlName("loginButton");

if (b != null)
{
System.Diagnostics.Debug.WriteLine(b.Text);
}
}
}
Back to top
View user's profile Send private message MSN Messenger
jtoporowski



Joined: 05 Apr 2007
Posts: 7
Location: BC Canada

PostPosted: Tue Apr 10, 2007 8:58 pm    Post subject:
It's actually the form.GetControls(); that is the issue.
Back to top
View user's profile Send private message MSN Messenger
admin
Site Admin


Joined: 05 Jul 2006
Posts: 351

PostPosted: Wed Apr 11, 2007 8:20 pm    Post subject:
You don't need to call the functions Application.GetForms() , form.GetControls() for searching a window or a control in a form. Use this functions only if you want to enumerate all top level windows or all controls in a form.

Please try the following:
Code: click into code to enlarge
Form form = Application.FindFormTitle("Untitled - Notepad");

if (form != null)
{
    Control b = form.FindControlName("loginButton");

    if (b != null)
    {
        System.Diagnostics.Debug.WriteLine(b.Text);
    }
}


You can find similar samples in the Ranorex Samples directory.

Gabor
Ranorex Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Ranorex Forum Index -> Bug Reports All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum