First of all, I’m doing my development using gcc under linux, with sdk2unix-1.9, gcc-2.9 [gcc539src.zip], and Nokia Series 60 SDK 2nd edition Feture Pack 3 [nS60_jme_sdk_2nd_e_fp3.zip] (see previous post).
I have a perfectly good application that I have written which worked with sdk2unix-1.2 and then I upgraded to sdk2unix-1.9. The helloworld app that comes with sdk2unix-1.9 (really I think it gets ported by the sdk2unix folks from the Symbian SDK example) worked fine, and I observed some improvements in the structure of the makefiles. Thus, I modified the makefile for my application. I was able to convince it to build my application (I had some troubles with some Bluetooth Security classes no longer existing, which I have not worked out yet. I think they are a result of the change in Symbian SDK versions and not relevant to doing development under Linux), but when I tried to run my application it simply would not start. I have had a “would not start” problem like this before, so I will now describe it.
Basically, you develop your app, it compiles, you send it to the phone, it installs, the icon appears in the phone’s menu, and everything looks peachy. However, when you click that icon to start your application, the screen does a little “flicker” but nothing else happens. No error messages, nothing. Extendederr.sis (google for it) doesn’t help. I have heard there is a tool called Panix, but I haven’t tried it yet. Anyways, this is extremely frustrating, because the cause of the error cannot be located. This means any kind of significant code changes are out of the question without periodic testing.
Today, I discovered at least one thing that can cause this, and it is the values which are assigned to several variables in the makefile. These are U1, U2, and U3.
TUint32 iUid1, TUint32 iUid2, TUint32 iUid3, represent the identifiers that uniquely identify your program.
The first UID can be thought of as a system level identifier, for example 0x10000079 for DLLs and 0x1000007A for executables.
The second UID distinguishes between objects having the same iUid1, for example 0x100039CE for polymorphic interface DLLs and 0x1000008d for static interface (shared library).
The third UID can be thought of as a program identifier. Usually you have to ask the third identifier directly to Symbian by sending an email to them. However, there are also some UID for testing, which can be chosen from the range 0x0100000 to 0x0FFFFFF.
I found that my application worked in sdk2unix-1.2 with values:
U1 = 1000007a
U2 = 100039ce
U3 = 10005b81
The helloworld application that comes with sdk2unix-1.9 includes only one value:
U3 = 10008ace
That helloworld application works fine, but when I edit that makefile to compile my application (which uses Bluetooth and the Camera, among other things), it exhibits the “fail silently” problem.
When I pasted my U1,U2,U3 values into the new makefile, magically everything became happy. Upon further experimentation, it turns out I didn’t even need to use U1 and U2, but just U3 = 10005b81. I also found an example application with U3 = 10005b79 and tried that; it failed. Thus, these numbers are very magical indeed, and I have yet to find a resource which clearly defines their values and what they mean. In the meantime, whenever an application fails silently, suspect them!