AndroidIDEOfficial / AndroidIDE

AndroidIDE is an IDE for Android to develop full featured Android apps.
https://m.androidide.com
GNU General Public License v3.0
2.36k stars 299 forks source link

App freezes on tapping 'View' button multiple times #39

Closed dhaigit closed 2 years ago

dhaigit commented 2 years ago

I'm going to try to describe the first issue from my other post #33 here.

LG, Android 8.0

I can make the app freeze on purpose with 100% certainty.

I tap phone's running app list button and swipe off AndroidIDE. I repeat the process dozens of times with the exact result.

There's another interesting detail. If I tap on the phone's running app list button in the middle of the process before it freezes (after 1st or 2nd time), and tap AndroidIDE from the list to go back to it, I'm allowed to toggle the red button 2 more times.

So, the pause-then-resuming of the app seems to reset the red button's toggle-count-before-freeze status.

itsaky commented 2 years ago

I removed the use of that FAB. Could you check if the issue still exists with the new implementation? Workflow Run.

dhaigit commented 2 years ago

With the test run, there are no more freezes since that red button no longer exists to reproduce the problem. However, there are other issues.

One example: -open project -open a .java file -tap on the file's tab -select "close this" from the 3 options -the tab now hides the file's name but the tab is still there as a red rectangle -other menu functions still seem to be working -tapping on the red rectangle shows nothing -try to open the file again by tapping it from the filetree -nothing seems happening, but if we tap the red rectangle, we should again see option to "close this" -select "close this" and the app should crash

I think the app is analyzing the java file the moment we open it and refusing to close it, making that file bar stuck.

stayaway49 commented 2 years ago

@dhaigit Yeah I have got some of these issues too.

itsaky commented 2 years ago

@dhaigit @stayaway49 Could you check if this is really fixed in the latest commit?

stayaway49 commented 2 years ago

@itsaky Okay.

stayaway49 commented 2 years ago

@itsaky @itsaky it's not downloading. I don't know why but it finishes downloading.. maybe in 22 and 23 MB's. Then when I try extract it the apk is 0.0B 😬.

deenu713 commented 2 years ago

@stayaway49 Yeah its need full speed to download the GitHub artificts

stayaway49 commented 2 years ago

@deenu713 Oh. Okay. I will try again.

dhaigit commented 2 years ago

Before, app crashed just for .java files, but now it seems to crash for any file type I try to open then close. After the first file closing, red file bar disappears, but following attempts to open any file are ignored. Now, if I tried to back out of the app with back key, it would crash most of the time.

itsaky commented 2 years ago

Hey @dhaigit, could you please check again with the latest commit?

dhaigit commented 2 years ago

It seems to be okay so far with a few minor things that I've noticed.

  1. Font size setting does not get saved, neither by pinching/zooming, nor by setting it in preferences.

  2. There are some warnings about "illegal reflective access" and that the app will not work anymore in future releases when they are not allowed anymore.

JLSHandler: WARNING: An illegal reflective access operation has occurred JLSHandler: WARNING: Illegal reflective access by org.javacs.ReusableCompiler$Borrow (file:/data/data/com.itsaky.androidide/files/jls/jls.jar) to method com.sun.tools.javac.api.JavacTaskImpl.cleanup() JLSHandler: WARNING: Please consider reporting this to the maintainers of org.javacs.ReusableCompiler$Borrow JLSHandler: WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations JLSHandler: WARNING: All illegal access operations will be denied in a future release

So you might want to consider an alternative for the long run.

itsaky commented 2 years ago

Font size setting does not get saved, neither by pinching/zooming, nor by setting it in preferences.

Yeah. I'm aware of the font size issue. I'll fix it.

There are some warnings about "illegal reflective access" and that the app will not work anymore in future releases when they are not allowed anymore.

Those warnings are comming from the Java Language Server. We use reflection to access a private method in JavacTaskImpl class. JVM warns about that.

It seems to be okay

I'm closing the issue. If you face the issue again, feel free to reopen.