Unspecified Error

Viki
2012-06-28
2012-12-07
1 2 > >> (Page 1 of 2)
  • Viki
    Viki
    2012-06-28

    Hi,

    When i try to open a VHD archive both7z.exe and 7zFM.exe reports

    Unspecified Error
    

    msg. While the same vhd is attaching successfully in windows disk management. What would the cause of this error message?

    /Thanks

     
  • Igor Pavlov
    Igor Pavlov
    2012-06-28

    1) Try different versions of 7-Zip: 9.25 alpha and 9.28 alpha
    2) Try to open only top level with command
    7z l a.vhd -t*
    if it works, extract it:
    7z x a.vhd -t*
    and then try to open / extract next level:
    7z l a.mbr -t*
    ….
    and then try to open NTFS level.

     
  • Viki
    Viki
    2012-06-28

    Hi,

    I get this error when trying 7z x a.vhd -t*

    Extracting  test.mbr     Data Error
    Sub items Errors: 1
    

    /Thanks

     
  • Viki
    Viki
    2012-06-28

    Hi,
    edited:
    I get this error when trying 7z x test.vhd -t*

    Extracting  test.mbr     Data Error
    Sub items Errors: 1
    

    /Thanks

     
  • Viki
    Viki
    2012-06-28

    Hi,

    HRESULT ReadStream(ISequentialInStream *stream, void *data, size_t *processedSize)
    {
      
        HRESULT res = stream->Read(data, curSize, &processedSizeLoc);
        *processedSize += processedSizeLoc;
        
    }
    

    When i tried debugging the FM code, res becomes S_FALSE so it fails with this unspecified error. Any clue on how to solve this issue?

    /Thanks

     
  • Igor Pavlov
    Igor Pavlov
    2012-06-29

    Show log.txt:
    7z l a.vhd -t* > log.txt

     
  • Viki
    Viki
    2012-06-29

    Hi.

    7-Zip [64] 9.28 alpha  Copyright (c) 1999-2012 Igor Pavlov  2012-06-20
    Listing archive: G:\Error.vhd
    --
    Path = G:\Error.vhd
    Type = VHD
    Created = 2012-06-29 08:27:26
    Cluster Size = 2097152
    Method = Dynamic
    Creator Application = win 6.1
    Host OS = Windows
    Saved State = -
    ID = 13FF4FADD36CF64F8330A9A40898950B
       Date      Time    Attr         Size   Compressed  Name
    ------------------- ----- ------------ ------------  ------------------------
                        .....   5368709120    136314880  Error.mbr
    ------------------- ----- ------------ ------------  ------------------------
                                5368709120    136314880  1 files, 0 folders
    
    7-Zip [64] 9.28 alpha  Copyright (c) 1999-2012 Igor Pavlov  2012-06-20
    Processing archive: G:\Error.vhd
    Extracting  Error.mbr     Data Error
    Sub items Errors: 1
    

    This is the message i  see in log file. For listing and extract command of 7z

     
  • Igor Pavlov
    Igor Pavlov
    2012-06-29

    What software was used to create that vhd file?

    Try to debug the VhdHandler.cpp code with
    7z t error.vhd -t* -scrc

    Or compress file with password to 7z archive, upload it to some server and send download link to my e-mail.

     
  • Viki
    Viki
    2012-06-29

    Hi,

    I have mailed you the link to the file. In meantime i will also follow the steps you told.
    /Thanks

     
  • Igor Pavlov
    Igor Pavlov
    2012-06-29

    error in code (return S_FALSE):

          if (((BitMap >> (7 - (bmi & 7))) & 1) == 0)
          {
            if (ParentStream)
            {
              RINOK(ParentStream->Seek(_virtPos + cur, STREAM_SEEK_SET, NULL));
              RINOK(ReadStream_FALSE(ParentStream, (Byte *)data + cur, rem));
            }
            else
            {
              const Byte *p = (const Byte *)data + cur;
              for (UInt32 i = 0; i < rem; i++)
                if (p_ != 0)
                  return S_FALSE;
            }

    As I understand, file must contain zeros for data that is Zero in bimap.
    I suppose that standard MS tool creates such "correct" VHDs.

    So, write zeros to your VHD file.
    _

     
  • Igor Pavlov
    Igor Pavlov
    2012-06-29

    const Byte p = (const Byte )data + cur;
              for (UInt32 i = 0; i < rem; i++)
                if (p[i] != 0)
                  return S_FALSE;

     
  • Viki
    Viki
    2012-07-27

    Hi,

    1. Does 7Z fail if we exceed the MAX_PATH limit for path ?
    2. How to use 7zG.exe seperately without interface of 7ZFM?

    /Thanks

     
  • Igor Pavlov
    Igor Pavlov
    2012-07-27

    1. 7-zip tries to use long pathes in that case
    2. 7zg.exe and 7z.exe support same commands and switches described in 7-zip.chm.

     
  • Viki
    Viki
    2012-08-08

    Hi,

    I wanted to use 7zG.exe for testing a VHD archive but i would like to make it in slient mode (i.e) I dont want the progress bar to appear what can be done for it to take affect? any help on this.

    /Thanks.

     
  • Igor Pavlov
    Igor Pavlov
    2012-08-09

    Do you need other messages like errors and so on?
    Maybe you can call 7z.exe with inactive console window.

     
  • Viki
    Viki
    2012-08-09

    Hi,

    That sounds good for me. which flag should i use for it? .. thanks.
    For information, may i know how does test archive works on VHD?
    /Thanks

     
  • Viki
    Viki
    2012-09-22

    Hi,

    Is there a way to search files inside the archive in 7Zip?
    or How to implement it?

    /Thanks

     
  • Igor Pavlov
    Igor Pavlov
    2012-09-22

    If you need to search some string, you must create new class that implements ISequentialOutStream interface. That implementation must search string in stream.
    And in extract callback you must send that ISequentialOutStream implementation instead of implementation that work with files on disk.

     
  • Viki
    Viki
    2012-09-27

    Hi,

    I have a VHD file say if i compress the blocks of VHD using 7Zip compression algorithm. Will i still be able to open the VHD file using 7ZipFM ?
    Any help on this?

    /Thanks

     
  • Igor Pavlov
    Igor Pavlov
    2012-09-27

    I don't understand that question.

     
  • Viki
    Viki
    2012-09-28

    Hi,

    Say I create a VHD file with 2MB block - before storing it as a in the VHD, I also compress the 2MB block with 7zip. I know it is not possible for the 7zip to read the VHD as it is - but where exactly should I look in the code to make this case of VHD compressed with 7zip to make it work.

    /Thanks

     
  • Igor Pavlov
    Igor Pavlov
    2012-09-28

    1) Why do you need it?
    2) What compression method do you want to use?

     
  • Viki
    Viki
    2012-09-28

    1) Why do you need it?
    > I have developed a application which would create VHD and write data into it. Using 7Zip FM i was able to open the VHD  as an archive. Now i wanted to write data into it in compressed way and still wanted to explorer the contents of the VHD using 7ZipFm . So i thought of compressing the data using 7Zip compression algorithm
    2) What compression method do you want to use?
    > LZMA or LZMA2

    /Thanks

     
  • Igor Pavlov
    Igor Pavlov
    2012-09-28

    It will be not VHD compatible. So other programs will not be able to open it. So it will be new format.

    And probaby it's simpler to write it from zero without using VHD format.

    You need some "map" that will contain information for each block:
    Compressed size and LZMA properties.
    If you need "delete" feature for such archive, you need some smart space allocator, since compressed blocks have different sizes.

     
1 2 > >> (Page 1 of 2)