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: TikTok patches throw Out Of Memory Error #190

Closed
2 of 3 tasks
fuji97 opened this issue Oct 20, 2023 · 4 comments · May be fixed by ReVanced/revanced-manager#1869
Closed
2 of 3 tasks

bug: TikTok patches throw Out Of Memory Error #190

fuji97 opened this issue Oct 20, 2023 · 4 comments · May be fixed by ReVanced/revanced-manager#1869
Labels
Bug report Something isn't working

Comments

@fuji97
Copy link

fuji97 commented Oct 20, 2023

Bug description

When patching the suggested version of TikTok with Revanced Manager, it throws java.lang.OutOfMemoryError.
I don't know if this is a patches issue or a manager issue because, even if it is an OutOfMemoryError, it only happens when patching TikTok.

I also tested an older version (29.9.4) and it patches correctly, although I can't patch settings and download because they are not compatible.

Error logs

~ Device Info
ReVanced Manager: 1.13.1
Build: release
Model: Pixel 6 Pro
Android version: 13
Supported architectures: arm64-v8a, armeabi-v7a, armeabi

~ Patch Info
App: com.zhiliaoapp.musically v30.8.4
Patches version: v2.195.0
Patches: Disable login requirement, Downloads, Feed filter, Fix Google login, Hide ads, Playback speed, Settings, Show seekbar

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

~ Logs
Copying APK
Reading APK
Decoding app manifest
Loading patches
Merging integrations
Executing patches
Disable login requirement succeeded
Downloads succeeded
Feed filter succeeded
Fix Google login succeeded
Hide ads succeeded
Playback speed succeeded
Settings succeeded
Show seekbar succeeded
Compiling patched dex files
Compiled classes.dex
Compiled classes2.dex
Compiled classes3.dex
Compiled classes4.dex
Compiled classes5.dex
Compiled classes6.dex
Compiled classes7.dex
Compiled classes8.dex
Compiled classes9.dex
Compiled classes10.dex
Compiled classes11.dex
Compiled classes12.dex
Compiled classes13.dex
Compiled classes14.dex
Compiled classes15.dex
Compiled classes16.dex
Compiled classes17.dex
Compiled classes18.dex
Compiled classes19.dex
Compiled classes20.dex
Compiled classes21.dex
Compiled classes22.dex
Compiled classes23.dex
Compiled classes24.dex
An error occurred:
java.lang.OutOfMemoryError: Failed to allocate a 16 byte allocation with 2143952 free bytes and 2093KB until OOM, target footprint 536870912, growth limit 536870912; giving up on allocation because <1% of heap free after GC.
 at com.android.tools.smali.dexlib2.dexbacked.DexBuffer.readerAt(DexBuffer.java:144)
 at com.android.tools.smali.dexlib2.dexbacked.DexBackedDexFile$5.get(DexBackedDexFile.java:334)
 at com.android.tools.smali.dexlib2.dexbacked.DexBackedDexFile$5.get(DexBackedDexFile.java:329)
 at com.android.tools.smali.dexlib2.dexbacked.DexBackedDexFile$6.get(DexBackedDexFile.java:372)
 at com.android.tools.smali.dexlib2.dexbacked.DexBackedDexFile$6.get(DexBackedDexFile.java:367)
 at com.android.tools.smali.dexlib2.dexbacked.reference.DexBackedFieldReference.getDefiningClass(DexBackedFieldReference.java:51)
 at com.android.tools.smali.dexlib2.base.reference.BaseFieldReference.equals(BaseFieldReference.java:51)
 at java.util.HashMap.getNode(HashMap.java:571)
 at java.util.LinkedHashMap.get(LinkedHashMap.java:464)
 at com.android.tools.smali.dexlib2.writer.pool.BaseIndexPool.getItemIndex(BaseIndexPool.java:52)
 at com.android.tools.smali.dexlib2.writer.InstructionWriter.getReferenceIndex(InstructionWriter.java:594)
 at com.android.tools.smali.dexlib2.writer.InstructionWriter.getReferenceIndex(InstructionWriter.java:582)
 at com.android.tools.smali.dexlib2.writer.InstructionWriter.write(InstructionWriter.java:285)
 at com.android.tools.smali.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1319)
 at com.android.tools.smali.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:1115)
 at com.android.tools.smali.dexlib2.writer.DexWriter.writeTo(DexWriter.java:415)
 at com.android.tools.smali.dexlib2.writer.DexWriter.writeTo(DexWriter.java:370)
 at lanchon.multidexlib2.DexIO.writeMultiDexDirectoryCommon(DexIO.java:162)
 at lanchon.multidexlib2.DexIO.access$000(DexIO.java:37)
 at lanchon.multidexlib2.DexIO$1.call(DexIO.java:102)
 at lanchon.multidexlib2.DexIO$1.call(DexIO.java:99)
 at java.util.concurrent.FutureTask.run(FutureTask.java:264)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
 at java.lang.Thread.run(Thread.java:1012)

Solution

No response

Additional context

revanced-manager_logcat_20231020121950090485.log

Acknowledgements

  • This request is not a duplicate of an existing issue.
  • I have chosen an appropriate title.
  • All requested information has been provided properly.
@fuji97 fuji97 added the Bug report Something isn't working label Oct 20, 2023
@oSumAtrIX
Copy link
Member

Dupe

@oSumAtrIX oSumAtrIX closed this as not planned Won't fix, can't repro, duplicate, stale Oct 20, 2023
@oli-laban
Copy link

@oSumAtrIX Closed as dupe yet on older issues you say they're outdated and to create a new one. There is also no solution for this anywhere, yet clearly there is a problem as lots of people are experiencing the same issue...

@LisoUseInAIKyrios
Copy link
Contributor

@oli-laban the solution for now is to patch using a computer and ReVanced CLI. That will work without memory issues.

@oSumAtrIX
Copy link
Member

It is a dupe of ReVanced/revanced-patcher#193

@oSumAtrIX oSumAtrIX transferred this issue from ReVanced/revanced-patches-template Dec 14, 2023
@revanced-bot revanced-bot transferred this issue from another repository Dec 14, 2023
taylorkline added a commit to taylorkline/revanced-manager that referenced this issue Apr 16, 2024
Patching large applications (e.g. TikTok) on Android with multithreading simply doesn't work on multicore devices where the amount of memory given to the manager (regardless of the system RAM) is not sufficient.

It's more important that patching succeeds for all available use cases than for only some patching to succeed with faster performance. A UI option can be added later, but the multithreading option should be opt-out by default rather than opt-in.

Closes ReVanced/revanced-documentation#35
Closes ReVanced#1454
Closes ReVanced#1571
Closes ReVanced#1595
Closes ReVanced#1659
Closes ReVanced#1661
Closes ReVanced#1684
Closes ReVanced#1759
Closes ReVanced#1802
Closes ReVanced#1817
Closes ReVanced/revanced-manager#2885
Closes ReVanced#592
Closes ReVanced/revanced-patcher#193
Closes ReVanced/revanced-patches#1533
Closes ReVanced/revanced-patches#1608
Closes ReVanced/revanced-patches#1613
Closes ReVanced/revanced-patches#1630
Closes ReVanced/revanced-patches#190
Closes ReVanced/revanced-patches#2511
Closes ReVanced/revanced-patches#525
taylorkline added a commit to taylorkline/revanced-manager that referenced this issue Apr 16, 2024
Patching large applications (e.g. TikTok) on Android with multithreading simply doesn't work on multicore devices where the amount of memory given to the manager (regardless of the system RAM) is not sufficient.

It's more important that patching succeeds for all available use cases than for only some patching to succeed with faster performance. A UI option can be added later, but the multithreading option should be opt-out by default rather than opt-in.

Closes ReVanced/revanced-documentation#35
Closes ReVanced#1454
Closes ReVanced#1571
Closes ReVanced#1595
Closes ReVanced#1659
Closes ReVanced#1661
Closes ReVanced#1684
Closes ReVanced#1759
Closes ReVanced#1802
Closes ReVanced#1817
Closes ReVanced/revanced-patches#2885
Closes ReVanced#592
Closes ReVanced/revanced-patcher#193
Closes ReVanced/revanced-patches#1533
Closes ReVanced/revanced-patches#1608
Closes ReVanced/revanced-patches#1613
Closes ReVanced/revanced-patches#1630
Closes ReVanced/revanced-patches#190
Closes ReVanced/revanced-patches#2511
Closes ReVanced/revanced-patches#525
taylorkline added a commit to taylorkline/revanced-manager that referenced this issue Apr 16, 2024
Patching large applications (e.g. TikTok) on Android with multithreading simply doesn't work on multicore devices where the amount of memory given to the manager (regardless of the system RAM) is not sufficient.

It's more important that patching succeeds for all available use cases than for only some patching to succeed with faster performance. A UI option can be added later, but the multithreading option should be opt-out by default rather than opt-in.

Closes ReVanced/revanced-documentation#35
Closes ReVanced#1454
Closes ReVanced#1571
Closes ReVanced#1595
Closes ReVanced#1659
Closes ReVanced#1661
Closes ReVanced#1684
Closes ReVanced#1759
Closes ReVanced#1802
Closes ReVanced#1817
Closes ReVanced/revanced-patches#2885
Closes ReVanced#592
Closes ReVanced/revanced-patcher#193
Closes ReVanced/revanced-patches#1533
Closes ReVanced/revanced-patches#1608
Closes ReVanced/revanced-patches#1613
Closes ReVanced/revanced-patches#1630
Closes ReVanced/revanced-patches#190
Closes ReVanced/revanced-patches#2511
Closes ReVanced/revanced-patches#525
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.

4 participants