darlinghq / darling-dmg

FUSE module for .dmg files (containing an HFS+ filesystem)
http://www.darlinghq.org
GNU General Public License v3.0
273 stars 45 forks source link

Error: Could not find decmpfs resource in resource fork #35

Closed LubosD closed 8 years ago

LubosD commented 8 years ago

Happens when reading /Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/System/Library/Fonts/Core/CourierNewBoldItalic.ttf in Xcode_7.2.dmg.

LubosD commented 8 years ago

Sometimes I also see "Short read of resource fork map list":

#0  0x00007ffff6650b90 in __cxa_throw () from /usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/libstdc++.so.6
#1  0x00007ffff7975aa8 in ResourceFork::loadResources (this=0x1702460) at /home/lubos/Projects/darling/src/external/darling-dmg/src/ResourceFork.cpp:44
#2  0x00007ffff79757ce in ResourceFork::ResourceFork (this=0x1702460, reader=std::shared_ptr (count 14321056, weak -1) 0x7fffffffcda0)
    at /home/lubos/Projects/darling/src/external/darling-dmg/src/ResourceFork.cpp:11
#3  0x00007ffff797bc98 in HFSHighLevelVolume::openFile (this=0x8494b0, 
    path="/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/System/Library/Fonts/Core/CourierNewBoldItalic.ttf")
    at /home/lubos/Projects/darling/src/external/darling-dmg/src/HFSHighLevelVolume.cpp:161
LubosD commented 8 years ago

Appears to be a cache related bug (either caused by the cache or hidden by the cache). Adding a complete read of the resource fork at the beginning of ResourceFork::loadResources() makes the bug go away.