mahmoudgalal / ZeeArchiver-Android

Zee is an efficient and simple to use Android Archiver and decompressor. It can decompress and compress from-to all the formats supported by the well known 7zip utility. Copyright © 2018 Mahmoud Galal , for support contact me:mahmoudgalal57@yahoo.com
MIT License
77 stars 10 forks source link

Support get list item in a archive #7

Closed jackyhieu1211 closed 2 years ago

jackyhieu1211 commented 2 years ago

Hello admin @mahmoudgalal

I used method listArchive2 in Archive.class like below. It worked fine in some cases

public class Archive {
....
public List<ArchiveItemsList.ArchiveItem> getArchiveItemsList(String filePath) {
        ArchiveItemsList archiveItemsList = new ArchiveItemsList();
        try {
            listArchive2(filePath, archiveItemsList);
            return archiveItemsList.getItems();
        } catch (Exception e) {
            return new ArrayList<>();
        }
    }
}

But I get an error in the following case:

Step 1: Call method getArchiveItemsList() ===> OK. Worked. return list item in archive. In my case size equals 3 Step 2: Bring the app to the background state. (Click button HardwareKey in device -> State is background -> Reopen app -> State is foreground ) Step 3: Call method getArchiveItemsList() ===> It worked. But litem list is duplicated ==> Size = 6 Step 4: Repeat step 2 -> Step 3 -> App crash ==> Get error

Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 24702 (RxCachedThreadS), pid 5003 (pressfolder.dev)

Please check. thank you very much

jackyhieu1211 commented 2 years ago

This is my error. Sorry