Powerbuilder - Application Execution Error R0035

In PowerBuilder, the Application Execution Error R0035 is a runtime error defined as "Error calling external object function." It typically occurs when a PowerScript tries to execute a method or function on an external object—usually an OLE (Object Linking and Embedding) or ActiveX control—and the call fails. Common Causes

The error is rarely about the PowerScript code itself and usually points to environment or registration issues:

Unregistered OLE/ActiveX Controls: The specific .ocx or .dll file for the control being called is not registered on the target machine.

Missing Dependencies: The external object relies on other system files (like specific Visual C++ Redistributables) that are not present.

Object State Issues: The external OLE server may have crashed or "died" in the background before the function could be called.

Pathing Problems: The application cannot find the required DLL because it is not in the same directory as the executable or in the Windows System path.

Bit-Alignment Mismatch: Trying to call a 16-bit DLL from a 32-bit application, or a 32-bit DLL from a 64-bit application. Troubleshooting and Solutions

Register the Control: Use the Windows Command Prompt (as Administrator) to manually register the required file: Command: regsvr32 "C:\Path\To\YourControl.ocx" powerbuilder application execution error r0035

Verify Object Initialization: Ensure the OLE object is correctly instantiated (using CREATE or ConnectToObject) before calling its functions.

Check for Missing Files: Use tools like Dependency Walker to see if the external object is missing any required system libraries.

Implement Exception Handling: Wrap the call in a TRY...CATCH block for OLERuntimeError to capture more detailed information about why the call is failing without crashing the app.

Full Rebuild: If the error occurs after an upgrade, perform a Full Rebuild or Regenerate the objects in the PowerBuilder IDE to ensure all ancestor/descendant hierarchies are correctly compiled.

For more technical support, you can search for similar cases on the Appeon Community Q&A or the SAP Technology Q&A forums. PowerBuilder Application Execution Error R0035!

That is an interesting error message to see in a paper title! It immediately sounds like a postmortem or a forensic case study, rather than a traditional research paper.

While I cannot browse live links to find the exact paper you are referencing (if it is pre-print or in a specific journal), I can infer exactly what kind of "interesting paper" this would be based on the error code PowerBuilder R0035. In PowerBuilder, the Application Execution Error R0035 is

Here is the likely premise of that paper:

The Core Error: R0035 In PowerBuilder (a legacy enterprise RAD tool from Sybase/SAP), R0035 is a fatal runtime error: "Application terminated." It typically fires when the PowerBuilder Virtual Machine hits a critical, unrecoverable state, such as:

What makes the paper "interesting"? An academic or engineering paper focused on this error would likely cover one of three fascinating scenarios:

  1. The Migration Nightmare (Legacy Systems)
    • Context: A large bank, insurance firm, or hospital trying to move a PB 9/10 application to Windows 10/11 or a 64-bit environment.
    • Finding: R0035 suddenly appears because old PBDs were inadvertently compiled with different byte-ordering or memory models. The paper would detail a heuristic for finding the exact bad library without source code.
  2. The Anti-Debugging Trick (Malware Analysis)
    • Context: Attackers used a PowerBuilder wrapper to evade EDR (Endpoint Detection). R0035 is triggered intentionally when a debugger is attached, causing the process to self-terminate.
    • Finding: The paper describes how to bypass this by hooking the PBVM (PowerBuilder Virtual Machine) DLL entry points.
  3. The Forensic Artifact (Data Recovery)
    • Context: A corrupt PowerBuilder executable threw R0035, but the database connection parameters and last executed SQL query were still in memory.
    • Finding: The paper demonstrates a memory forensics technique (Volatility) to extract the connection string and uncommitted transactions from the crash dump, bypassing the broken GUI.

If you are looking for that specific paper:

It may be a whitepaper from Appeon (who now owns PowerBuilder) or a technical note from a maintenance company like WPC Software.

To find it exactly, you would search:

Could you provide a source or an author name? If you tell me where you saw it (e.g., ACM Digital Library, arXiv, a specific conference like ICSOFT), I can help you find the exact PDF or tell you its specific thesis. A stack overflow due to infinite recursion

Here’s a comprehensive review of the PowerBuilder Application Execution Error R0035, including what it means, common causes, symptoms, and step-by-step troubleshooting solutions.


How to Fix Error R0035

Step 2: Debugging "Just In Time"

  1. Run the application in the PowerBuilder Debug mode.
  2. If the application crashes to the desktop with R0035, look at the Call Stack.
  3. The line at the top of the stack is usually the culprit.

Fix 3: Deploy Full Runtime Redistributable

Never assume the user has PowerBuilder installed. Deploy the official PowerBuilder runtime merge modules or the standalone PB Runtime Pack (e.g., PB105_RuntimePack.msi).

Required files for PB 12.5 (example):

Troubleshooting Guide: PowerBuilder Application Execution Error R0035

Scenario A: Calling a DLL (Local External Functions)

If you are declaring a function in the "Local External Functions" section of a painter and calling it, follow these steps:

  1. Check Case Sensitivity:

    • Open your DLL in a tool like Dependency Walker (depends.exe) or PE Explorer.
    • Find the exact function name.
    • Copy the name exactly as it appears (e.g., GetUserInfo is different from getuserinfo).
    • Paste that exact name into your PowerBuilder FUNCTION declaration.
  2. Check the Declaration Syntax:

    • Ensure the LIBRARY clause points to the correct file name.
    • Ensure the parameter types match the DLL's expectations. For example, passing a String when the DLL expects a Long pointer will crash the call.
  3. Check DLL Location:

    • Is the DLL in the application directory? If not, is it in the Windows System folder or the PATH environment variable?

Common Causes

  1. Missing or corrupted PBR file – The compiled executable expects a specific PBR file (PowerBuilder Resource file) containing bitmap, icon, or other resource references.
  2. Incorrect file path – The PBR file is not in the expected directory or the path is hardcoded incorrectly.
  3. Deployment issue – The PBR file was not included when deploying the application.
  4. Runtime DLL mismatch – Incompatible versions of PowerBuilder runtime DLLs (e.g., pbrtcrt*.dll, pbvm*.dll).
  5. Registry corruption – Missing or invalid registry entries for PowerBuilder runtime.
  6. File permissions – The application or user does not have read access to the PBR file or its directory.
  7. Antivirus/security software – Blocking or quarantining the PBR file.