Unrecognized Error Code

Help
GaryK
2005-09-02
2013-04-29
  • GaryK
    GaryK
    2005-09-02

    Dear Community,

    I am just getting started with AAF 1.1 and encountered an error code that I was not able to find a definition for in the header files. It seems to be below the range of the symbolic codes. The code is 80000004 and it is returned by AAFFileOpenNewModify. Can anyone tell me what this means.

    BTW, I would also like to know if there is such a thing as an AAF Plugin Developers Guide.

    Thanks,
    Gary K.

     
    • GaryK
      GaryK
      2005-09-07

      I have reduced the scope of the problem to the following:

      My application calls AAF via

      hr=AAFFileOpenNewModify( pFileName, modeFlags, &prodInfo, &file );

      This eventually leads to OMSS_SSStoredObjectFactory::createFile calling what I believe is StructuredStorage via

      HRESULT status = OMSSIStorage::StgCreateStorageEx(omFileName, OMFile::modifyMode, (void **)&storage, sectorSize);

      This returns status=80000004 (E_NOINTERFACE).

      Can anyone tell me what might be the cause of this?

       
      • John Emmas
        John Emmas
        2005-09-08

        Are you using the Windows SDK? If so, try rebuilding your entire project with the default structure alignment (8 bytes) and see if that helps.

         
    • GaryK
      GaryK
      2005-09-08

      Thanks, John.

      I am using Visual C++.net version 2003.

      For each of my projects I examined the Properties->Configuration Properties->C/C++->Code Generation->Struct Memeber Alignment and found all to be set to Default.

      I also confirmed that the AAF projects had this setting.

       
    • GaryK
      GaryK
      2005-09-09

      I may have discovered a negative-case bug in StructuredStorage.

      My trace code shows my application calling

      hr=AAFFileOpenNewModify( pFileName, modeFlags, &prodInfo, &file );

      with pFilename = L"\\".

      To verify that this is actually the problem, I modified the CEnumAAFComponentTest at line 628 to pass this value. This actually duplicated the problem, causing the test to fail.

      Can someone please confirm this, and should I submit a bug report?

       
      • John Emmas
        John Emmas
        2005-09-09

        For what it's worth, I also managed to reproduce the same error with the same file name - and also with other invalid file names, such as " ? " and " *.* "

        However, these ARE invalid file names, so it's reasonable to expect an error to occur.

         
    • GaryK
      GaryK
      2005-09-09

      Good point, John. However, I am sure you appreciate the value of an APPROPRIATE error code. E_NOINTERFACE sent me looking in the wrong place for quite a while.

       
      • John Emmas
        John Emmas
        2005-09-10

        Actually, the returned error code you saw (error 4) corresponds to SSTG_ERROR_FILEIO (defined in sss-impl\include\StructuredStorage.h). But because error 4 doesn't map to any of the official AAF error codes, AAFFileOpenNewModify should have been converting it to AAFRESULT_UNEXPECTED_EXCEPTION. I don't understand why you got E_NOINTERFACE. I didn't.

        The problem here is how does the library code know what is a valid file name and what isn't? It's a simple enough task on a single platform, but AAF is multi-platform. Therefore names that are valid on the host platform might not be valid on the intended destination.

        In the low level OM code, various precoditions check for "Valid File Name" - but currently they only check that the name is non-NULL. This isn't a trivial problem to solve with a cross-platform library but maybe as a minimum, the file name should be checked to see if it's valid on the host platform.

        Anyone have any thoughts to add to that??