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: not able to patch tiktok due to no more space in heap for allocation #1571

Closed
4 tasks done
aikooo7 opened this issue Dec 14, 2023 · 1 comment · May be fixed by #1869
Closed
4 tasks done

bug: not able to patch tiktok due to no more space in heap for allocation #1571

aikooo7 opened this issue Dec 14, 2023 · 1 comment · May be fixed by #1869
Labels
Bug report Something isn't working

Comments

@aikooo7
Copy link

aikooo7 commented Dec 14, 2023

Bug description

When trying to patch version 32.5.3 of TikTok with Revanced version 1.17.3 I get a lot of class.dex decompilation at a point that no space in heap is left.

  • Steps to reproduce:
    • Download Revanced manager and TikTok with the specified version;
    • Apply the following patches:
      • Downloads;
      • Feed filter;
      • Fix Google login;
      • Feed filter;
      • Playback speed;
      • Settings;
      • Show seekbar.
    • Wait until you get a heap allocation memory error.

Version of ReVanced Manager and version & name of application you tried to patch

  • Revanced:
    • Version:
      • 1.17.3
  • Patched app:
    • Name:
      • TikTok
    • Version:
      • 32.5.3

Installation type

None

Device logs

--------- beginning of main
12-14 23:11:10.358 29011 29029 E OpenGLRenderer: Unable to match the desired swap behavior.
12-14 23:11:10.367 29011 29011 E SurfaceSyncer: Failed to find sync for id=0
12-14 23:11:10.367 29011 29011 E SurfaceSyncer: Failed to find sync for id=1
12-14 23:11:10.367 29011 29011 E SurfaceSyncer: Failed to find sync for id=2
12-14 23:11:10.367 29011 29011 E SurfaceSyncer: Failed to find sync for id=3
12-14 23:11:10.367 29011 29011 E SurfaceSyncer: Failed to find sync for id=4
12-14 23:11:10.367 29011 29011 E SurfaceSyncer: Failed to find sync for id=5
12-14 23:11:10.367 29011 29011 E SurfaceSyncer: Failed to find sync for id=6
12-14 23:11:12.134 29011 29011 W OnBackInvokedCallback: OnBackInvokedCallback is not enabled for the application.
12-14 23:11:12.134 29011 29011 W OnBackInvokedCallback: Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
12-14 23:11:19.278 29011 29029 E OpenGLRenderer: Unable to match the desired swap behavior.
12-14 23:11:19.280 29011 29011 E SurfaceSyncer: Failed to find sync for id=0
12-14 23:11:19.280 29011 29011 E SurfaceSyncer: Failed to find sync for id=1
12-14 23:11:19.280 29011 29011 E SurfaceSyncer: Failed to find sync for id=2
12-14 23:11:19.280 29011 29011 E SurfaceSyncer: Failed to find sync for id=3
12-14 23:11:19.280 29011 29011 E SurfaceSyncer: Failed to find sync for id=4
12-14 23:11:19.280 29011 29011 E SurfaceSyncer: Failed to find sync for id=5
12-14 23:11:19.280 29011 29011 E SurfaceSyncer: Failed to find sync for id=6
12-14 23:11:19.280 29011 29011 E SurfaceSyncer: Failed to find sync for id=7
12-14 23:11:35.534 29011 29029 E OpenGLRenderer: Unable to match the desired swap behavior.
12-14 23:11:35.536 29011 29011 E SurfaceSyncer: Failed to find sync for id=0
12-14 23:11:35.536 29011 29011 E SurfaceSyncer: Failed to find sync for id=1
12-14 23:11:35.536 29011 29011 E SurfaceSyncer: Failed to find sync for id=2
12-14 23:11:35.536 29011 29011 E SurfaceSyncer: Failed to find sync for id=3
12-14 23:11:35.536 29011 29011 E SurfaceSyncer: Failed to find sync for id=4
12-14 23:11:35.536 29011 29011 E SurfaceSyncer: Failed to find sync for id=5
12-14 23:11:35.536 29011 29011 E SurfaceSyncer: Failed to find sync for id=6
12-14 23:11:35.536 29011 29011 E SurfaceSyncer: Failed to find sync for id=7
12-14 23:11:35.536 29011 29011 E SurfaceSyncer: Failed to find sync for id=8
12-14 23:11:43.646 29011 29029 E OpenGLRenderer: Unable to match the desired swap behavior.
12-14 23:11:43.649 29011 29011 E SurfaceSyncer: Failed to find sync for id=0
12-14 23:11:43.649 29011 29011 E SurfaceSyncer: Failed to find sync for id=1
12-14 23:11:43.649 29011 29011 E SurfaceSyncer: Failed to find sync for id=2
12-14 23:11:43.649 29011 29011 E SurfaceSyncer: Failed to find sync for id=3
12-14 23:11:43.649 29011 29011 E SurfaceSyncer: Failed to find sync for id=4
12-14 23:11:43.649 29011 29011 E SurfaceSyncer: Failed to find sync for id=5
12-14 23:11:43.649 29011 29011 E SurfaceSyncer: Failed to find sync for id=6
12-14 23:11:43.649 29011 29011 E SurfaceSyncer: Failed to find sync for id=7
12-14 23:11:43.649 29011 29011 E SurfaceSyncer: Failed to find sync for id=8
12-14 23:11:43.649 29011 29011 E SurfaceSyncer: Failed to find sync for id=9
12-14 23:11:50.517 29011 29029 E OpenGLRenderer: Unable to match the desired swap behavior.
12-14 23:11:50.519 29011 29011 E SurfaceSyncer: Failed to find sync for id=0
12-14 23:11:50.519 29011 29011 E SurfaceSyncer: Failed to find sync for id=1
12-14 23:11:50.519 29011 29011 E SurfaceSyncer: Failed to find sync for id=2
12-14 23:11:50.519 29011 29011 E SurfaceSyncer: Failed to find sync for id=3
12-14 23:11:50.519 29011 29011 E SurfaceSyncer: Failed to find sync for id=4
12-14 23:11:50.519 29011 29011 E SurfaceSyncer: Failed to find sync for id=5
12-14 23:11:50.519 29011 29011 E SurfaceSyncer: Failed to find sync for id=6
12-14 23:11:50.519 29011 29011 E SurfaceSyncer: Failed to find sync for id=7
12-14 23:11:50.519 29011 29011 E SurfaceSyncer: Failed to find sync for id=8
12-14 23:11:50.519 29011 29011 E SurfaceSyncer: Failed to find sync for id=9
12-14 23:11:50.519 29011 29011 E SurfaceSyncer: Failed to find sync for id=10
12-14 23:12:34.015 29011 29029 E OpenGLRenderer: Unable to match the desired swap behavior.
12-14 23:12:34.017 29011 29011 E SurfaceSyncer: Failed to find sync for id=0
12-14 23:12:34.017 29011 29011 E SurfaceSyncer: Failed to find sync for id=1
12-14 23:12:34.017 29011 29011 E SurfaceSyncer: Failed to find sync for id=2
12-14 23:12:34.017 29011 29011 E SurfaceSyncer: Failed to find sync for id=3
12-14 23:12:34.017 29011 29011 E SurfaceSyncer: Failed to find sync for id=4
12-14 23:12:34.017 29011 29011 E SurfaceSyncer: Failed to find sync for id=5
12-14 23:12:34.017 29011 29011 E SurfaceSyncer: Failed to find sync for id=6
12-14 23:12:34.017 29011 29011 E SurfaceSyncer: Failed to find sync for id=7
12-14 23:12:34.017 29011 29011 E SurfaceSyncer: Failed to find sync for id=8
12-14 23:12:34.017 29011 29011 E SurfaceSyncer: Failed to find sync for id=9
12-14 23:12:34.017 29011 29011 E SurfaceSyncer: Failed to find sync for id=10
12-14 23:12:34.017 29011 29011 E SurfaceSyncer: Failed to find sync for id=11
12-14 23:12:48.094 29011 29029 E OpenGLRenderer: Unable to match the desired swap behavior.
12-14 23:12:48.097 29011 29011 E SurfaceSyncer: Failed to find sync for id=0
12-14 23:12:48.097 29011 29011 E SurfaceSyncer: Failed to find sync for id=1
12-14 23:12:48.097 29011 29011 E SurfaceSyncer: Failed to find sync for id=2
12-14 23:12:48.097 29011 29011 E SurfaceSyncer: Failed to find sync for id=3
12-14 23:12:48.097 29011 29011 E SurfaceSyncer: Failed to find sync for id=4
12-14 23:12:48.097 29011 29011 E SurfaceSyncer: Failed to find sync for id=5
12-14 23:12:48.097 29011 29011 E SurfaceSyncer: Failed to find sync for id=6
12-14 23:12:48.097 29011 29011 E SurfaceSyncer: Failed to find sync for id=7
12-14 23:12:48.097 29011 29011 E SurfaceSyncer: Failed to find sync for id=8
12-14 23:12:48.097 29011 29011 E SurfaceSyncer: Failed to find sync for id=9
12-14 23:12:48.097 29011 29011 E SurfaceSyncer: Failed to find sync for id=10
12-14 23:12:48.097 29011 29011 E SurfaceSyncer: Failed to find sync for id=11
12-14 23:12:48.097 29011 29011 E SurfaceSyncer: Failed to find sync for id=12
12-14 23:12:49.955 29011 29011 D CompatibilityChangeReporter: Compat change id reported: 160794467; UID 10177; state: ENABLED
12-14 23:13:07.014 29011 29011 D CompatibilityChangeReporter: Compat change id reported: 78294732; UID 10177; state: ENABLED
12-14 23:13:07.020 29011 29011 I InstallPlugin: handleActivityResult(22643,0,null)

