×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Nov 2003
    Posts
    4

    N97 crashes with KERN-EXEC 3, Threads ?

    Our application runs well on many phones, including other Nokias.

    One of our users reports, that the N97 crashes while selecting an
    element of a ChoiceGroup.

    Unfortunately, I don't have the real phone here for testing.
    The emulator doesn't crash at the same point, but it does while
    turning the emulator's orientation to landscape.

    Here's part of my code, could it cause the problem ?

    I'm using the itemStateChanged() Callback to call the
    registered CommandListener of the Form:

    public void itemStateChanged(javax.microedition.lcdui.Item item) {
    // Check the ChoiceGroup and set a variable
    // which will be used by the CommandListener
    ...
    final QueryForm qf = this;
    new Thread() {

    public void run() {
    try {
    // wait, so that the selection is drawn before the displayable will be switched
    Thread.sleep(100);
    } catch (InterruptedException ex) {
    ex.printStackTrace();
    }

    CommandListener cl = getCommandListener();
    if(cl != null){
    cl.commandAction(selectCommand, qf); // in commandAction(), the Form will be replaced
    }
    }
    }.start();

    ---
    The also checked the number of threads, being active with Thread.activeCount():

    Series 40: 1 Thread
    N97 : 9-11 Threads
    WTK : 1-4 Threads

    I guess, the system uses the other threads for some tasks.
    Then again, I read a post about the N97 crashing an application
    that spawned too many threads ?!

    Any help will be appreciated!

    Regards, Roland

  2. #2
    Nokia Developer Expert
    Join Date
    Aug 2007
    Posts
    1,595

    Re: N97 crashes with KERN-EXEC 3, Threads ?

    Hello Roland,

    Unfortunately, I don't have the real phone here for testing.
    You could try testing with Forum Nokia's Remote Device Access service which includes S60 and latest Symbian devices online for free:

    http://www.forum.nokia.com/Technolog...Device_Access/

    Regards,
    r2j7
    Last edited by r2j7; 2010-04-23 at 12:47.
    [URL="http://library.forum.nokia.com/java"][B] >>> Java Developer's Library <<<[/B][/URL]
    [URL="https://www.developer.nokia.com/Resources/Support/Technical_support.xhtml"] [B]>>> Technical Support for Java ME development <<<[/B][/URL]
    [URL="https://publish.ovi.com/info/"][B]>>> Nokia Publish: reach millions of Nokia users worldwide through Nokia Store <<<[/B][/URL]

  3. #3
    Registered User
    Join Date
    Nov 2003
    Posts
    4

    Re: N97 crashes with KERN-EXEC 3, Threads ?

    Thanks for the suggestion!

    Haven't used this feature before, but I'll give it a try.

    Regards, Roland

  4. #4
    Registered User
    Join Date
    Nov 2003
    Posts
    4

    Re: N97 crashes with KERN-EXEC 3, Threads ?

    Ok, tried to run the midlet using RDA.

    After a while, I get a panic:
    23.04.2010 03.02:59 MyApp - USER - 42

    What exactly does that mean?
    I'm not that familiar with Symbian Error Codes, checked the
    document at http://wiki.forum.nokia.com/index.ph...OS_Error_Codes

    KErrBadPower -42 Batteries too low

    Excuse me? Probably not the right code.
    Where can I find the explanation for that Error?
    ---

    Put the method call in question into a try/catch-Block and wanted
    to see what happens.

    try {
    cl.commandAction(selectCommand, qf);
    } catch (Exception e) {
    e.printStackTrace();
    }

    But how do I get the System.out from the remote device?
    Or can I only get "panics"?

    Thanks, Roland
    Last edited by roplacebo; 2010-04-23 at 15:01.

  5. #5
    Nokia Developer Expert
    Join Date
    Aug 2007
    Posts
    1,595

    Re: N97 crashes with KERN-EXEC 3, Threads ?

    Hello roplacebo,

    you could print on the screen of your application, f.ex. if you are using a Form, then:

    Form f;
    ..
    f=new Form("Error view");
    ..

    try {
    cl.commandAction(selectCommand, qf);
    } catch (Exception e) {
    e.printStackTrace();
    f.append("Error: "+e.toString());

    }


    UPDATE: Ignore the above, not much help if the app's been crashed.

    Regards,
    r2j7
    Last edited by r2j7; 2010-04-23 at 23:28.
    [URL="http://library.forum.nokia.com/java"][B] >>> Java Developer's Library <<<[/B][/URL]
    [URL="https://www.developer.nokia.com/Resources/Support/Technical_support.xhtml"] [B]>>> Technical Support for Java ME development <<<[/B][/URL]
    [URL="https://publish.ovi.com/info/"][B]>>> Nokia Publish: reach millions of Nokia users worldwide through Nokia Store <<<[/B][/URL]

  6. #6
    Registered User
    Join Date
    Mar 2007
    Posts
    1

    Smile Re: N97 crashes with KERN-EXEC 3, Threads ?

    Hello roplacebo,

    You can find the information about the Panic in the following link.

    http://library.forum.nokia.com/index...ics/index.html


    Moreover the reference you were looking into is for the Error Code and Not the Panic code.

    Actually the Panic USER 42 you are looking for means

    "This panic is raised by a number of RHeap member functions, AllocLen(), Free(), FreeZ(), ReAlloc(), ReAllocL(), Adjust() and AdjustL() when a pointer passed to these functions does not point to a valid cell"

    Hope this helps a bit.

    Thanks,
    Rafik

  7. #7
    Registered User
    Join Date
    Nov 2003
    Posts
    4

    Re: N97 crashes with KERN-EXEC 3, Threads ?

    >"This panic is raised by a number of RHeap member functions, AllocLen(), Free(), FreeZ(), ReAlloc(), ReAllocL(), Adjust() and AdjustL() when a pointer passed to these functions does not point to a valid cell"

    I guess, these are functions, that the Java Garbage collector uses.

    I've tried lots of things: Catch all possible Throwables in my itemStateChanged() method,
    also in all involved threads, check free memory after displayable is switched etc. etc.

    I wrote a test app, to see if creating Forms from a bg thread and displaying them could be the problem, but it wasn't.

    ---
    Just to reflect, what I have:
    Using RDA, I get alternate System panics:

    1. KERN-EXEC 3

    "This panic is raised when an unhandled exception occurs. Exceptions have many causes, but the most common are access violations caused, for example, by dereferencing NULL. Among other possible causes are: general protection faults, executing an invalid instruction, alignment checks, etc. "

    2. USER 42

    "This panic is raised by a number of RHeap member functions, AllocLen(), Free(), FreeZ(), ReAlloc(), ReAllocL(), Adjust() and AdjustL() when a pointer passed to these functions does not point to a valid cell."

    3. WSERV 3

    "Invalid handle.

    The server couldn’t find the target object for a request in the handle index. This can be raised when a command is sent to the handle for a window that has been closed, for example. "

    Thanks for your help,

    Roland

Similar Threads

  1. KERN EXEC 0 in File Writing
    By somnathbanik in forum Symbian
    Replies: 3
    Last Post: 2010-03-25, 09:25
  2. kern exec 3 panic
    By ganeshs87 in forum Symbian
    Replies: 7
    Last Post: 2010-03-11, 07:43
  3. getting panic KERN - EXEC 3
    By rohitnegi in forum Symbian User Interface
    Replies: 2
    Last Post: 2010-02-22, 11:01
  4. Replies: 3
    Last Post: 2010-01-30, 11:56
  5. KERN EXEC 3 on device not on Epoc
    By Kavit Patel in forum Symbian
    Replies: 4
    Last Post: 2008-11-21, 15:02

Posting Permissions

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