Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

application in android32 release mode hangs in splash screen #28

Open
dkounal opened this issue Jul 29, 2021 · 7 comments
Open

application in android32 release mode hangs in splash screen #28

dkounal opened this issue Jul 29, 2021 · 7 comments
Assignees
Labels

Comments

@dkounal
Copy link

dkounal commented Jul 29, 2021

I use Delphi 10.4.2 and I have Oneplus7 android 11

Steps to reproduce the behavior:
Just add DECCiphers in uses list in an activity, compile it in Android 32bit release mode, default settings:
a) run it without debugging from IDE and it hangs on splash screen.
b) run it with debugging from IDE and it gives error: Project .apk raised exception class Bus Error (10) (see image for stack/memory)
c) playing with Compiling options and rebuild it after each change:
i) Turning off optimization, the problem is solved
ii) If "Debug Information" or "Limited Debug information" is selected again the problem is solved.

In debug mode or in both modes of android64, everything is ok

The "exception class Bus Error" is described in the following link as a problem of the compiler for android32 with packed classes:
https://support.tmssoftware.com/t/exception-class-bus-error-when-saving-file/3623

DEC error

@MHumm
Copy link
Owner

MHumm commented Jul 29, 2021

  1. Can this have the same cause as this one?
    Hash FMX demo crashes on Android 32 bit in release mode #26
  2. What happens if you disable automatic registration of all cipher classes?

@dkounal
Copy link
Author

dkounal commented Jul 29, 2021

I disabled initialization section of DECCiphers.pas but then problem persists

@dkounal
Copy link
Author

dkounal commented Jul 29, 2021

I have disabled also initialization section of DECFormatBase, DECCipherBase, DECCRC and the problems stops

@MHumm
Copy link
Owner

MHumm commented Jul 29, 2021

Interesting research results you have.

I have the same crash with this code:
`unit MainForm;

interface

uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs,
FMX.Controls.Presentation, FMX.StdCtrls;

type
TForm2 = class(TForm)
Button1: TButton;
Label1: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;

var
Form2: TForm2;

implementation

uses
DECHash;

{$R *.fmx}

procedure TForm2.Button1Click(Sender: TObject);
var
Hash: THash_MD5;
begin

Hash := THash_MD5.Create;
Try
sleep(1000);
Finally
Hash.Free;
End;

Label1.Text := 'Finished';
end;

end.`

As you can see that only uses DECHash and what DECHash uses. It leads to the same error and when disabling the code in the initialization sections of DECHash, DECCRC and DECFormatBase it doesn't help.

There is a closed QP report about something maybe related:
https://quality.embarcadero.com/browse/RSP-18188

It talks about packed records, which are used in DEC as well, but I don't know yet why they are used in DEC.

@dkounal
Copy link
Author

dkounal commented Jul 29, 2021

This problem should exist also in Delphi 10.3.3 as it says in the above link from tmssoftware.
How possible do you believe it can be fixed in DEC?

@dkounal
Copy link
Author

dkounal commented Jul 30, 2021

@MHumm
Copy link
Owner

MHumm commented Jul 30, 2021

That may be a compiler bug, but maybe you can narrow it down further so we can check which one if anyone of those and maybe even work around those? Example: I saw now, that DEC often uses packed records, but I don't know yet for which reason...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants