Skip to content

Crash and freeze on build #1367

Description

@KonerDev

During the execution of the "assembleDebug" task, the user interface frequently stutters and freezes. After a while, it freezes completely and eventually crashes.

The crash screen is blank and no stacktrace is shown. In the idelog.txt file I found this exception:

java.lang.OutOfMemoryError: Failed to allocate a 40 byte allocation with 4065792 free bytes and 3970KB until OOM, target footprint 536870912, growth limit 536870912; giving up on allocation because <1% of heap free after GC.
	at java.lang.ref.FinalizerReference.add(FinalizerReference.java:61)
	at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:1272)
	at android.content.res.ResourcesImpl.loadXmlResourceParser(ResourcesImpl.java:1407)
	at android.content.res.Resources.loadXmlResourceParser(Resources.java:2619)
	at android.content.res.Resources.loadXmlResourceParser(Resources.java:2595)
	at android.content.res.Resources.getAnimation(Resources.java:1334)
	at android.view.animation.AnimationUtils.loadInterpolator(AnimationUtils.java:441)
	at com.android.internal.policy.DecorView.<init>(DecorView.java:503)
	at com.android.internal.policy.PhoneWindow.generateDecor(PhoneWindow.java:2574)
	at com.android.internal.policy.PhoneWindow.installDecor(PhoneWindow.java:3074)
	at com.android.internal.policy.PhoneWindow.getDecorView(PhoneWindow.java:2324)
	at androidx.activity.EdgeToEdge.enable(SourceFile:3)
	at com.itsaky.androidide.utils.EdgeToEdgeUtils.applyEdgeToEdge(Unknown Source:0)
	at com.itsaky.androidide.app.EdgeToEdgeIDEActivity.applyEdgeToEdge(Unknown Source:35)
	at com.itsaky.androidide.app.EdgeToEdgeIDEActivity.onCreate(SourceFile:1)
	at com.itsaky.androidide.activities.MainActivity.onCreate(Unknown Source:0)
	at android.app.Activity.performCreate(Activity.java:9363)
	at android.app.Activity.performCreate(Activity.java:9332)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1526)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4440)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4689)
	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:112)
	at android.app.servertransaction.TransactionExecutor.executeNonLifecycleItem(TransactionExecutor.java:174)
	at android.app.servertransaction.TransactionExecutor.executeTransactionItems(TransactionExecutor.java:109)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:81)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2899)
	at android.os.Handler.dispatchMessage(Handler.java:107)
	at android.os.Looper.loopOnce(Looper.java:257)
	at android.os.Looper.loop(Looper.java:342)
	at com.itsaky.androidide.app.CredentialProtectedApplicationLoader.installPluginCrashLooperGuard$lambda$0(Unknown Source:0)
	at com.itsaky.androidide.app.CredentialProtectedApplicationLoader.$r8$lambda$o4KQZd6K2NtRhir9kivKIce16xM(Unknown Source:0)
	at com.itsaky.androidide.app.CredentialProtectedApplicationLoader$$ExternalSyntheticLambda1.run(Unknown Source:0)
	at android.os.Handler.handleCallback(Handler.java:959)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loopOnce(Looper.java:257)
	at android.os.Looper.loop(Looper.java:342)
	at android.app.ActivityThread.main(ActivityThread.java:9638)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:619)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)

When manually running the gradlew build from the console (from the home screen without opening the project in the app) the build doesnt crash.

That's really unfortunate. I've always enjoyed using this app. I hope you can resolve this issue soon. Please let me know if you need any further information.

Activity

  1. KonerDev commented on Jun 4, 2026

    @KonerDev
    Author

    App Version: vC-r-0602-1322-arm64-v8a
    Android 15

    NOTE: Why can't you download older versions? It's likely that this issue did not occur before.

  2. added theissue type on Jun 4, 2026
  3. removed theissue type on Jun 4, 2026
  4. KonerDev commented on Jun 4, 2026

    @KonerDev
    Author

    I've noticed that the app is even freezing when it isn't building. I don't know what it's doing in the background then...

    The stutters, freezes and crashes (probably OOM) is likely caused by something else. Unfortunately, it makes the app unusable.

  5. KonerDev commented on Jun 5, 2026

    @KonerDev
    Author

    Extremely high RAM usage after the initial project synchronization. Even when synchronization is no longer running, RAM usage does not decrease.

    Screenshot_20260605_091238_TaskManager.jpg

  6. Ben-ADFA commented on Jul 8, 2026

    @Ben-ADFA
    Collaborator

    @KonerDev Hello! Are you still experiencing this issue with newer releases of the app?

  7. KonerDev commented on Jul 17, 2026

    @KonerDev
    Author

    @KonerDev Hello! Are you still experiencing this issue with newer releases of the app?

    Yes, in v26.29 the app is still crashing during the build process. It usually starts with extreme lags and UI stutters and eventually leads to a crash or app restart.

    Feel free to tell me if you need more information for debugging/reproducing the issue

    Version : v26.29 (C-r-0714-1232) (260714122)
    CI Build : true
    Branch : stage
    Commit : 8e33ec6
    Variant : arm64-v8a (release)
    Build type : OFFICIAL
    F-Droid Build : false
    F-Droid Version : null
    F-Droid Version code : -1
    SDK Version : 35
    Supported ABIs : [arm64-v8a, armeabi-v7a, armeabi]
    Manufacturer : samsung
    Device : SM-A336B

  8. KonerDev commented on Jul 17, 2026

    @KonerDev
    Author

    Latest stacktrace:

    java.lang.OutOfMemoryError: Failed to allocate a 80 byte allocation with 3052848 free bytes and 2981KB until OOM, target footprint 536870912, growth limit 536870912; giving up on allocation because <1% of heap free after GC.
    	at java.lang.StringFactory.newStringFromBytes(Native Method)
    	at java.lang.StringLatin1.newString(StringLatin1.java:774)
    	at java.lang.StringBuilder.toString(StringBuilder.java:500)
    	at com.itsaky.androidide.fragments.output.BuildOutputFragment.processLogs(SourceFile:159)
    	at com.itsaky.androidide.fragments.output.BuildOutputFragment$processLogs$1.invokeSuspend(SourceFile:11)
    	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(SourceFile:8)
    	at kotlinx.coroutines.DispatchedTask.run(SourceFile:109)
    	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(SourceFile:0)
    	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(SourceFile:59)
    	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(SourceFile:28)
    	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(SourceFile:0)
    

    It's always crashing because there isnt enough memory. What could be the cause of this extremely high memory usage?

  9. KonerDev commented on Jul 17, 2026

    @KonerDev
    Author

    @Ben-ADFA NOTE: I also tried building an app based on the default Compose template offered in Code on the Go. This build was working fine, with no stutters or crashes.

    The issue can therefore presumably only be reproduced when using the exact project I was building? (Clone https://www.github.com/Xed-Editor/Xed-Editor)

  10. hal-eisen-adfa commented on Sep 19, 2026

    @hal-eisen-adfa
    Collaborator

    Note, older versions ARE available, we just don't link to them. The pattern is:

    https://download.appdevforall.org/CodeOnTheGo-releaseYY.WW-armv8a.apk where YY is the 2-digit year and WW is the 2-digit week-of-year. If you want the 32bit variant, change '8' to '7' in 'v8a'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions