ReVanced / revanced-manager

💊 Application to use ReVanced on Android
https://revanced.app
GNU General Public License v3.0
18.24k stars 748 forks source link

bug:java.lang.OutOfMemoryError #2306

Closed Antonlosk10 closed 5 days ago

Antonlosk10 commented 6 days ago

Bug description

I want to patch tiktok using all the patches, but if I enable Sim Spoof an error occurs.

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

Revanced manager 1.23.1 Tiktok 36.5.4

Installation method

None

ReVanced Manager logs

https://drive.google.com/file/d/1-Or_Hd-eL-dWtkylnbW_mg-FtFWyR1FT/view?usp=drivesdk

Patch logs

- Device Info
ReVanced Manager: 1.23.1
Model: 2109119DG
Android version: 14
Supported architectures: arm64-v8a, armeabi-v7a, armeabi
Root permissions: Yes

- Patch Info
App: com.zhiliaoapp.musically v36.5.4 (Suggested: 36.5.4)
Patches version: v5.0.0
Patches added: SIM spoof
Patches removed: None
Default patch options changed: None

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

- Logs
Reading APK
Decoding app manifest
Loading patches
Deleting existing temporary files directory
Decoding resources
An error occurred:
java.lang.OutOfMemoryError: Failed to allocate a 32 byte allocation with 931536 free bytes and 909KB until OOM, target footprint 536870912, growth limit 536870912; giving up on allocation because <1% of heap free after GC.
    at java.util.LinkedHashMap.newNode(LinkedHashMap.java:299)
    at java.util.HashMap.putVal(HashMap.java:647)
    at java.util.HashMap.put(HashMap.java:617)
    at java.util.HashSet.add(HashSet.java:229)
    at java.util.AbstractCollection.addAll(AbstractCollection.java:336)
    at java.util.LinkedHashSet.<init>(LinkedHashSet.java:182)
    at brut.androlib.res.data.ResResSpec.listResources(SourceFile:60)
    at brut.androlib.res.data.ResPackage.listValuesFiles(SourceFile:97)
    at brut.androlib.res.ResourcesDecoder.decodeResources(SourceFile:181)
    at app.revanced.patcher.patch.ResourcePatchContext.decodeResources$revanced_patcher(SourceFile:64)
    at app.revanced.patcher.Patcher$invoke$1.invokeSuspend(SourceFile:96)
    at app.revanced.patcher.Patcher$invoke$1.invoke(SourceFile:0)
    at app.revanced.patcher.Patcher$invoke$1.invoke(SourceFile:0)
    at kotlinx.coroutines.flow.SafeFlow.collectSafely(SourceFile:57)
    at kotlinx.coroutines.flow.AbstractFlow.collect(SourceFile:226)
    at app.revanced.manager.flutter.MainActivity$runPatcher$1$patcherResult$1$1.invokeSuspend(SourceFile:319)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(SourceFile:33)
    at kotlinx.coroutines.DispatchedTask.run(SourceFile:104)
    at kotlinx.coroutines.EventLoopImplBase.processNextEvent(SourceFile:277)
    at kotlinx.coroutines.BlockingCoroutine.joinBlocking(SourceFile:95)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(SourceFile:69)
    at kotlinx.coroutines.BuildersKt.runBlocking(SourceFile:1)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(SourceFile:48)
    at kotlinx.coroutines.BuildersKt.runBlocking$default(SourceFile:1)
    at app.revanced.manager.flutter.MainActivity.runPatcher$lambda$34(SourceFile:313)
    at app.revanced.manager.flutter.MainActivity.$r8$lambda$_NYn7P0Ss3RCL0-SqEFL-opMsQw(SourceFile:0)
    at app.revanced.manager.flutter.MainActivity$$ExternalSyntheticLambda6.run(SourceFile:0)
    at java.lang.Thread.run(Thread.java:1012)

Acknowledgements

Beenlord commented 5 days ago

I have the same problem

Antonlosk10 commented 5 days ago

After I updated the patches to the latest ones the error is gone.