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

bug: OutOfMemory while patching #2126

Open
4 tasks done
Farajo001 opened this issue Aug 9, 2024 · 4 comments · May be fixed by #2072
Open
4 tasks done

bug: OutOfMemory while patching #2126

Farajo001 opened this issue Aug 9, 2024 · 4 comments · May be fixed by #2072
Labels
Bug report Something isn't working

Comments

@Farajo001
Copy link

Bug description

Whenever I try to patch anything the manager freezes when Compiling Dex files even when using recommended APKs

  1. Select from storage the APK to patch
  2. Start patching
  3. Wait until a sign pops up that the app is frozen

Version of ReVanced Manager and version & name of app you are patching

Revanced version: v1.21.1
Name of the apps: YouTube v19.16.39, Instagram v343.0.0.33, Reddit v2024.17

Installation method

Regular

ReVanced Manager logs

content://app.revanced.manager.flutter.flutter.share_provider/cache/revanced-manager_logcat_20240809001836945224.log
Can't get logs if the app is frozen and can't use it

Patch logs

No response

Acknowledgements

  • I have checked all open and closed bug reports and this is not a duplicate.
  • I have chosen an appropriate title.
  • All requested information has been provided properly.
  • The bug is only related to ReVanced Manager.
@Farajo001 Farajo001 added the Bug report Something isn't working label Aug 9, 2024
@Farajo001
Copy link
Author

The one above was with the latest version of Instagram
Here something happened while trying to compile the modified files for YouTube: - Device Info
ReVanced Manager: 1.21.1
Model: moto e5 play
Android version: 8.1.0
Supported architectures: armeabi-v7a, armeabi
Root permissions: No

  • Patch Info
    App: com.google.android.youtube v19.16.39 (Suggested: 19.16.39)
    Patches version: v4.12.0
    Patches added: Default
    Patches removed: None
    Default patch options changed: None

  • Settings
    Allow changing patch selection: false
    Version compatibility check: true
    Show universal patches: false
    Patches source: revanced/revanced-patches
    Integration source: revanced/revanced-integrations

  • Logs
    Reading APK
    Decoding app manifest
    Loading patches
    Merging integrations
    Deleting existing temporary files directory
    Decoding resources
    Executing patches
    Applied 59 patches
    Compiling patched dex files
    Compiled 8 dex files
    Compiling modified resources
    An error occurred:
    java.lang.OutOfMemoryError: Failed to allocate a 2097168 byte allocation with 318400 free bytes and 310KB until OOM, max allowed footprint 268435456, growth limit 268435456
    at com.google.common.io.ByteStreams.toByteArrayInternal(Unknown Source:29)
    at com.google.common.io.ByteStreams.toByteArray(SourceFile:0)
    at com.android.tools.build.apkzlib.bytestorage.InMemoryByteStorage.fromStream(Unknown Source:0)
    at com.android.tools.build.apkzlib.bytestorage.InMemoryByteStorage.fromSource(Unknown Source:4)
    at com.android.tools.build.apkzlib.bytestorage.OverflowToDiskByteStorage.fromSource(Unknown Source:4)
    at com.android.tools.build.apkzlib.bytestorage.ChunkBasedByteStorage.fromSource(Unknown Source:29)
    at com.android.tools.build.apkzlib.zip.ZFile.mergeFrom(Unknown Source:195)
    at app.revanced.library.ApkUtils.applyTo(Unknown Source:153)
    at app.revanced.manager.flutter.MainActivity.runPatcher$lambda$35(Unknown Source:484)
    at app.revanced.manager.flutter.MainActivity.$r8$lambda$t9VOe3aFJZkCMY59Ya4Pcinu-pA(SourceFile:0)
    at app.revanced.manager.flutter.MainActivity$$ExternalSyntheticLambda6.run(SourceFile:0)
    at java.lang.Thread.run(Thread.java:764)
    Suppressed: java.lang.OutOfMemoryError: Failed to allocate a 16777232 byte allocation with 13743384 free bytes and 13MB until OOM, max allowed footprint 268435456, growth limit 268435456
    at java.util.Arrays.copyOf(Arrays.java:3164)
    at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:118)
    at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93)
    at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:153)
    at com.android.tools.build.apkzlib.bytestorage.InMemoryByteStorage$2.doWrite(Unknown Source:2)
    at com.android.tools.build.apkzlib.bytestorage.AbstractCloseableByteSourceFromOutputStreamBuilder.write(SourceFile:0)
    at com.android.tools.build.apkzlib.bytestorage.OverflowToDiskByteStorage$1.doWrite(Unknown Source:2)
    at com.android.tools.build.apkzlib.bytestorage.AbstractCloseableByteSourceFromOutputStreamBuilder.write(SourceFile:0)
    at com.android.tools.build.apkzlib.bytestorage.ChunkBasedByteStorage$1.doWrite(Unknown Source:39)
    at com.android.tools.build.apkzlib.bytestorage.AbstractCloseableByteSourceFromOutputStreamBuilder.write(SourceFile:0)
    at com.google.common.io.ByteStreams.copy(Unknown Source:21)
    at com.android.tools.build.apkzlib.zip.StoredEntry.loadSourceIntoMemory(Unknown Source:29)
    at com.android.tools.build.apkzlib.zip.ZFile.reAdd(Unknown Source:32)
    at com.android.tools.build.apkzlib.zip.ZFile.packIfNecessary(Unknown Source:90)
    at com.android.tools.build.apkzlib.zip.ZFile.writeAllFilesToZip(Unknown Source:13)
    at com.android.tools.build.apkzlib.zip.ZFile.update(Unknown Source:21)
    at com.android.tools.build.apkzlib.zip.ZFile.close(Unknown Source:9)
    at kotlin.io.CloseableKt.closeFinally(Unknown Source:8)
    at app.revanced.library.ApkUtils.applyTo(Unknown Source:329)
    ... 4 more
    Something went wrong:
    PathNotFoundException: Cannot copy file to '/data/user/0/app.revanced.manager.flutter/files/lastPatchedApp.apk', path = '/data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-YSKLKR/out.apk' (OS Error: No such file or directory, errno = 2)

@validcube
Copy link
Member

Potentially related to #2125

@Farajo001
Copy link
Author

Potentially related to #2125

Nope, not at all

@oSumAtrIX oSumAtrIX changed the title bug: Revanced Manager freezes while patching bug: OutOfMemory while patching Aug 9, 2024
@validcube
Copy link
Member

Potentially related to #2125

Nope, not at all

Whoops.. sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug report Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants