Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor greatape's Avatar
    Join Date
    Oct 2004
    Posts
    53
    I was trying out the idea below from the tips and tricks thread, bit it doesn't seem to work on my 6630. Installed the file in c:\system\bootdata\ERRRD, shut down and restarted the phone but still no panic shown when my app crashes, just a quiet exit. Any ideas how to get this working? Or any ways of detecting what caused an on device panic? Thinking I'm going to have to write a debug app to monitor what my program is up to and why it crashes.

    If your application generates a panic it will be closed and an error note is shown by the OS: “Program closed:/n%S” where %S is your application’s name.

    To get the emulator/device display the reason and error code for the panic you should create a zero size file named ERRRD (no file name extension) under c:\system\bootdata\

    On device you can use a file explorer application to create the file, e.g. FExplorer.
    On emulator the file should created on your PC’s file system under %EPOCROOT%\epoc32\wins[cw|b]\c\system\bootdata\

    Once this file is created the error note shown by the OS would look like: “Program closed:/n%S/n%S %d” where the second %S is replaced by the panic reason (e.g. USER, KERN-EXEC,…) and %d would be replaced by the panic code.

    Note: the panic reason and code are only shown on this error note; they are NOT logged into the errrd file.

    A quick search in SDK’s help and you will find a hint on the king of programming error you should be hunting for in your code.

    When reporting an application crush, on this board or to Nokia Support, please add the panic reason and code to the problem description.

  2. #2
    Regular Contributor bitnir's Avatar
    Join Date
    Mar 2003
    Posts
    101
    Since S60 2nd Edition FP 2 (Nokia 6630->) errrd trick hasn't worked in devices. You will have to build an application that catches your panic and reports it somehow. Check RUnderTaker in SDK documentation for specific information.

    Basically you just create a Active Object that waits for RUnderTaker callbacks and report the exit codes through for instance GlobalNote. Here is an implementation of my own UnderTaker Active Object class (some constants are not defined, iReporter is the reporting channel, in this case I have clumsily used AppUi class directly, iUnderTaker is a instance of RUnderTaker class and iThreadNumber a TInt) (*this code requires some changes in S60 3rd because of changed RThread-interface):

    CCUnderTakerWaiter::CCUnderTakerWaiter(CUndertakerAppUi* aReporter)
    : CActive(EPriorityStandard),iReporter(aReporter), iThreadNumber(0)
    {
    CActiveScheduler::Add(this);
    }


    CCUnderTakerWaiter::~CCUnderTakerWaiter()
    {
    Cancel();
    iUnderTaker.Close();
    }

    CCUnderTakerWaiter* CCUnderTakerWaiter::NewLC(CUndertakerAppUi* aReporter)
    {
    CCUnderTakerWaiter* self = new (ELeave)CCUnderTakerWaiter(aReporter);
    CleanupStack::PushL(self);
    self->ConstructL();
    return self;
    }

    CCUnderTakerWaiter* CCUnderTakerWaiter::NewL(CUndertakerAppUi* aReporter)
    {
    CCUnderTakerWaiter* self=CCUnderTakerWaiter::NewLC(aReporter);
    CleanupStack::Pop(); // self;
    return self;
    }

    void CCUnderTakerWaiter::ConstructL()
    {
    iUnderTaker.Create();
    }

    void CCUnderTakerWaiter::RunL()
    {
    if(iStatus == KErrDied)
    { //report reason and reissue request
    RThread th;
    th.SetHandle(iThreadNumber);
    TFullName name = th.FullName();
    TExitType type = th.ExitType();

    if(type == EExitKill)
    {
    _LIT(KKilled, "Killed");
    iReporter->ReportL(KKilled,name);
    }
    else // panic
    {
    TExitCategoryName categ = th.ExitCategory();
    TBuf<KMaxExitCategoryName+0x10> buf;
    _LIT(KPanicFormat, "%S %d");
    buf.Format(KPanicFormat, &categ, th.ExitReason());
    iReporter->ReportL(buf,name);
    }
    th.Close();
    iUnderTaker.Logon(iStatus,iThreadNumber);
    SetActive();
    }
    else
    { //reissue request
    iUnderTaker.Logon(iStatus,iThreadNumber);
    SetActive();
    }
    }

    void CCUnderTakerWaiter:oCancel()
    {
    iUnderTaker.LogonCancel();
    }


    TInt CCUnderTakerWaiter::RunError(TInt aError)
    {
    return KErrNone;
    }


    void CCUnderTakerWaiter::StartLoggingL()
    {
    iReporter->ReportL(KMyName,KStarted);
    iUnderTaker.Logon(iStatus,iThreadNumber);
    SetActive();
    }

    void CCUnderTakerWaiter::StopLogging()
    {
    Cancel();
    iReporter->ReportL(KMyName,KStopped);
    }

    TBool CCUnderTakerWaiter::Logging()
    {
    return IsActive();
    }

  3. #3
    Regular Contributor greatape's Avatar
    Join Date
    Oct 2004
    Posts
    53
    Thanks for the code, the help is much appreciated.

    Shame Nokia seem to be making life so difficult sometimes, it seems mad that we need to write our own apps just to find out what panic codes are occuring on devices, not as though it's hard enough already to track down hardware only bugs.

  4. #4
    Super Contributor Paul.Todd's Avatar
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644
    I suggest you download TaskSpy from http://www.taskspy.com which will allow you to catch panics. This supports the latest S60 V2 devices.

  5. #5
    Registered User Fredrik Eldh's Avatar
    Join Date
    Sep 2005
    Posts
    20
    TaskSpy doesn't catch panics on my 6630. I don't get any message box at all; panicking programs just disappear.

  6. #6
    Registered User david.caabeiro's Avatar
    Join Date
    Apr 2005
    Location
    Barcelona
    Posts
    1,678
    Did you enable the feature on the setting dialog? (It's off by default)

  7. #7
    Nokia Developer Champion kiran10182's Avatar
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,236
    Quote Originally Posted by Fredrik Eldh View Post
    TaskSpy doesn't catch panics on my 6630. I don't get any message box at all; panicking programs just disappear.
    You could try: How can I get extended information in error messages?

    Kiran.

  8. #8
    Registered User alb3530's Avatar
    Join Date
    Feb 2006
    Location
    Brazil
    Posts
    523
    Quote Originally Posted by kiran10182 View Post
    Just to add, with the ErrRD file, S60 2nd Edition FP2 (6630) and FP3 show extended information for generic errors only.

    KERN-EXEC and USER panics, for example, aren't displayed in those phones.


    best regards
    Http_user_agent:
    NokiaN80-1/3.0 (4.0707.0.7)
    Series60/3.0
    Profile/MIDP-2.0
    Configuration/CLDC-1.1

Similar Threads

  1. unmodal dialog...
    By GeKI in forum Symbian User Interface
    Replies: 0
    Last Post: 2005-10-24, 12:02
  2. Rich Text Editor and Dialog
    By sakhya in forum Symbian
    Replies: 0
    Last Post: 2005-04-28, 17:09
  3. Confirmation Dialog Panic
    By dingdan in forum Symbian User Interface
    Replies: 0
    Last Post: 2005-02-24, 23:00
  4. dialog with image causes CONE 8 panic on exit
    By kpoxa in forum Symbian C++
    Replies: 2
    Last Post: 2004-10-12, 12:07
  5. Replies: 0
    Last Post: 2004-09-24, 22:01

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved