Ranorex

Attempted to read or write protected memory.

 
Post new topic   Reply to topic    Ranorex Forum Index -> RanorexNet
View previous topic :: View next topic  
Author Message
sush



Joined: 31 Aug 2007
Posts: 2
Location: Graz/Austria

PostPosted: Thu Jul 24, 2008 9:36 am    Post subject: Attempted to read or write protected memory.
Hi

We are switching from 1.2 to 1.5 and have some problems :
Code: click into code to enlarge
 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: click into code to enlarge
        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
Back to top
View user's profile Send private message Visit poster's website
Support Team
Site Admin


Joined: 07 Jul 2006
Posts: 435

PostPosted: Fri Jul 25, 2008 3:59 pm    Post subject:
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
Back to top
View user's profile Send private message Visit poster's website
Support Team
Site Admin


Joined: 07 Jul 2006
Posts: 435

PostPosted: Thu Jul 31, 2008 4:42 pm    Post subject:
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
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 -> RanorexNet 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