Patcher logs

- Device Info
ReVanced Manager: 1.17.3
Build: release
Model: Pixel 6 Pro
Android version: 13
Supported architectures: arm64-v8a, armeabi-v7a, armeabi
Root permissions: Yes

- Patch Info
App: com.zhiliaoapp.musically v32.5.3 (Suggested: v32.5.3)
Patches version: v3.1.0
Patches added: Downloads, Feed filter, Fix Google login, Playback speed, Settings, Show seekbar
Patches removed: Feed filter, Downloads, Show seekbar, Playback speed, Disable login requirement, Fix Google login, Settings
Options changed: None

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

- Logs
Copying APK
Reading APK
Decoding app manifest
Loading patches
Merging integrations
Executing patches
Applied 6 patches
Compiling patched dex files
Compiled 21 dex files
An error occurred:
java.lang.OutOfMemoryError: Failed to allocate a 24 byte allocation with 1881240 free bytes and 1837KB 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.instruction.DexBackedInstruction.buildInstruction(DexBackedInstruction.java:96)
	at com.android.tools.smali.dexlib2.dexbacked.instruction.DexBackedInstruction.readFrom(DexBackedInstruction.java:68)
	at com.android.tools.smali.dexlib2.dexbacked.DexBackedMethodImplementation$1$1.readNextItem(DexBackedMethodImplementation.java:93)
	at com.android.tools.smali.dexlib2.dexbacked.DexBackedMethodImplementation$1$1.readNextItem(DexBackedMethodImplementation.java:86)
	at com.android.tools.smali.dexlib2.dexbacked.util.VariableSizeLookaheadIterator.computeNext(VariableSizeLookaheadIterator.java:59)
	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:145)
	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:140)
	at com.android.tools.smali.dexlib2.writer.pool.ClassPool.internCode(ClassPool.java:158)
	at com.android.tools.smali.dexlib2.writer.pool.ClassPool.intern(ClassPool.java:140)
	at com.android.tools.smali.dexlib2.writer.pool.DexPool.internClass(DexPool.java:129)
	at lanchon.multidexlib2.DexIO.writeMultiDexDirectoryCommon(DexIO.java:143)
	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)

Acknowledgements

  • This request is not a duplicate of an existing issue.
  • I have chosen an appropriate title.
  • All requested information has been provided properly.
  • The issue is solely related to the ReVanced Manager
@aikooo7 aikooo7 added the Bug report Something isn't working label Dec 14, 2023
@oSumAtrIX
Copy link
Member

#592

@oSumAtrIX oSumAtrIX closed this as not planned Won't fix, can't repro, duplicate, stale 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.

2 participants