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

Very long time to rename a file #28

Closed
6 tasks done
Vsnmrn opened this issue Jan 15, 2024 · 22 comments
Closed
6 tasks done

Very long time to rename a file #28

Vsnmrn opened this issue Jan 15, 2024 · 22 comments
Labels
bug Something is not working

Comments

@Vsnmrn
Copy link
Contributor

Vsnmrn commented Jan 15, 2024

Checklist

  • I can reproduce the bug with the latest version.
  • I made sure that there are no existing issues - open or closed - to which I could contribute my information to.
  • I have read the FAQ and my problem isn't listed.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.

Describe the bug
Hello !
This bug is such a restrictive problem that it prevents me from using the app at this time. It appeared in Simple File Manager v6.16.1 and forced me to downgrade the app to v6.16.0, which I still use currently. I waited a little before publishing this bug report because I wanted to do a number of tests beforehand.

The problem is that if you open the app and take any file or folder, renaming it (or changing its extension) should be instantaneous, but a very long time elapses between the time you press "OK" and the time the pop-up window closes (on average between 20 and 30 seconds according to my observations).

Here's everything I know about this bug :

  • The bug occurs on all types of files
  • Internal and external storage (SD card) are affected
  • The bug seems to occur regardless of the file path (e.g. the number of folders in which the file is located)
  • The total number of files/folders in the directory where you are trying to rename a file also does not seem to have any influence
  • If you open the app, rename a file and wait for the window to disappear, if you try to rename the same file or a file in the same directory again, the bug does not occur (until you close the app). If you go to another directory, the bug occurs again.

To Reproduce
Steps to reproduce the behavior:

  1. Open the app
  2. Select a random file
  3. Try to rename it

Expected behavior
Renaming a file should not take so much time, the action should be instantaneous.

Way to get around the problem:
If someone encounters this problem, here is a tactic I found to reduce the waiting time before the window disappears:

  • Rename the file as you want
  • Press "OK"
  • Then press "Cancel"
  • Press the back arrow to unselect the file
  • Refresh the folder by making a vertical gesture from the top of the screen: the file will normally have been renamed correctly

Device info (please complete the following information):

  • Model: Samsung A54
  • OS: Android 12 AOSP / Android 13 / Android 14
  • App version: Simple File Manager v6.16.1 and Fossify File Manager v1.0.0

Additional context
During my tests, one of my (unimportant) files was simply deleted from the SD card. I initially believed in a handling error on my part, but @gbdomubpkm, who was the first to report this bug (see SimpleMobileTools/Simple-File-Manager#757) also noticed the unexpected deletion of one of the files he was trying to rename.

@Vsnmrn Vsnmrn added bug Something is not working needs triage Issue is not yet ready for PR authors to take up labels Jan 15, 2024
@Aga-C
Copy link
Member

Aga-C commented Jan 15, 2024

Were all the OS versions AOSP?

@Aga-C Aga-C added device/software specific Issues that only happen on some devices or with some specific hardware/software and removed needs triage Issue is not yet ready for PR authors to take up labels Jan 15, 2024
@Vsnmrn
Copy link
Contributor Author

Vsnmrn commented Jan 15, 2024

To be more precise, the person who reported the issue for the first time encountered this bug with Android 12 AOSP using Simple File Manager v6.16.1. However, he did not specify the device used.
As far as I'm concerned, I encountered the bug with my device on Android 13 / OneUI 5.1 (so it wasn't AOSP) using the same version.
Later, and after updating my phone to Android 14 / OneUI 6 (so it wasn't AOSP either), I encountered the bug with Fossify File Manager v1.0.0.

@gbdomubpkm
Copy link

Hello all 🙂

However, he did not specify the device used.

The device is vollaphone :https://www.indiegogo.com/projects/volla-phone-free-your-mind-protect-your-privacy#/comments
or vollaphone 22 for me.

I don't see why the issue should be device specific. Is the issue not reproductible on some device ?

Regards

@Aga-C
Copy link
Member

Aga-C commented Jan 15, 2024

@gbdomubpkm I've tested it on OnePlus 8 Pro and OnePlus 9 Pro, both with Android 13, and it works without any problems.

Also, it's not reproducible on an emulator, so it's harder to test it for devs.

@gbdomubpkm
Copy link

ok @Aga-C . To be more precise, i need to test Fossify File manager because my bug report concerns File-Manager v6.16.1 only and currently.

@gbdomubpkm
Copy link

@Aga-C I tested v1 and the bug seems less pronouced under Fossify F-M. The first renaming of a file is sometimes not instantaneous but seems less time-consuming than with File Manager. If i rename the same file again, the renaming is almost instantaneous. Difficult to conclude at the moment. Regardless, I appreciate this fork is here....

@Vsnmrn
Copy link
Contributor Author

Vsnmrn commented Jan 15, 2024

I just discovered something interesting: the bug only occurs if the "Storage" tab is activated in the settings. If I disable it, everything seems to work correctly but I just have to reactivate it for the problems to come back.

@gbdomubpkm
Copy link

@Vsnmrn I think you mean that disabling 'storage scanning' in File Manager's 'manage displayed tabs' fixes the problem. I confirm.

@Vsnmrn
Copy link
Contributor Author

Vsnmrn commented Jan 20, 2024

I just realized this: if I unmount my SD card, the bug does not occur, even if the "storage analysis" tab is enabled in the app's settings.

So to summarise, the bug is related to both the "storage analysis" tab (probably the StorageFragment.kt file) and the SD card itself.

@gbdomubpkm, sorry for asking that but what type of SD card are you using ? (e.g. model, capacity, reading/writing speed...) This is only a guess at this point but it could explain why the bug happens for a visibly limited number of users.

@gbdomubpkm
Copy link

@Vsnmrn Hello. Is there a sure free apk that summarizes SD card infos ?

@Vsnmrn
Copy link
Contributor Author

Vsnmrn commented Jan 22, 2024

I'm not sure there is an app to do that. But you can just withdraw your sd card and look at the symbols on it. You can find what they mean here:
https://en.wikipedia.org/wiki/SD_card
(Take a look at "Comparison of SD card capacity standards", "Comparison of SD card bus speeds" and "Comparison of SD card Speed Class ratings").
And sorry for the inconvenience.

@gbdomubpkm
Copy link

gbdomubpkm commented Jan 23, 2024

Could the apk I'm looking for be a future feature request regarding fossify file manager 🙂 ?

In that case, as it doesn't seem to have an apk regarding what the infos you want, I'll do what you are asking when I have time to do it properly. What is certain is that on my Volla, the card is 30 gigabytes and on the Volla 22 it is 250 gigabytes and I have the same problem. Could the type of SD card formatting (i must check) also generate this bug?

@Vsnmrn
Copy link
Contributor Author

Vsnmrn commented Jan 23, 2024

If you are interested by this feature feel free to open a feature request, it's made for that 🙂

I was precisely interested by the card formatting. However, what you have already said give me lot of information. Indeed the type of formatting depends on the capacity: up to 32GB is FAT32, from 32GB to 2TB is exFAT. So if you encounter the bug with 2 cards of 32GB and 256GB respectively, the card formatting is not the cause of the bug.

In addition, don't bother to follow all my previous instructions (unless you really want it, after all it's instructive) because I think I was wrong. I thought the bug could be linked to my SD card because the bug doesn't go off if I remove it but I think it's a misinterpretation on my part. Besides, even if we had found common points between our SD cards, it would have been strange if we were the only ones to notice the bug.

