1

My Delphi 13 Android project has Range Checking turned OFF for the Release configurations.

The project runs in Debug mode as expected.

Running the project in Release mode has the TNetHTTPClient.Get() method causing an error which triggers the component's OnRequestError event.

procedure TMainForm.NetHTTPClientRequestError(const Sender: TObject; const AError: string);
begin
  gDebugStrings.Add(AError);
end;

AError has the value of 'Range Check Error'.

The same string is being passed to TNetHTTPClient.Get() in Debug and Release modes.

How do I figure out what is causing the Range Check error?

The error message is composed of the words 'Range check error' but there appears to be no actual range check error. Searching C:\Program Files (x86)\Embarcadero\Studio\37.0\source\rtl\net for the phrase 'range check' turns up nothing.

6
  • You would have to debug your app on an Android device and step into the source code for TNetHTTPClient with the Delphi debugger. You should file a bug report with Embarcadero. Commented Oct 16 at 20:47
  • Thanks, @RemyLebeau. I turned off Range checking in both Debug and Release. The Release version still calls the error handler with AError set to 'Range check error'. I wish there were a way to step through the code in Release mode. :) Commented Oct 16 at 22:40
  • 1
    You might have to resort to the old-fashioned approach of inserting checks in your code that pop up message boxes or similar, including using Assert calls. Instead of message boxes, adding a TMemo and writing your own messages there is an option. Commented Oct 16 at 23:01
  • 1
    @MikeatBookup you can enable Debug DCUs in Release mode Commented Oct 16 at 23:10
  • 1
    @PhilipJ.Rayment that won't help diagnose errors that are happening inside of the TNetHTTPClient component itself. Commented Oct 16 at 23:10

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.