Here are the most effective steps to troubleshoot and resolve the R0035 error: 1. Register the External Control (OCX/DLL)
If none of the above works:
Do not assume ConnectToNewObject always succeeds. Wrap OLE calls in error handling code to pinpoint the failure. powerbuilder
Right-click each library (PBL) and select . This removes deleted object fragments and defragments the library file. Right-click the Target and select Full Build . Step 2: Implement Strict Null Object Checking powerbuilder application execution error r0035
PowerBuilder Application Execution Error R0035 The PowerBuilder error is a runtime exception that occurs when an application fails to execute a function on an external object , such as an OLE (Object Linking and Embedding) control, an OCX, or a COM server . The primary cause is typically a communication failure between PowerBuilder and the external component, often because the component is missing, unregistered, or has crashed. 1. Root Cause Identification
: The OLE request took longer than the default timeout (typically 5 minutes). In these cases, R0035 occurs if the timeout period is reached during a call. API Mismatches
: In PowerBuilder, use the OLE Browser (found under Tools -> Browser -> OLE tab) to verify that the properties and functions you are calling actually exist in the registered object. Debugging with pbdebug Here are the most effective steps to troubleshoot
Application Execution Error (R0035): Screen general protection fault.
Troubleshooting PowerBuilder Application Execution Error R0035
file) is not registered on the system or is missing entirely. Object State Failures powerbuilder Right-click each library (PBL) and select
The most common cause is an . By default, PowerBuilder waits for 5 minutes (300,000 milliseconds) for an OLE request to complete. If an external server (e.g., Microsoft Word, Excel) or an OLE object is busy or hung and does not respond within this period, PowerBuilder aborts the operation and throws r0035. A PowerBuilder OLE call can time out when the OLE server is hung, or a specific operation takes longer than five minutes.
Older PowerBuilder versions (e.g., 10, 11.5, 12.5) were not originally designed for modern operating systems like Windows 10 or Windows 11. Running these applications on newer OS versions can lead to , often due to stricter security settings, User Account Control (UAC), or changes in the way external components are handled by the OS. A notable compatibility issue on Windows 11 can cause programs to crash when using more than 1000 MB of memory, with compatibility mode often resolving these stability issues.
The error message points to the failing function and its location. For example: Error calling external object function uf_process_data at line 45 in clicked event of command button cb_process . This tells you exactly which external function is causing the issue, saving time.
: The external server (like a background instance of Excel) has crashed, "died," or been closed by the user while the PowerBuilder application was still trying to communicate with it. Automation Timeout