-
-
Notifications
You must be signed in to change notification settings - Fork 297
PDE freezes after switching into the Android mode #209
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
Comments
After waiting for a while, the PDE is responsive again, but the following error shows up in the console (3.0.2):
Same thing happens with latest revision from Processing (0249), the error is slightly different:
|
This error is from the google classpath explorer library which is used for providing import suggestions. It's running out of memory while performing a regex match to find all possible classes that match some class in the classpath. The Android SDK definitely adds a lot more classes to its search path on top of the default pde classpath classes. I'll investigate further and report back. |
The only jar in the Android SDK that should be searched for classes to import is platforms-xy/android.jar, and if several platforms are available, only the currently selected one . Is there any way to specific the particular jar to include in the classpath? |
Just a quick update: forcing ASTGenerator.getSuggestImports() to return null regardless of the situation does in fact eliminate the UI hanging and the OutOfMemoryError. So we clearly need a way to limit the extent of search by the classpath explorer... |
A temporary workaround is to disable the "Suggest import statements" option in the Preferences. |
@JakubValtar adding you to this discussion. As Manindra pointed out above, this issue is due to the classpath explorer library, used by the suggest imports features. The Android SDK has too many classes, and this leads to the out-of-memory error. |
@codeanticode Update processing to latest and try again. I did error checker overhaul (merged yesterday) and it works great for me with -Xmx256m. Problem might be that previously whole processing app class path was added to search path, which is certainly not what we wanted and for example IDEs are adding tons of stuff to class path, so some people may have experienced problems with having too much stuff there. |
@codeanticode I fixed memory leak in AndroidEditor which was preventing closed editors to be GC'd. Might solve this. I can run more than 10 editors within 256 MB. See #215 |
Awesome, thanks a lot! I I just run the mode using the PDE after you checker overhaul, and didn't observe the freeze so far. I will now look into the PR. |
The freeze is solved in 3.1, when using 3.0.x, disable the "Suggest import statements" option in the Preferences as a workaround. |
Glad it helped! |
Observed on PR3 under OS X 10.10
The text was updated successfully, but these errors were encountered: