Jump to content
Sign in to follow this  
Fabian1648

[Android/Delphi10.4]An app that sometimes freezes during image capture

Recommended Posts

Hi,

 

I had an Android app developed in Delphi 10.3 that scanned barcodes via the smartphone camera and the ZXing library.

 

After switching to Delphi 10.4, the project was able to compile without any problem but the picture taking frequently crashes: It works sometimes and often the app freezes and you have to wait for a timeout for Android to ask if you don't want to close the application (same behaviour on Android 9, 10, 11).

 

There must have been changes in Delphi 10.4 that cause this problem.

 

Does anyone have an idea of such a change in Delphi 10.4 that could be the cause of this problem?

 

Thanks for your help

Edited by Fabian1648

Share this post


Link to post

I give myself the answer to my question so that it can be useful to others 🙂

 

I found in the code that handles image capture 2 problems related to the changes made by Delphi 10.4:

 

1. A unit of the ZXing library has an error following the change of the indexing of the characters of a string (mystring[0] in Delphi10.3 becomes mystring[1] in Delphi10.4)

 

2. The management of the .free (a .free in Delphi 10.3 which must be removed because in Delphi 10.4, the release of a parent object automatically releases its children objects

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×