Watch, Follow, &
Connect with Us

Please visit our new home

Public Report
Report From: Delphi-BCB/Compiler    [ Add a report in this area ]  
Report #:  118795   Status: Resolved
[Android] SOAP + Android -> Sigsev 11 with no stack trace and debugger hang
Project:  Delphi Build #:  19.0.13476.4176
Version:    19.0 Submitted By:   Jose Antonio Sanchez Lazaro
Report Type:  Crash / Data loss / Total failure Date Reported:  9/9/2013 2:51:42 AM
Severity:    Serious / Highly visible problem Last Updated: 1/30/2015 11:58:57 PM
Platform:    Google mobile OS Internal Tracking #:   43679
Resolution: Checked In (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: (5 Total Ratings)
5.00 out of 5
Total Votes: 60
Webservices working on Windows, OSX and iOS crash on Android, and nearly hangs the IDE, so it's impossible to debug the source of the problem.

The request is send to the server (monitored with fiddler) but somewhere processing the response crash.
Steps to Reproduce:
Run the attached test case.

   The request is send to the server, the response is parsed, and the label shows the text "works!"
   The request is send to the server. The debugger hangs for a while, then a dialog showing a segmentation fault exception is show.
   The IDE hangs again; when it responses again, there is no stacktrace, nor local variables, anything. And trying to do anything hangs the IDE again. (see the screenshot)

I updated this report as I found this is a compiler problem, and not a problem with the Soap units.

There are at least two common functions that can crash (AV) at runtime if compiled with the Android compiler.

procedure DateTimeToString(var Result: string; const Format: string;
  DateTime: TDateTime; const AFormatSettings: TFormatSettings);

function TIdCookie.ParseServerCookie(const ACookieText: String; AURI: TIdURI): Boolean;

Both functions have inner functions defined that are using the function's common variables. This way they crash.
If the common variables are moved down, just before the begin statement, and added to the inner functions as parameters, the crash is gone.
The compiler doesn't handle well this situation, and corrupts the memory.

There is also a third crash I have been not managed to workaround in


when called from gettimeZoneBias raises an exception under some circunstances.

All this problems, and maybe more, make SOAP totally broken on Android.
The same code is working on iOS/Win32/OSX

Alysson Cunha at 9/28/2013 10:14:54 AM -
Does Delphi SOAP client implementation uses Threads? Or maybe.. are you using threads?

If yes, please, see QC report 119352 ... It may be related to this QC report.

Markus Humm at 2/18/2014 11:20:55 AM -

status of this report is a bit dubious: it's open but still on "need more info"? Which one is it as one of those two normally precludes the other one.



Server Response from: ETNACODE01