Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Data Snap connection crash opening in 64 bit devices



Permlink Replies: 8 - Last Post: Oct 7, 2015 9:08 AM Last Post By: Tom Suhler
giuseppe magistro

Posts: 69
Registered: 2/21/05
Data Snap connection crash opening in 64 bit devices
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 17, 2015 6:00 PM
hi all,
my xe8.1 app crash on start in iOs9, so i recompiled in seattle and now begin the strange....

on 32 bit device (ipad2 with ios9) and various simulators all is ok, on real 64 bit devices (iphone 5s and 6) the app crash when try to opend datasnap connection .

any idea ?

thanks in advance

Beppe
giuseppe magistro

Posts: 69
Registered: 2/21/05
Re: Data Snap connection crash opening in 64 bit devices
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 18, 2015 12:50 AM   in response to: giuseppe magistro in response to: giuseppe magistro
giuseppe magistro wrote:
hi all,
my xe8.1 app crash on start in iOs9, so i recompiled in seattle and now begin the strange....

on 32 bit device (ipad2 with ios9) and various simulators all is ok, on real 64 bit devices (iphone 5s and 6) the app crash when try to opend datasnap connection .

any idea ?

thanks in advance

Beppe

The error is : First chance exception at $0000000000000000. Exception class EExternalException with message 'External exception 434C4E47432B2B00
Zoe Tecnologia

Posts: 1
Registered: 1/18/14
Re: Data Snap connection crash opening in 64 bit devices
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 18, 2015 12:42 PM   in response to: giuseppe magistro in response to: giuseppe magistro
I downloaded 10 Delphi Seattle and compiled the project.

In iOS9 simulator all right, but the iPhone 5 (device) the same mistake (External exception 434C4E47432B2B00) occurs when I try to connect to the DataSnap server.
giuseppe magistro

Posts: 69
Registered: 2/21/05
Re: Data Snap connection crash opening in 64 bit devices
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 18, 2015 3:43 PM   in response to: Zoe Tecnologia in response to: Zoe Tecnologia
Zoe Tecnologia wrote:
I downloaded 10 Delphi Seattle and compiled the project.

In iOS9 simulator all right, but the iPhone 5 (device) the same mistake (External 434C4E47432B2B00 exception) occurs when I try to connect to the DataSnap server.

Hi, i founded a workaround , is not a perfect solution but worked for me :

the problem is in data.dbx common , i copied the source in my project folder and i modified at line 10500 as below.

procedure TDBXDatabaseMetaData.Init(Connection: TDBXConnection);
var
Reader: TDBXReader;
Command: TDBXCommand;
begin
inherited Create;
Reader := nil;
Command := nil;
try
Command := Connection.DerivedCreateCommand;
Command.CommandType := TDBXCommandTypes.DbxMetaData;
Command.Text := TDBXMetaDataCommands.GetDatabase;
Reader := Command.ExecuteQuery;

Reader.Next;

FQuoteChar := Reader[TDBXMetaDatabaseColumnNames.QuoteChar].GetWideString;
FProcedureQuoteChar := Reader[TDBXMetaDatabaseColumnNames.ProcedureQuoteChar].GetWideString;
// FMaxCommands := Reader[TDBXMetaDatabaseColumnNames.MaxCommands].GetInt32;
// FSupportsTransactions := Reader[TDBXMetaDatabaseColumnNames.SupportsTransactions].GetBoolean;
// FSupportsNestedTransactions := Reader[TDBXMetaDatabaseColumnNames.SupportsNestedTransactions].GetBoolean;
// FSupportsRowSetSize := Reader[TDBXMetaDatabaseColumnNames.SupportsRowSetSize].GetBoolean;

