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

Issues with file opening and saving #33

Closed
dhaigit opened this issue Dec 31, 2021 · 10 comments
Closed

Issues with file opening and saving #33

dhaigit opened this issue Dec 31, 2021 · 10 comments
Labels
bug Something isn't working

Comments

@dhaigit
Copy link

dhaigit commented Dec 31, 2021

LG, Android 8.0

App freezes if I use the red-eyed menu button 4 or more times. Sometimes even less. If I leave that button alone, I might be lucky enough to make a successful compilation or build.

All I can do is swipe it off the app list and start again. After swiping off a bunch of times, there's a chance some of the files get blanked out. Happened a few times.

Also, when a file gets blanked out, you can't tap on it to open anymore.

Tried to create an empty file and tapped on it to open. It didn't open either.

@itsaky itsaky added the bug Something isn't working label Jan 1, 2022
@itsaky itsaky changed the title BUGS? Issues with file opening and saving Jan 1, 2022
@sydchako
Copy link

sydchako commented Jan 1, 2022

@dhaigit Same issue here. Huawei honor Android 8.

@dhaigit
Copy link
Author

dhaigit commented Jan 1, 2022

It seems to me there are actually 2, maybe even 3, separate bugs in this thread.

  1. App freezes randomly when using the red menu button. It does not write to idelog.txt after a freeze but one time it did. I'm not even sure if it has anything to do with the bug but I put it here anyway:
 java.util.concurrent.TimeoutException: android.view.ThreadedRenderer.finalize() timed out after 10 seconds
	at android.view.ThreadedRenderer.nDeleteProxy(Native Method)
	at android.view.ThreadedRenderer.finalize(ThreadedRenderer.java:894)
	at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:250)
	at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:237)
	at java.lang.Daemons$Daemon.run(Daemons.java:103)
	at java.lang.Thread.run(Thread.java:764)
  1. App sometimes blanks out your files. This happens in some of the freezes and we wouldn't know for sure which one(s) it was when re-openning the project. So, remember to backup your project before using this app or you'll be very very sad after losing a big .java file that you have put hours, or even days, in it.

  2. App can't open an empty file. Tapping on an empty file on the filetree does nothing. This is probably related to bug in post Written the last changed file in project with nothing #19.

The biggest thing that prevents me from using this app much at its current status is the first one. I do need to use that red menu button to get to the build outputs but only after a few times toggling the button, it freezes.

@itsaky
Copy link
Member

itsaky commented Jan 2, 2022

App can't open an empty file. Tapping on an empty file on the filetree does nothing

This should have been fixed now.

I'll allow IDE logs to be available to user. So you could debug your issue 1 ( I actually cannot reproduce the issue on my device).

For your issue 2, I'll implement something else so the IDE could save the files even on a crash or something.

@itsaky
Copy link
Member

itsaky commented Jan 8, 2022

@dhaigit Is your issue 2 fixed with the latest commit?

@dhaigit
Copy link
Author

dhaigit commented Jan 8, 2022

Since it happened after some of the FAB freezes and you got rid of it, it hasn't happened again yet. I can't say for sure yet unless I spend a lot more time with it.

I guess it's stable enough to close this for now if you'd like.

I'd like to spend a lot more time testing out the app but some of the issues (which are under improvement at the moment) in auto completion stop me from doing so.

When trying to quickly test out some code, I don't usually put classes in their own files but in the same file as the main class. As you already know, they won't show in auto completion. This, along with having to hit shift or capslock before typing in order to temporarily overcome the first letter case sensitivity issue, makes it a little unbearable for me to use.

I guess I'll spend more time to test it out when those are fixed, hopefully soon.

@itsaky
Copy link
Member

itsaky commented Jan 8, 2022

Okay. I'll close the issue now. If you face the problem again, please reopen this issue.

For the code completion issue :
In Java, type names mostly start with a capital letter. So that case sensitive checking is done to quickly identify if the user is expecting classes (or constants) as completion items or any local variables.

However, I'll add a preference for that. So that users can choose what's more suitable for them.

@itsaky itsaky closed this as completed Jan 8, 2022
@dhaigit
Copy link
Author

dhaigit commented Jan 19, 2022

Okay. I'll close the issue now. If you face the problem again, please reopen this issue.

I've experiened the file blanking issue once again after this was closed (before you rewrote the JLS, but it shouldn't matter)

It was only one more time but I think one is already too many for such a serious issue. So I thought I should reopen this.

For details about it, I don't have much because it happened unexpectedly and I only found out the file was empty later than the moment it happened. All I can confirm is that there were some file opening and closing going on and that the file was a build.gradle (but I think it could have been any file)

@itsaky
Copy link
Member

itsaky commented Jan 19, 2022

Okay. Can you try the latest CI build? Actually I changed the way files are saved (now they are stored using Java NIO API). Also, I removed the auto save feature. Files are now not saved in onPause or when you change between files. They are saved when you close files (and manually).

@itsaky itsaky reopened this Jan 19, 2022
@dhaigit
Copy link
Author

dhaigit commented Jan 19, 2022

We'll see how it goes with time, as it doesn't happen every time.

@itsaky
Copy link
Member

itsaky commented Jan 27, 2022

The auto save feature (on closing files) is now optional and is disabled by default.

@itsaky itsaky closed this as completed Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants