TeamAmaze / TeamAmaze/AmazeFileManager

OOM after 7zip decompress

Open
#3,187 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Compression Crash-OutOfMemory From-telegram Issue-Bug
Dominant language
Kotlin
Stars
6.4k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
1

Description

Issue explanation (write below this line)

Exception

  • App Name: Amaze File Manager
  • Package: com.amaze.filemanager
  • Version: 3.6.7
  • User Action: UI Error
  • Request: Application crash
  • OS: Linux Android 11 - 30
  • Device: wisdom
  • Model: SM-P205
  • Product: wisdomdx
Crash log

java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$4.done(AsyncTask.java:415)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
at java.util.concurrent.FutureTask.run(FutureTask.java:271)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
Caused by: java.lang.OutOfMemoryError: Failed to allocate a 402653200 byte allocation with 5842998 free bytes and 186MB until OOM, target footprint 11685998, growth limit 201326592
at org.tukaani.xz.ArrayCache.getByteArray(Unknown Source:0)
at org.tukaani.xz.lz.LZDecoder.(Unknown Source:18)
at org.tukaani.xz.LZMA2InputStream.(Unknown Source:49)
at org.tukaani.xz.LZMA2InputStream.(Unknown Source:4)
at org.tukaani.xz.LZMA2InputStream.(Unknown Source:1)
at com.amaze.filemanager.filesystem.compressed.sevenz.LZMA2Decoder.decode(LZMA2Decoder.java:39)
at com.amaze.filemanager.filesystem.compressed.sevenz.Coders.addDecoder(Coders.java:79)
at com.amaze.filemanager.filesystem.compressed.sevenz.SevenZFile.buildDecoderStack(SevenZFile.java:1028)
at com.amaze.filemanager.filesystem.compressed.sevenz.SevenZFile.buildDecodingStream(SevenZFile.java:981)
at com.amaze.filemanager.filesystem.compressed.sevenz.SevenZFile.getNextEntry(SevenZFile.java:295)
at com.amaze.filemanager.filesystem.compressed.extractcontents.helpers.SevenZipExtractor.extractWithFilter(SevenZipExtractor.kt:69)
at com.amaze.filemanager.filesystem.compressed.extractcontents.Extractor.extractEverything(Extractor.java:82)
at com.amaze.filemanager.asynchronous.services.ExtractService$DoWork.doInBackground(ExtractService.java:318)
at com.amaze.filemanager.asynchronous.services.ExtractService$DoWork.doInBackground(ExtractService.java:227)
at android.os.AsyncTask$3.call(AsyncTask.java:394)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
... 4 more


Reporter: None

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the crash path at filesystem/compressed/sevenz/LZMA2Decoder.java:39 and follow it through SevenZFile.java, SevenZipExtractor.kt:69, and ExtractService.java:318. Reproduce 7zip extraction on Android and determine where memory usage exceeds the limit. Done means the reported archive can be decompressed without an OutOfMemoryError.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, kotlin
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.