// MetaData from a MetaDataProvider has more information:
if Reader.ColumnCount >= 10 then
begin
FMetaDataVersion := DBXVersion40;
FQuotePrefix := Reader[TDBXMetaDatabaseColumnNames.QuotePrefix].GetWideString;
FQuoteSuffix := Reader[TDBXMetaDatabaseColumnNames.QuoteSuffix].GetWideString;
// FSupportsLowerCaseIdentifiers := Reader[TDBXMetaDatabaseColumnNames.SupportsLowerCaseIdentifiers].GetBoolean;
// FSupportsUpperCaseIdentifiers := Reader[TDBXMetaDatabaseColumnNames.SupportsUpperCaseIdentifiers].GetBoolean;
// FSupportsSPReturnCode := Reader[TDBXMetaDatabaseColumnNames.SupportsSPReturnCode].GetBoolean;
// if Reader.FindOrdinal(TDBXMetaDatabaseColumnNames.SupportsParameterMetadata, 0, Length(Reader.Values)) <> -1 then
// FSupportsParameterMetadata := Reader[TDBXMetaDatabaseColumnNames.SupportsParameterMetadata].GetBoolean;
// if Reader.FindOrdinal(TDBXMetaDatabaseColumnNames.SupportsCatalogFunctions, 0, Length(Reader.Values)) <> -1 then
// FSupportsCatalogFunctions := Reader[TDBXMetaDatabaseColumnNames.SupportsCatalogFunctions].GetBoolean;
// if Reader.FindOrdinal(TDBXMetaDatabaseColumnNames.SupportsCatalogs, 0, Length(Reader.Values)) <> -1 then
// FSupportsCatalogs := Reader[TDBXMetaDatabaseColumnNames.SupportsCatalogs].GetBoolean;
// if Reader.FindOrdinal(TDBXMetaDatabaseColumnNames.SupportsSchemas, 0, Length(Reader.Values)) <> -1 then
// FSupportsSchemas := Reader[TDBXMetaDatabaseColumnNames.SupportsSchemas].GetBoolean;
end
else if Self is TDBXDataBaseMetadata then
FMetaDataVersion := DBXVersion30;
finally
Reader.Free;
Command.Free;
end;
end;
Johan van den H...

Posts: 1
Registered: 12/3/12
Re: Data Snap connection crash opening in 64 bit devices
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 23, 2015 12:44 PM   in response to: giuseppe magistro in response to: giuseppe magistro
I downloaded the trial version of XE10 and ran into the same error. In the trial version there is no Data.DBXCommon.pas source file included. When is there a patch available? Before I buy the new version I need to know for sure that it will work with data snap.
Gencom RD4

Posts: 6
Registered: 3/1/13
Re: Data Snap connection crash opening in 64 bit devices
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 2, 2015 4:24 AM   in response to: giuseppe magistro in response to: giuseppe magistro
giuseppe magistro wrote:
Zoe Tecnologia wrote:
I downloaded 10 Delphi Seattle and compiled the project.

In iOS9 simulator all right, but the iPhone 5 (device) the same mistake (External 434C4E47432B2B00 exception) occurs when I try to connect to the DataSnap server.

Hi, i founded a workaround , is not a perfect solution but worked for me :

the problem is in data.dbx common , i copied the source in my project folder and i modified at line 10500 as below.

procedure TDBXDatabaseMetaData.Init(Connection: TDBXConnection);
var
Reader: TDBXReader;
Command: TDBXCommand;
begin
inherited Create;
Reader := nil;
Command := nil;
try
Command := Connection.DerivedCreateCommand;
Command.CommandType := TDBXCommandTypes.DbxMetaData;
Command.Text := TDBXMetaDataCommands.GetDatabase;
Reader := Command.ExecuteQuery;

Reader.Next;

FQuoteChar := Reader[TDBXMetaDatabaseColumnNames.QuoteChar].GetWideString;
FProcedureQuoteChar := Reader[TDBXMetaDatabaseColumnNames.ProcedureQuoteChar].GetWideString;
// FMaxCommands := Reader[TDBXMetaDatabaseColumnNames.MaxCommands].GetInt32;
// FSupportsTransactions := Reader[TDBXMetaDatabaseColumnNames.SupportsTransactions].GetBoolean;
// FSupportsNestedTransactions := Reader[TDBXMetaDatabaseColumnNames.SupportsNestedTransactions].GetBoolean;
// FSupportsRowSetSize := Reader[TDBXMetaDatabaseColumnNames.SupportsRowSetSize].GetBoolean;

