Exception class Bus error when saving file

Since Version 7.1, i have an issue with the 32bit Android Version.
If i open an Excel file with Flexcel which contains a Formula:


I get this Android error:
Access violation at address XXXXXXXX, accessing adress 00000000.

And in the Debugger:
Project XXXX.apk raised exception class Bus error(10).

The Error occours on this line:
xls.Save(tmpFilePath, TFileFormats.Xls);

If i try it with the 64bit Android Compiler, everything works fine.



This is a weird one, thanks for reporting it. We could reproduce it here, but it looks like some bug in the Delphi compiler: The code on our side seems fine, and the code that handles that formula hasn't changed in a long time. I wonder if when you installed 7.1 you also updated Delphi? 

We are investigating what can we do on our side to fix this, or at least open a bug in Embarcadero if it turns out to be a delphi compiler bug, but it isn't a simple thing to do. I'll update you when we have fixed or workarounded it.

yes, when i installed 7.1 i also updated Delphi to 10.3.3.
Okay thank you very much for your Response!

Just an update: We've traced the error and it seems to be an error with packed classes in the Android32 compiler (and packed classes were added indeed in FlexCel 7.1). Since we can't fix the compiler, and I wasn't able to generate a reproducible case, we will be removing the packed classes in 7.1.1 so this should be fixed.

We still have to look at some unrelated issues until we can make a release, but 7.1.1 should be released in next week and have this issue fixed.
I also have an update for you guys.
I wanted to test the UI on different devices, and found that the 64-bit Version doesnt work on These phone and Tablet:
Samsung Galaxy S9
Android 9

Acer Iconia One 10
Android 7.1

But on this Device it works fine:
One Plus 7t
Android 10

Looks like it is the same Problem as explained before.
But am not able to Debug in Android 64 bit, because of Delphi, although i have installed the bugfix from embarcadero…
This bug is very weird. 

Yes, it is a weird bug, and it is difficult to isolate. But it seems related to packing the records. In Android, it seems that if you try to access a double which is at an address that is not even, it can have that error. It doesn't' t happen always, but it does happen in some cases.

So the fix we applied here (unpacking the records so they are aligned to 32-bit or 64-bit multiples) should fix it in both Android32 or 64. (if the error is the same: bus error 10)

In the devices I have here they all worked in 64 bits, but if you are having those errors in android64, I will make sure the fix applies for both Android32 and 64.


We just released 7.1.1 which should have this bug fixed. Can you check it?

I checked it now on a view devices and it Looks like it works now.
Thank you very much for the quick resonds!