×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    May 2008
    Posts
    4

    Midlet crashes on startup

    Whenever I try to start up a stopwatch midlet I wrote for my Nokia E70, the application never starts. There's no error message or anything.

    I've used midlets I've built before on this phone. There is a difference though - I've never used the Canvas object. It seems that if I remove the Canvas part of my code, the app works fine.

    I've tested this on other phones (I have no other Nokia phones to try). Works fine on those. I tried it on the S60 SDK emulators and it works fine there.

    Is there some way I could scrounge some errors associated with the apps startup?

    If you desire to see the code, it's posted at:
    http://pastebin.ca/1020529

  2. #2
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,406

    Re: Midlet crashes on startup

    I've just tested your code on a Nokia E70 and it works well, so it seems not to be a code-related issue..

    Pit

  3. #3
    Regular Contributor
    Join Date
    Mar 2005
    Location
    Hamburg, Germany
    Posts
    284

    Re: Midlet crashes on startup

    Hello,

    one problem I found some time ago:
    The Symbian java version has a private method Canvas.update(). Now overriding this method is not allowed. On my phone there was a exception thrown at startup, but only if I had not obfusacted. Somewhere theres a thread about this, and it is already in the list of known problems.

    Resultion: rename update()

    Other problems I see:
    The run method has sleep(1). This sleeps only for one millisecond. You are wasting battery power by this.

    Initalisation in midlet:
    I do creation of canvas and the start of the thread in startApp. In the constructor, it may be that the midlet runtime is not fully initalised.
    This may be different on differend vendors. I'm not sure it it is really necessary, but if you have startup problems, it is better to be sure.
    Maybe, this is why you didn't see the exception.

    Midlet.pauseapp() should pause the thread. If the user switches to another application, your application should not update its invisible screen 1000 times a second....


    Regards
    Karsten meier

  4. #4
    Regular Contributor
    Join Date
    Mar 2005
    Location
    Hamburg, Germany
    Posts
    284

    Re: Midlet crashes on startup

    the knowledge base article is KIJ000558

    http://wiki.forum.nokia.com/index.ph...alled_update()

    Regards
    Karsten Meier

  5. #5
    Registered User
    Join Date
    May 2008
    Posts
    4

    Re: Midlet crashes on startup

    Hey, thanks, this has been a lot of help.

    I made the few changes mentioned here, but still no luck. I renamed my update() method, moved the initialization of the Canvas, and made the screen update less often.

    I'm working on properly obfuscating the packages, but that's not fully working yet.

    When I try to install the JAR file now I just get an invalid jar file error. Any ideas on if this is related?

    Thanks -- Paul.

    EDIT: I thought to try to install one of the old JARs that would install successfully. It resulted in the same error. I've been primed to think this before, but I think there might be some software problems in my phone.
    Last edited by OEP; 2008-05-17 at 18:24.

Similar Threads

  1. "Nokia Application Installer" crashes at startup
    By tlwc in forum Mobile Java General
    Replies: 1
    Last Post: 2007-12-18, 00:46
  2. Pushregistry, Security Alert after signing the midlet?
    By juppi in forum Mobile Java Networking & Messaging & Security
    Replies: 15
    Last Post: 2007-08-08, 11:04
  3. Send SMS from midlet without user notification
    By Robert111 in forum Mobile Java Networking & Messaging & Security
    Replies: 4
    Last Post: 2007-06-27, 14:26
  4. 6682 Gallery app crashes on startup
    By mmoorr in forum General Development Questions
    Replies: 1
    Last Post: 2006-09-13, 16:24
  5. Midlet freezes on Nokia 3230
    By jawwadhussain in forum Mobile Java General
    Replies: 1
    Last Post: 2006-07-05, 07:59

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×