Symbian
Symbian OS Library

FAQ-0663 How can I resolve the 'Not Found' message that appears when trying to launch an application?

[Index][spacer] [Previous] [Next]



 

Classification: C++ Category: Debugging
Created: 06/30/2000 Modified: 09/11/2002
Number: FAQ-0663
Platform: Not Applicable

Question:
When running an Eikon/Uikon application, it displays 'Not Found' and will not run. How can I go about debugging this?

Answer:
"Not found" is the most common error message one gets when launching an application. It is also one of the least helpful because it can mean so many things.
It is caused by an untrapped call to User::Leave() with parameter KErrNotFound (which is -1). The most common reasons for this error are:

1) The application resource file is not in the application directory. Check that yourApp.rsc or yourApp.R01 is in \epoc32\release\wins\udeb\z\system\apps\yourApp\

2) An application .mbm file is missing. Check that all the necessary .mbm files are in \epoc32\release\wins\udeb\z\system\apps\yourApp\

3) A DLL on which the application depends has failed to load. This normally only happens if you are writing a DLL which your application uses. Check that the DLL and all its files are in place.

A good technique for finding this using MSVC is to put a breakpoint at the start of your application UIs ConstructL() function, and single step through ConstructL() until you get to the line that leaves (MSVC will go to RUN, rather than BREAK). If you never get to ConstructL(), it's probably a missing DLL problem.

One tip for hunting missing DLLs is to use DEPENDS from VC++ 6.0.:
- Set your PATH so that it contains wins\udeb:
- PATH=\epoc32\tools;\epoc32\gcc\bin;\epoc32\release\wins\udeb; . . .
- Go to \epoc32\release\wins\udeb\z\system\apps\YourApp directory
- Say DEPENDS yourapp.app
If some DLL is missing, you will see a question mark.

The technique to use if all else fails is to breakpoint "User::Leave" with condition "aReason==-1" just before starting your application. This breakpoint will probably be triggered a number of times while your application loads. The file system generates lots of KErrNotFound leaves while scanning for drives - try to ignore them. By looking at the reason for the other leaves, you will probably find the cause of the error. You must remember though that there will be a lot of leaves that happen anyway and do not cause you any problem.