Comments (6)
The mentioned commit uses addJvmArguments
to specify arguments for the Java VM, which, for some reason, resets the Xmx
value for the daemon. The Gradle Daemon docs mentions :
Daemons use the JVM’s default minimum heap size.
And from the JVM 17 docs :
Maximum heap size of 1/4 of physical memory
I have added a commit which should fix the issue (works in my tests at least). Can you retry with the latest CI build?
from androidide.
Got it, I'll test and check if the error has been fixed 👍
from androidide.
Ok, I don't know if this is related to the last commit, as the version I was using before upgrading to this is one from about 3 months ago, but when trying to initialize my multi-module project the app starts to freeze and becomes unusable (it didn't happen in the commit I was using)
This happens right after the project has been successfully initialized.
Video:
https://drive.google.com/file/d/1KZ_eFy9RAxDMaRljVQX7NcdmcmyI9kec/view?usp=drivesdk
from androidide.
After some time stuttering, the IDE shows the crash log:
AndroidIDE Crash Report
Version : v2.7.1-beta (27101)
CI Build : true
Branch : dev
Commit : b7e8464d5
Variant : armeabi-v7a (release)
Build type : OFFICIAL
F-Droid Build : false
F-Droid Version : null
F-Droid Version code : -1
SDK Version : 28
Supported ABIs : [armeabi-v7a, armeabi]
Manufacturer : LGE
Device : LM-X420
Stacktrace:
java.lang.OutOfMemoryError: Failed to allocate a 24 byte allocation with 0 free bytes and 0B until OOM, max allowed footprint 268435456, growth limit 268435456
at java.lang.StringFactory.newStringFromChars(StringFactory.java:267)
at org.kxml2.io.KXmlParser.readValue(KXmlParser.java:1451)
at org.kxml2.io.KXmlParser.parseStartTag(KXmlParser.java:1137)
at org.kxml2.io.KXmlParser.next(KXmlParser.java:380)
at org.kxml2.io.KXmlParser.next(KXmlParser.java:321)
at com.itsaky.androidide.xml.internal.versions.DefaultApiVersionsRegistry.readTag(Unknown Source:125)
at com.itsaky.androidide.xml.internal.versions.DefaultApiVersionsRegistry.readApiVersions(Unknown Source:36)
at com.itsaky.androidide.xml.internal.versions.DefaultApiVersionsRegistry.forPlatformDir(Unknown Source:109)
at com.itsaky.androidide.projects.api.AndroidModule.getApiVersions(Unknown Source:37)
at com.itsaky.androidide.projects.api.AndroidModule$readResources$2$resourceFlow$1.invokeSuspend(Unknown Source:121)
at com.itsaky.androidide.projects.api.AndroidModule$readResources$2$resourceFlow$1.invoke(Unknown Source:12)
at kotlinx.coroutines.flow.SafeFlow.collect(Unknown Source:125)
at com.itsaky.androidide.projects.ProjectManagerImpl$setupProject$lambda$2$$inlined$map$1.collect(Unknown Source:17)
at kotlinx.coroutines.flow.FlowKt.toCollection(Unknown Source:61)
at com.itsaky.androidide.projects.api.AndroidModule.readResources(Unknown Source:154)
at com.itsaky.androidide.projects.ProjectManagerImpl$setupProject$4$jobs$1$1.invokeSuspend(Unknown Source:289)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:8)
at kotlinx.coroutines.DispatchedTask.run(Unknown Source:120)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(Unknown Source:95)
This didn't happen in the version from 3 months ago that I used before upgrading to this one, but when I downgraded again to the version I used (and that worked) the error starts to happen there too.. Could it be due to some configuration that is persisted even after the downgrade?
from androidide.
After some days of testing, I reinstalled the IDE from scratch, cleaned the IDE data and Gradle caches, but the crash problem continued even after all this. So after I need to open my project sometimes without any hope just to access some files, the project iinitialized successfully and from then on for about 2 days every time it continued to initialize as if sitting had occurred
But today it started to happen again and thanks to the new implementation of the memory graph, I noticed this pattern in the following video. IDE memory consumption scales quickly after project initialization, in the configuration phase of project "I believe"
https://drive.google.com/file/d/174I8TfgfLO-tHxO6A3RuVFX1i-Y4Yefv/view?usp=drivesdk
And the original problem of this Issue has actually been fixed. So I think I can move this to another problem?
from androidide.
And the original problem of this Issue has actually been fixed. So I think I can move this to another problem?
Sure. Memory issues could be discussed in #1694.
from androidide.
Related Issues (20)
- Two override annotations when overriding a superclass method
- Overriding a superclass method doesn't include the `Exception`
- Overriding a method that has a primitive type doesn't work properly
- Overriding a method that has a primitive array imports the primitive type
- Automatic Code Indentation HOT 1
- An error HOT 1
- Improperly placed suggestions window while editing HOT 3
- Illegal character inserted into XML by UI Designer in AndroidIDE
- Every time you open a project, it is initialized and built once. HOT 1
- Extracting URL for Android SDK from manifest... jq: error: Could not open file /data/data/com.itsaky.androidide/files/home/manifest.json: No such file or directory [Process completed (code 2) - press Enter] HOT 1
- Package Corruption Issue with assembleRelease in AndroidIDE. HOT 7
- Failed to compile aidl
- crash HOT 1
- Build variant showing no data and not able to use quick run HOT 11
- Crash
- How long to support Kotlin? HOT 1
- MANIFEST STUCK ON ZERO PROGRESS HOT 2
- Installation failed HOT 1
- What happened?! HOT 1
- [Feature]: Support for AGP 8.5.* HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from androidide.