Attempted to read or write protected memory. : Automation API

Attempted to read or write protected memory.

Class library usage, coding and language questions.

Attempted to read or write protected memory.

Postby sush » Thu Jul 24, 2008 9:36 am

Hi

We are switching from 1.2 to 1.5 and have some problems :
Code: Select all
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.      at Ranorex.NativeMethods.RxElementGetChild(ElementStruct& element, Int32 index, ElementStruct& child)
   at Ranorex.Element.GetChild(Int32 index)
   at YouROpen.GuiTester.OutputWindow.DumpElementTree(Element element, String Compare, Int32 level, String& sMessage)


while searching in a 'WindowsForms10.Window.8.app.0.2' 'oBottomDockBar' with
Code: Select all
        private void DumpElementTree(Element element, string Compare, int level, ref string sMessage)
        {
            level++;
            int childCount = element.ChildCount;

            Logger.Log.Info("DumpElementTree - now in level : " + level ); //FIXME
            for (int index = 0; index < childCount; index++)
            {
                Element child = element.GetChild(index);
                if (child == null)
                {
                    continue;
                }
                Logger.Log.Info("DumpElementTree - now in level : " + level + "  child.Name: " + child.Name + " sMessage: " + sMessage); //FIXME
                if (child.Name.Contains(Compare))
                {
                    sMessage = child.Name.Replace(" " + Compare, "").Replace(" ", "");
                }

                DumpElementTree(child, Compare, level, ref sMessage);
            }
        }

It happens very random (One Testrun in 60) and seldom at the same Testcase.
Are there known Issues, Modifications in this function or do you have another suggestion ?

best regards.andreas
sush
 
Posts: 2
Joined: Fri Aug 31, 2007 3:56 pm
Location: Graz/Austria

Postby Support Team » Fri Jul 25, 2008 3:59 pm

We are currently investigating this problem. However, as it is difficult to reproduce, it might take some time. For now, the best solutions is to encapsulate this method with a try-catch block.

Regards,
Alex
Ranorex Support Team
User avatar
Support Team
Site Admin
 
Posts: 4837
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Postby Support Team » Thu Jul 31, 2008 4:42 pm

We've found a bug in the memory managment of the RanorexCore that could cause this AccessViolationException. The bug will be fixed in the next minor version of Ranorex.

Regards,
Alex
Ranorex Support Team
User avatar
Support Team
Site Admin
 
Posts: 4837
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: Attempted to read or write protected memory.

Postby balajichandan » Thu Jun 18, 2009 1:23 pm

Currently I am using Ranorex 1.5. Can I know if this is already fixed in later versions of Ranorex. If yes, can we know the version with this fix.
balajichandan
 
Posts: 24
Joined: Tue Apr 14, 2009 1:29 pm

Re: Attempted to read or write protected memory.

Postby Support Team » Fri Jun 19, 2009 4:52 pm

The latest available Ranorex 1.X version is 1.5.1.5519. Ranorex 1.X versions are available to existing Ranorex 1.X customers only and can be requested by sending an email to support_at_ranorex.com.

Regards,
Alex
Ranorex Support Team
User avatar
Support Team
Site Admin
 
Posts: 4837
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria


Return to Automation API

Who is online

Users browsing this forum: No registered users and 0 guests