// MetaData from a MetaDataProvider has more information:
if Reader.ColumnCount >= 10 then
begin
FMetaDataVersion := DBXVersion40;
FQuotePrefix := Reader[TDBXMetaDatabaseColumnNames.QuotePrefix].GetWideString;
FQuoteSuffix := Reader[TDBXMetaDatabaseColumnNames.QuoteSuffix].GetWideString;
// FSupportsLowerCaseIdentifiers := Reader[TDBXMetaDatabaseColumnNames.SupportsLowerCaseIdentifiers].GetBoolean;
// FSupportsUpperCaseIdentifiers := Reader[TDBXMetaDatabaseColumnNames.SupportsUpperCaseIdentifiers].GetBoolean;
// FSupportsSPReturnCode := Reader[TDBXMetaDatabaseColumnNames.SupportsSPReturnCode].GetBoolean;
// if Reader.FindOrdinal(TDBXMetaDatabaseColumnNames.SupportsParameterMetadata, 0, Length(Reader.Values)) <> -1 then
// FSupportsParameterMetadata := Reader[TDBXMetaDatabaseColumnNames.SupportsParameterMetadata].GetBoolean;
// if Reader.FindOrdinal(TDBXMetaDatabaseColumnNames.SupportsCatalogFunctions, 0, Length(Reader.Values)) <> -1 then
// FSupportsCatalogFunctions := Reader[TDBXMetaDatabaseColumnNames.SupportsCatalogFunctions].GetBoolean;
// if Reader.FindOrdinal(TDBXMetaDatabaseColumnNames.SupportsCatalogs, 0, Length(Reader.Values)) <> -1 then
// FSupportsCatalogs := Reader[TDBXMetaDatabaseColumnNames.SupportsCatalogs].GetBoolean;
// if Reader.FindOrdinal(TDBXMetaDatabaseColumnNames.SupportsSchemas, 0, Length(Reader.Values)) <> -1 then
// FSupportsSchemas := Reader[TDBXMetaDatabaseColumnNames.SupportsSchemas].GetBoolean;
end
else if Self is TDBXDataBaseMetadata then
FMetaDataVersion := DBXVersion30;
finally
Reader.Free;
Command.Free;
end;
end;

Unfortunately this workaround doesn't work for me. Any more ideas?
giuseppe magistro

Posts: 69
Registered: 2/21/05
Re: Data Snap connection crash opening in 64 bit devices
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 2, 2015 2:45 PM   in response to: Gencom RD4 in response to: Gencom RD4
Gencom RD4 wrote:
giuseppe magistro wrote:
Zoe Tecnologia wrote:
I downloaded 10 Delphi Seattle and compiled the project.

In iOS9 simulator all right, but the iPhone 5 (device) the same mistake (External 434C4E47432B2B00 exception) occurs when I try to connect to the DataSnap server.

Hi, i founded a workaround , is not a perfect solution but worked for me :

the problem is in data.dbx common , i copied the source in my project folder and i modified at line 10500 as below.

procedure TDBXDatabaseMetaData.Init(Connection: TDBXConnection);
var
Reader: TDBXReader;
Command: TDBXCommand;
begin
inherited Create;
Reader := nil;
Command := nil;
try
Command := Connection.DerivedCreateCommand;
Command.CommandType := TDBXCommandTypes.DbxMetaData;
Command.Text := TDBXMetaDataCommands.GetDatabase;
Reader := Command.ExecuteQuery;

Reader.Next;

