Config file and cropmarks.bmp don't load sometimes

Issue #43 resolved
Trammell Hudson repo owner created an issue

The config file and the cropmarks.bmp file don't always load. FIO_ReadFile() doesn't always return the data, even when the return code says the entire file was read?

FIO_ReadSync() disables powersave during the read. Does it do anything else?

Comments (6)

  1. Trammell Hudson reporter

    Config file seems to load 512 bytes and then stop returning data.

    cropmarks appear to miss the first 8 bytes of the file.

      1113:  3306.760 [MAGIC] A:/cropmarks.bmp: signature 0000
      1114:  3306.814 [MAGIC] 0085b908: 00000000 00000000 04360000 00280000
      1115:  3306.857 [MAGIC] 0085b918: 02d00000 01e00000 00010000 00000008
      1116:  3306.910 [MAGIC] 0085b928: 46000000 0b130005 0b130000 01000000
      1117:  3306.961 [MAGIC] 0085b938: 01000000 ffff0000 ebeb00ff 000000eb
    

    hex dump of cropmarks.bmp:

    0000000          4a364d42        00000005        04360000        00280000
    0000020          02d00000        01e00000        00010000        00000008
    0000040          46000000        0b130005        0b130000        01000000
    0000060          01000000        ffff0000        ebeb00ff        000000eb
    

    FIO_ReadFile() returns the correct number of bytes read. FR_ReadFileSync() crashes the camera with err70.

  2. Trammell Hudson reporter

    It looks like it is not a malloc() related issue, but a problem with FIO_ReadFile(). Initializing the buffer to 'A' + i before writing shows the problem:

    1142:  2900.031 [MAGIC] 0085bd0c: 44434241 48474645 4c4b4a49 504f4e4d
    1143:  2900.075 [MAGIC] 0085bd1c: 54535251 01e00000 00010000 00000008
    1144:  2900.131 [MAGIC] 0085bd2c: 46000000 0b130005 0b130000 01000000
    1145:  2900.181 [MAGIC] 0085bd3c: 01000000 ffff0000 ebeb00ff 000000eb
    

    Clearly the first few words are not loaded by the read. WTF DryOS?

  3. Log in to comment