What I am now convinced of is that the bug (which we knew was due to one of the changes made to Simple File Manager 6.16.1) is more specifically due to a change related to the addition of the SD card in the "storage analysis" tab. In fact, removing the SD card or disabling the "storage analysis" tab in the settings has the same effect, namely preventing the analysis of the SD card, which seems to be the origin of the problem.

@gbdomubpkm If you think differently or have other ideas, don't hesitate to discuss them. And thank you for helping me

@SameytheHedgehog
Copy link

I wanted to add onto this that the file is still renamed instantly, despite the dialog not closing immediately. You can see this by hitting ok, tapping off the renaming dialog to close it manually, and then swiping down from the top of the screen to manually reload the folder view.

Can also confirm turning off "Storage Analysis" under "Manage shown tabs" fixes the issue for me.

File Manager v6.16.1 pro
Android 13 / OneUI 5.1
Samsung S20 FE

@Kreuger
Copy link

Kreuger commented Feb 8, 2024

This is happening for me on my Samsung Galaxy A54, Android 14 and using internal storage.

@naveensingh
Copy link
Member

Thanks for the detailed info! I was able to reproduce this after pushing a few thousand files to my SD Card. It doesn't seem reproducible with an empty SD Card.

@naveensingh naveensingh removed the device/software specific Issues that only happen on some devices or with some specific hardware/software label Mar 13, 2024
@naveensingh
Copy link
Member

@esensar Sorry for the ping, no problem if you are busy. I'm just looking for some info.

Regarding commit SimpleMobileTools/Simple-File-Manager@4cca280, were the SD Card files not scanned automatically when mounted?

The busy media scanner seems to be the cause of the unnecessary delay observed here (renameFile -> rescanPaths)

@esensar
Copy link
Contributor

esensar commented Mar 14, 2024

@esensar Sorry for the ping, no problem if you are busy. I'm just looking for some info.

Hey, no problem. I am glad to help out if I can.

Regarding commit SimpleMobileTools/Simple-File-Manager@4cca280, were the SD Card files not scanned automatically when mounted?

The busy media scanner seems to be the cause of the unnecessary delay observed here (renameFile -> rescanPaths)

If I remember correctly, I had implemented SD card analysis on that screen, but it showed stale data. Not sure when it updated automatically. I think data was correct when mounted, but when additional files were added, it was not correct (not 100% sure about that, but there were definitely cases when data was incorrect and it was resolved by the above commit).

@naveensingh
Copy link
Member

Understood, thanks!

I'll investigate this further and probably disable scanning especially since there's already a similar issue #51. The db is usually updated automatically as long as the files are added using MediaStore or MTP. Things like adb push don't trigger a scan.

@naveensingh
Copy link
Member

Should be fixed in the next update.

@Kreuger
Copy link

Kreuger commented Mar 15, 2024

I renamed some music today on my SDCard and it worked immediately.

@gbdomubpkm
Copy link

Well, I confirm that the bug is fixed on my Volla. To everyone who participated in identifying and fixing the issue, thank you ! And long life to this great app !

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

No branches or pull requests

7 participants