I've written a relatively small midlet (25Kb when obfuscated), and installed it to a Nokia 6120c, and also a 6230i.
On the 6230i, everything just works, perfectly, no issues at all.
On the 6120c, there are some issues, which are very hard to pin down.
First, some details:
App is installed via USB cable or Bluetooth
Installed using Nokia application Installer v3.0 (PC suite 184.108.40.206)
App installed on the memory card (Sandisk 2Gb MicroSD)
App installs properly, initialises, loads and works fine. I am using "RecordStore" records, and the application "self-checks" this is working properly.
After a while, the application fails to start up. There are no errors output to the screen, nothing that I can find "logged", no discernible "problem" with J2ME, as other Java apps work fine, but my application absolutely will not load. Tried rebooting the phone, "moving the application" from one folder to another, still refuses to load.
If I then re-install the application, overwriting the original, it then loads again, and all the properties from the RecordStore are present still!
The ways I've been able to "repeat" the failure are as follows:
Loading "Skype", then trying to load my app
Turning phone off, then on, then loading my app
Waiting a day or so, with some general usage of the handset
None of these, however, are consistent. Sometimes it would be ok, others it would fail, with the same conditions. I have tried always exiting the application using the "exit" menu button, but this doesn't stop the problem occuring at some point.
I added a load of error handling into the midlet, so whenever an Exception was caught, I re-threw it as a RuntimeException, to ensure that if the app was starting then failing for some reason, I should see this (NullPointerExceptions always inform the user e.g.) - all to no avail. As far as I can tell, the phone is actually refusing to even START the J2ME application!!
I then decided, I would install the app to the Internal Memory, instead of the memory card, and so far, I've not been able to make the application "fail". I've tried turning on and off, starting other apps, exiting ungracefully from my app, all is working nicely (so far).
Has anyone experienced something along these lines? I wonder if there is a bug in Symbian, meaning loading J2ME apps from memory cards is flaky?
Any help or suggestions would be greatly appreciated.