Big problems in small devices... J2ME

Discussion in 'Java' started by Michael Sars Norum, Nov 10, 2004.

  1. Hi

    I'm currently working on a MSc-project where we are creating a framework to
    build mobile collaborative applications using ad hoc networks on. In this
    work we have encountered a problem which, to put it mildly, puzzles us. I'd
    really like to have a discussion here as to what this problem stems from. We
    have been trying to debug this problem for almost a week without luck. Our
    concern here is that the problems we are facing are fundamental an
    unsolvable...

    The problem is this:
    Our demo apps seem to work fine when using our framework for connecting,
    creating networked groups and exchanging messages between them as long as
    everything happens automatically. We do this in our MIDlet:

    //snippet
    protedted void startApp(){
    //initing framework...
    startSearch();
    }

    public void startSearch(){
    //print message to screen
    framework.startGroupSearch(.....);
    }
    //end-snippet

    This works fine both on Nokia 6600 and our emulators. The problem arises when
    we introduce user input to the system. If the startSerach() call from
    startApp() is removed and instead we introduce a commandListener into the
    application that runs the startSearch method, the
    framework.startGroupSearch() call never returns. It still works like a charm
    on our emulators, but not on the actual phone.

    We've been working on theories as to why this problem arises on the phone and
    not on the emulator, and our best guess at the moment is that our method call
    stack is beyond the limits of the phone's capacity. Our framwork is quite
    complex and quite a lot of functionality is hidden from the application.

    Another theory is that the Thread handling in J2ME is causing the problems.
    But we can't quite see how this can cause such an error.

    If anyone has any input at all to this problem we would greatly appreciate
    it.

    Best regards
    Michael Sars Norum

    By the way, the plan is to release this framework to make it freely available
    to the public...
    Michael Sars Norum, Nov 10, 2004
    #1
    1. Advertising

  2. On Wed, 10 Nov 2004 09:11:49 +0100, Michael Sars Norum wrote:

    > This works fine both on Nokia 6600 and our emulators. The problem arises when
    > we introduce user input to the system. If the startSerach() call from
    > startApp() is removed and instead we introduce a commandListener into the
    > application that runs the startSearch method, the
    > framework.startGroupSearch() call never returns. It still works like a charm
    > on our emulators, but not on the actual phone.


    I'm not sure if it was J2ME or somewhere else, but I think I read
    something about these things to happen within an own thread, because
    it shouldn't happen within in the thread doing the event-handling.

    Again, the last weeks I was reading a lot about different
    techniques, so it might be a solution for a different problem ;-)


    Regards, Lothar
    --
    Lothar Kimmeringer E-Mail:
    PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)

    Always remember: The answer is forty-two, there can only be wrong
    questions!
    Lothar Kimmeringer, Nov 10, 2004
    #2
    1. Advertising

  3. Michael Sars Norum wrote:

    > This works fine both on Nokia 6600 and our emulators. The problem arises when
    > we introduce user input to the system. If the startSerach() call from
    > startApp() is removed and instead we introduce a commandListener into the
    > application that runs the startSearch method, the
    > framework.startGroupSearch() call never returns. It still works like a charm
    > on our emulators, but not on the actual phone.


    Are you wrapping the call to startSearch() in its own thread? IOW:

    public void commandAction(Command cmd,Displayable dsp)
    {
    new Thread(new Runnable()
    {
    public void run()
    {
    startSearch();
    }
    }).start();
    }

    If you're not doing then, then please do so and try again.

    --
    Darryl L. Pierce <>
    Visit my webpage: <http://mcpierce.multiply.com>
    Darryl L. Pierce, Nov 16, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shaguf
    Replies:
    0
    Views:
    329
    Shaguf
    Dec 24, 2008
  2. Shaguf
    Replies:
    0
    Views:
    432
    Shaguf
    Dec 26, 2008
  3. Naveen Vaila

    "Windows CE Devices and Palm Devices Help Needed"

    Naveen Vaila, May 24, 2004, in forum: ASP .Net Mobile
    Replies:
    1
    Views:
    493
    Abraham Durairaj
    Jun 23, 2004
  4. Shaguf
    Replies:
    0
    Views:
    220
    Shaguf
    Dec 26, 2008
  5. Shaguf
    Replies:
    0
    Views:
    204
    Shaguf
    Dec 24, 2008
Loading...

Share This Page