Recent

Author Topic: EFCreateError: Unable to create ini file on new Android  (Read 2524 times)

BeniBela

  • Hero Member
  • *****
  • Posts: 906
    • homepage
EFCreateError: Unable to create ini file on new Android
« on: February 28, 2019, 10:03:51 pm »
I have been using TIniFile for years, but now I am getting error reports from people using Android 8.1 and Android 9 on Huawei devices:

Quote
Code: [Select]
EFCreateError: Unable to create file "/data/user/0/de.benibela.videlibri/files/DE_Berlin_Berlin_VOEBB#123.config.sav"     

Have they changed something in the new Android version?

I think it happens with the update of the ini file, not with the first creation of the ini file, since my app would crash rather than generating such an error report if the first creation failed. Perhaps TFileStream cannot override a file on Android 9? I make a copy of the ini file after saving, but that should not change anything, unless CopyFile locks the file and fails to release the lock.  It is updating the file from multiple threads, but in a critical section, do critical sections work on Android 9?




yuriy_sydorov

  • Full Member
  • ***
  • Posts: 158
Re: EFCreateError: Unable to create ini file on new Android
« Reply #1 on: March 06, 2019, 09:01:46 am »
For me all works fine on Android 9 and FPC trunk.
Try to do a simple test with a separate ini file. It should work.

BeniBela

  • Hero Member
  • *****
  • Posts: 906
    • homepage
Re: EFCreateError: Unable to create ini file on new Android
« Reply #2 on: March 06, 2019, 12:03:34 pm »
I do not have a device to test, I only get the bug reports

I have asked on an Android board, and they have no clue either, but someone suspected it might be the same cause that prevents Realm from working on these Huawei devices. Perhaps they have a kernel bug

 

TinyPortal © 2005-2018