TeamAmaze / TeamAmaze/AmazeFileManager
BufferUnderflowException on extracting 7zip file
Open
Nobody has claimed this yet.
Area-Compression
From-Email
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
- User Action: UI Error
- Request: Application crash
- Version: 3.5.3
- OS: Linux Android 6.0.1 - 23
- Device: c9ltechn
- Model: SM-C9000
- Product: c9ltezh
Crash log
java.lang.RuntimeException: An error occurred while executing
doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:309)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.nio.BufferUnderflowException
at java.nio.ByteArrayBuffer.get(ByteArrayBuffer.java:152)
at
com.amaze.filemanager.filesystem.compressed.sevenz.SevenZFile.getUnsignedByte(SevenZFile.java:1142)
at
com.amaze.filemanager.filesystem.compressed.sevenz.SevenZFile.readHeaders(SevenZFile.java:351)
at
com.amaze.filemanager.filesystem.compressed.sevenz.SevenZFile.<init>(SevenZFile.java:239)
at
com.amaze.filemanager.filesystem.compressed.sevenz.SevenZFile.<init>(SevenZFile.java:106)
at
com.amaze.filemanager.filesystem.compressed.sevenz.SevenZFile.<init>(SevenZFile.java:260)
at
com.amaze.filemanager.filesystem.compressed.extractcontents.helpers.SevenZipExtractor.extractWithFilter(SevenZipExtractor.java:56)
at
com.amaze.filemanager.filesystem.compressed.extractcontents.Extractor.extractEverything(Extractor.java:77)
at
com.amaze.filemanager.asynchronous.services.ExtractService$DoWork.doInBackground(ExtractService.java:315)
at
com.amaze.filemanager.asynchronous.services.ExtractService$DoWork.doInBackground(ExtractService.java:225)
at android.os.AsyncTask$2.call(AsyncTask.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
... 4 more
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with SevenZFile.getUnsignedByte and readHeaders, where the reported BufferUnderflowException occurs, then trace the call from SevenZipExtractor.extractWithFilter. Reproduce extraction of the affected 7zip archive if it is available and determine how the malformed or unexpected header should be handled without crashing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100