R. E. Cook
Contact Us 

Dr. Cook

RunningShoes Library for WinRunner 

Custom WinRunner Functions 
and Utilities,
to Your Specs

A Random Collection of WinRunner Solutions

Creating DLLs for WinRunner 
"DLLs Demystified" 
(Mercury Interactive's Worldwide Users Conference 2000)

R. E. Cook Consulting


RPC Errors

If you work with your own extern functions, you will discover RPC errors long before you learn how to interpret them, recover from them, and best of all, avoid them in the first place. I hope this brief excerpt from the RunningShoes documentation will save you some of the grief we've all experienced when working with extern functions.

RPC (Remote Procedure Call) refers to the process WinRunner uses to access functions in a DLL. The RPC error message indicates only that some error occurred at some point in the call.

The dreaded RPC error message is utterly uninformative, but it must be taken seriously. It can refer to a variety of problems, some of which are:

The function isn't defined. The function has been declared as extern, so WinRunner knows it is not a TSL function, but WinRunner cannot find a matching function in any DLL that is currently loaded. That can mean the DLL isn't loaded, the function is not properly exported from the DLL, or simply that the function name is mispelled. It is safe to continue without restarting WinRunner after correcting this problem.

The function declaration does not match the function definition. At best, an incorrect declaration can simply prevent WinRunner from being able to call the function, if the number of parameters is wrong. At worst, a parameter of mode "out" or "inout" that is incorrectly declared "in" can corrupt the stack, causing a crash requiring rebooting the PC. To avoid this error with the RunningShoes library, DO NOT EDIT ANY OF THE RUNNINGSHOES SCRIPTS!

Parameter overflow. This overflow is caused by violating the string parameter constraints (passing string parameters that are too long either into or out of an extern function. (See the note on extern (DLL) functions and strings.) This error requires following the recovery process below to continue.

Memory access violation. This is completely out of control of the WinRunner user. This is caused by a programming defect within the DLL, such as a pointer out of bounds or a memory allocation error. This error will usually result in a memory access message appearing after the RPC error message. The memory access error will probably say something to the effect that an instruction tried to access memory at a given address (a large hex number).

Recovering from an RPC error

Recovering from an RPC error is often possible, but it can be messy. The following works with WinRunner 6.0 and 7.0 under Windows 2000. Other versions may differ slightly.

Close WinRunner. You are likely to see some messages about tests not being saved or otherwise handled properly. This is one of the reasons you should always save WinRunner tests before running them.

Make sure the WinRunner icon is gone from the task bar. Right-click the icon and choose Close WinRunner. You'll probably have to do that more than once.

Press Ctrl-Alt-Del to open the Windows Task Manager. On the Processes tab, select six_agnt.exe and press the End Process button. Do the same with wowexec.exe. Close the Task Manager.

If all goes well WinRunner can now be restarted. If not, reboot the PC.


Top of  This Page | R. E. Cook Home Page

Copyright R. E. Cook Consulting, 2000 - 2011.
All rights reserved.

The site is designed to look best when viewed with Internet Explorer 5.0 - 8.0. Results with other browsers will probably deviate from what is intended.

NOTE: This website refers to registered trademarks and service marks that are owned by other companies, including Mercury Interactive, WinRunner, TestDirector, TSL, Microsoft, Windows.