FQuoteChar := Reader[TDBXMetaDatabaseColumnNames.QuoteChar].GetWideString;
FProcedureQuoteChar := Reader[TDBXMetaDatabaseColumnNames.ProcedureQuoteChar].GetWideString;
// FMaxCommands := Reader[TDBXMetaDatabaseColumnNames.MaxCommands].GetInt32;
// FSupportsTransactions := Reader[TDBXMetaDatabaseColumnNames.SupportsTransactions].GetBoolean;
// FSupportsNestedTransactions := Reader[TDBXMetaDatabaseColumnNames.SupportsNestedTransactions].GetBoolean;
// FSupportsRowSetSize := Reader[TDBXMetaDatabaseColumnNames.SupportsRowSetSize].GetBoolean;

// MetaData from a MetaDataProvider has more information:
if Reader.ColumnCount >= 10 then
begin
FMetaDataVersion := DBXVersion40;
FQuotePrefix := Reader[TDBXMetaDatabaseColumnNames.QuotePrefix].GetWideString;
FQuoteSuffix := Reader[TDBXMetaDatabaseColumnNames.QuoteSuffix].GetWideString;
// FSupportsLowerCaseIdentifiers := Reader[TDBXMetaDatabaseColumnNames.SupportsLowerCaseIdentifiers].GetBoolean;
// FSupportsUpperCaseIdentifiers := Reader[TDBXMetaDatabaseColumnNames.SupportsUpperCaseIdentifiers].GetBoolean;
// FSupportsSPReturnCode := Reader[TDBXMetaDatabaseColumnNames.SupportsSPReturnCode].GetBoolean;
// if Reader.FindOrdinal(TDBXMetaDatabaseColumnNames.SupportsParameterMetadata, 0, Length(Reader.Values)) <> -1 then
// FSupportsParameterMetadata := Reader[TDBXMetaDatabaseColumnNames.SupportsParameterMetadata].GetBoolean;
// if Reader.FindOrdinal(TDBXMetaDatabaseColumnNames.SupportsCatalogFunctions, 0, Length(Reader.Values)) <> -1 then
// FSupportsCatalogFunctions := Reader[TDBXMetaDatabaseColumnNames.SupportsCatalogFunctions].GetBoolean;
// if Reader.FindOrdinal(TDBXMetaDatabaseColumnNames.SupportsCatalogs, 0, Length(Reader.Values)) <> -1 then
// FSupportsCatalogs := Reader[TDBXMetaDatabaseColumnNames.SupportsCatalogs].GetBoolean;
// if Reader.FindOrdinal(TDBXMetaDatabaseColumnNames.SupportsSchemas, 0, Length(Reader.Values)) <> -1 then
// FSupportsSchemas := Reader[TDBXMetaDatabaseColumnNames.SupportsSchemas].GetBoolean;
end
else if Self is TDBXDataBaseMetadata then
FMetaDataVersion := DBXVersion30;
finally
Reader.Free;
Command.Free;
end;
end;

Unfortunately this workaround doesn't work for me. Any more ideas?

honestly not , i arrived to this solution debugging app line by line , may be you have different connection configuration. we need an official solution
Gencom RD4

Posts: 6
Registered: 3/1/13
Re: Data Snap connection crash opening in 64 bit devices
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 7, 2015 6:39 AM   in response to: giuseppe magistro in response to: giuseppe magistro

honestly not , i arrived to this solution debugging app line by line , may be you have different connection configuration. we need an official solution

Short update about this issue, this workaround works but only for 64bit devices and it looks like it is not needed for 32bit devices. As soon as I upgraded iOS to 9.0.2 and rebuild the project, the app worked on 32 bit devices without this workaround. However, it was needed for 64bit devices. Also, before rebuilding your project in XE10, developers should be 100% sure that they don't have CR characters in Entitlement.TemplateiOS.xml file (see Sarina DuPont instructions). That will also crash the app.
Tom Suhler

Posts: 23
Registered: 9/9/01
Re: Data Snap connection crash opening in 64 bit devices
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 7, 2015 9:08 AM   in response to: Gencom RD4 in response to: Gencom RD4
This post has been very helpful. I've been trying to submit an app to Apple for months. This fixed the crashing problem. Perhaps I should be paying you instead of Embarcadero.

Thanks again.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02