Troubleshooting Plug-in loading Errors

Sometimes, attempts by clients to instantiate a plug-in leave with a generic error code of -46 or -1. This page discusses the most likely reasons why this might happen.

This page contains some help on interpreting error messages

Error

Action

Error -46 ( KErrPermissionDenied ):

  • The plug-in DLL providing the implementation has less platform security capabilities than the client process. This is a problem as the platform security DLL loading rules require a DLL to have the same or greater capabilities as the process trying to use it.

    Refer ECom and the Platform Security Architecture for more details.

  • The plug-in DLL providing the implementation was incorrectly installed on a media card. The system hash value of the plug-in DLL was missing, or it was inconsistent with the one calculated for the plug-in DLL at load time.

    Refer ECom and the Platform Security Architecture for more details.

  • There is an error in the plug-in registration file. The UID value specified in the dll_uid member of the REGISTRY_INFO structure in the plug-in's resource file did not match the Secure ID (UID3 value) of the plug-in DLL. If a match is not found the plug-in is discarded and is not added to the registry of available plug-ins.

    Refer Creating a Standard Registration Resource File for more details.

Error -1 ( KErrNotFound ):

This indicates an error in coding or installing the plug-in. The problem needs to be fixed by the creator of the plug-in.

Possible causes of the error are:

  • When porting a plug-in from a version of Symbian platform before 9.1, the files were not installed in the locations required by Symbian OS v9.1 and later versions. This prevents the framework from discovering the plug-in.

    Refer How to write an implementation project file for more details.

  • The plug-in was compiled using the CodeWarrior IDE before version 3.1. This ignores the TARGET keyword in START RESOURCE ... END blocks, so that the wrong resource file is built.

    For example in the code block below:

                 
                  
                 
                 START RESOURCE 123456789.rss
    TARGET foo.rsc
    END
                

    The resource file built is 123456789.rsc rather than the expected foo.rsc .

    Solution for the above error are to build from the command line or from a later version of CodeWarrior.

  • DLLs to which the plug-in links are absent from the phone.

    The eshell text shell provides these commands to help you check for missing DLLs:

    • chkdeps checks the dependencies of an executable.

    • trace /L in debug builds outputs messages describing why an attempt to load a DLL fails.

  • The TImplementationProxy array coding does not contain a matching entry for the plug-in.

    See How to export the implementation factories for more information.