MGFetch requires WriteDeviceData capability on Nokia N97 (Known Issue)
MGFetch (class used for fetching file names for Media Gallery content) is not documented to require any capabilities. However, all overloaded versions of the MGFetch::RunL method require the ReadUserData capability. For more information, see KIS000765 - Issues with MGFetch.
On the Nokia N97, MGFetch::RunL causes a panic (KERN-EXEC 3) or fails with the KErrAccessDenied error unless also the WriteDeviceData capability is defined.
This is a known problem and is expected to be fixed in the next software release for Nokia N97. Add ReadUserData and WriteDeviceData capabilities to your application.
Note that WriteDeviceData requires that the application is Symbian signed.