Topic
  • 7 replies
  • Latest Post - ‏2012-12-21T07:42:53Z by SystemAdmin
SystemAdmin
SystemAdmin
16727 Posts

Pinned topic exception_name = System.AccessViolationException

‏2012-12-11T17:30:21Z |
Hi Everyone - I did a bunch of searching before posting the question, so I apologize for being a newbie. I get the error message below from time to time while running RFT. I cannot find any rhyme or reason for it to happen so I thought I would turn to the experts. In the beginning of my script I added the if statement below this paragraph to have the script wait for the browser in case it was slow to connect. Could that be it? Is there a better way to wait for the page to load? Does this have nothing to do with the error?

Do Until MyObject.Exists
Sleep(1)
Loop

I assume many have run into this issue. Any and all guidance would be greatly appreciated. Thanks so much. Talk to you soon.

I am using RFT 8.2.2 and vb.net module with Visual Studio 2005.
exception_name = System.AccessViolationException
exception_message = Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
script_name = SBO_Login
script_id = SBO_Login.vb
line_number = 31
exception_stack = at Rational.Test.Ft.Enabler.Browser.InfestNS4xOnDemand()
at Rational.Test.Ft.Object.Interfaces.TestObject.Exists()
at SBO_Login.TestMain(Object[] args) in C:\RFT_Code\MessaDotOrg\MessaDotOrg\SBO_Login.vb:line 31
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
Updated on 2012-12-21T07:42:53Z at 2012-12-21T07:42:53Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    16727 Posts

    Re: exception_name = System.AccessViolationException

    ‏2012-12-12T06:50:58Z  
    Hi,

    You can wait for the browser object: browser().waitForExistance().

    This error looks like MyObject is found using find() method and it is somehow unregistered. How do you create MyObject?
  • SystemAdmin
    SystemAdmin
    16727 Posts

    Re: exception_name = System.AccessViolationException

    ‏2012-12-12T12:59:57Z  
    Hi,

    You can wait for the browser object: browser().waitForExistance().

    This error looks like MyObject is found using find() method and it is somehow unregistered. How do you create MyObject?
    It is actually an object that I recorded. The object is a link. Should I be using something else? Is this because it is a link versus some other kind of object?

    Thanks for the help. I appreciate it.

    Derek
  • SystemAdmin
    SystemAdmin
    16727 Posts

    Re: exception_name = System.AccessViolationException

    ‏2012-12-12T13:04:11Z  
    It is actually an object that I recorded. The object is a link. Should I be using something else? Is this because it is a link versus some other kind of object?

    Thanks for the help. I appreciate it.

    Derek
    There should be no problem with link. I'm not familiar with .net code produced by RFT, so I won't be able to help much.

    But you can use the object selector on the recording window and select "wait for object" option after selecting the object. It should create the necessary .net code to wait for the object.
  • SystemAdmin
    SystemAdmin
    16727 Posts

    Re: exception_name = System.AccessViolationException

    ‏2012-12-12T15:23:27Z  
    There should be no problem with link. I'm not familiar with .net code produced by RFT, so I won't be able to help much.

    But you can use the object selector on the recording window and select "wait for object" option after selecting the object. It should create the necessary .net code to wait for the object.
    I shall give it a try. Thanks so much for pointing me in the right direction. Take care and thanks again.

    Derek
  • SystemAdmin
    SystemAdmin
    16727 Posts

    Re: exception_name = System.AccessViolationException

    ‏2012-12-12T17:39:25Z  
    You can use below check to see if the browser is in loaded or not:

    (Integer.parseInt(browserTO.getProperty(".readyState").toString()) == 4) // ==4 means browser is loaded.
  • SystemAdmin
    SystemAdmin
    16727 Posts

    Re: exception_name = System.AccessViolationException

    ‏2012-12-17T15:56:02Z  
    You can use below check to see if the browser is in loaded or not:

    (Integer.parseInt(browserTO.getProperty(".readyState").toString()) == 4) // ==4 means browser is loaded.
    Hey Everyone,

    No go. I am continuing to get this eror message. It is really hit or miss. Right now I get the error before it executes a line of code.
    I am using VB.net in Visual Studio 2005. I am wondering if this is a setting of some kind?!?!?!? Not sure.
    What do you think?

    Derek

    ERROR MESSAGE
    exception_name = System.AccessViolationException
    exception_message = Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
    script_name = SBO_Login
    script_id = SBO_Login.vb
    exception_stack = at Microsoft.Win32.Win32Native.CoTaskMemFree(IntPtr ptr)
    at IBM.arm40.Arm40NativeImplementation.armRegisterApplication(String applicationName, Byte] inAppIdBytes, Int32 flags, Object[ objects, Byte[] outAppIdBytes)
    at IBM.arm40.transaction.Arm40ApplicationDefinition.callArmRegisterApplication()
    at IBM.arm40.transaction.Arm40ApplicationDefinition..ctor(Int32 encoding, String name, IArmIdentityProperties identityProperties, IArmID id, Boolean callNative)
    at IBM.arm40.transaction.Arm40TransactionFactory.newArmApplicationDefinition(String name, IArmIdentityProperties identityProperties, IArmID id)
    at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
    at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
    at com.ibm.rational.test.lt.armbroker.impl.ArmBrokerImpl_TMTP.doArmInit()
    at com.ibm.rational.test.lt.armbroker.impl.ArmBrokerImpl_TMTP.armTransactionStart(ArmInfo parentArmInfo, String] transactionPropertyNames, String[ transactionPropertyValues, String userId, String transactionName)
    at com.ibm.rational.test.lt.arm.ArmManager.sendArmInfoStart(ArmInfo parentArmInfo, String] names, String[ values, String transName)
    at com.ibm.rational.test.lt.arm.ArmManager.sendTopArmInfoStart(ArmInfo parentArmInfo, String] names, String[ values, String transName)
  • SystemAdmin
    SystemAdmin
    16727 Posts

    Re: exception_name = System.AccessViolationException

    ‏2012-12-21T07:42:53Z  
    Hey Everyone,

    No go. I am continuing to get this eror message. It is really hit or miss. Right now I get the error before it executes a line of code.
    I am using VB.net in Visual Studio 2005. I am wondering if this is a setting of some kind?!?!?!? Not sure.
    What do you think?

    Derek

    ERROR MESSAGE
    exception_name = System.AccessViolationException
    exception_message = Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
    script_name = SBO_Login
    script_id = SBO_Login.vb
    exception_stack = at Microsoft.Win32.Win32Native.CoTaskMemFree(IntPtr ptr)
    at IBM.arm40.Arm40NativeImplementation.armRegisterApplication(String applicationName, Byte] inAppIdBytes, Int32 flags, Object[ objects, Byte[] outAppIdBytes)
    at IBM.arm40.transaction.Arm40ApplicationDefinition.callArmRegisterApplication()
    at IBM.arm40.transaction.Arm40ApplicationDefinition..ctor(Int32 encoding, String name, IArmIdentityProperties identityProperties, IArmID id, Boolean callNative)
    at IBM.arm40.transaction.Arm40TransactionFactory.newArmApplicationDefinition(String name, IArmIdentityProperties identityProperties, IArmID id)
    at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
    at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
    at com.ibm.rational.test.lt.armbroker.impl.ArmBrokerImpl_TMTP.doArmInit()
    at com.ibm.rational.test.lt.armbroker.impl.ArmBrokerImpl_TMTP.armTransactionStart(ArmInfo parentArmInfo, String] transactionPropertyNames, String[ transactionPropertyValues, String userId, String transactionName)
    at com.ibm.rational.test.lt.arm.ArmManager.sendArmInfoStart(ArmInfo parentArmInfo, String] names, String[ values, String transName)
    at com.ibm.rational.test.lt.arm.ArmManager.sendTopArmInfoStart(ArmInfo parentArmInfo, String] names, String[ values, String transName)
    Do you always get the error in the same script? Did you try to write another script on a common page (say google.com)?