×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Nov 2004
    Posts
    7
    ERRRD works perfectly on the emulator but on Nokia 6670 ( i.e 7.0s ) and on 6680 ( 8.0a) the panic is not displayed.

    what is the way one can see the panic code on these devices?

    Again,

    using gdb debugger ( bluetooth) on the above devices
    I get byte reception error (epoc err -36) ( disconnected) when gdb tries to establish the connection.

    Clearly that means the connection in the device and M/c could not be established, what is the way out ( I am using com port 3 which is less than 4 as recommended). [[ I am able to establish a connection otherwise to send sis files but gdb fails to establish a connection ]]

    Pls help.

    Regards
    Ish

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,143
    With phones, that are not showing the error reason, you should build a separate application that logs into the application process or thread, so it will get informaed when the application exits, with or withour error.

    yucca

  3. #3
    Registered User
    Join Date
    Nov 2004
    Posts
    7
    Hi Yucca,

    Thanks a lot.

    What I understood is I need to write a watchdog kind of application which spawns an application under observation and catches its exit status.

    Will appreciate if get some good ptrs to write the watchdog ! kind of quick guide/steps to take care while writing this.

    Regards
    Ish

  4. #4
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,143
    ok, I basically tried to do a app that would log on to multiple threads/processes and then have a listbox showing their status, but for some reason all of them will exit when the first that I'm monitoring does so. Anyway, since it did the main stuff I never got around on checking what was going wrong with it. All and all, here's the active monitor code for it. Just implement the callback in your container and let it draw the results on the screen.

    the constsruction for the class goes like this:
    RProcess ph;
    ph.Open(find);

    iMonitor = CExitMonitor::NewL(this,ph.Handle());
    ph.Close();

    /-- Header stuff --//
    class MExitMonitorCallBack
    {
    public:
    virtual void HandleExit(const TDesC& aName,const TExitType& aExitType,const TInt& aExitReason,const TDesC& aExitCategory) = 0;
    };

    class CExitMonitor : public CActive
    {
    public:
    static CExitMonitor* NewL(MExitMonitorCallBack* aCallBack,TInt aHandle);
    static CExitMonitor* NewLC(MExitMonitorCallBack* aCallBack,TInt aHandle);
    ~CExitMonitor();
    void StartTheReadL(void);
    protected:
    void DoCancel();
    void RunL();
    private:
    CExitMonitor(MExitMonitorCallBack* aCallBack);
    void ConstructL(TInt aHandle);
    private:
    MExitMonitorCallBack* iCallBack;
    RUndertaker iUndertaker;
    TInt iHandle;
    };

    /-- source stuff --/
    CExitMonitor* CExitMonitor::NewL(MExitMonitorCallBack* aCallBack,TInt aHandle)
    {
    CExitMonitor* self = NewLC(aCallBack,aHandle);
    CleanupStack::Pop(self);
    return self;
    }

    /*
    -------------------------------------------------------------------------------
    -------------------------------------------------------------------------------
    */
    CExitMonitor* CExitMonitor::NewLC(MExitMonitorCallBack* aCallBack,TInt aHandle)
    {
    CExitMonitor* self = new (ELeave) CExitMonitor(aCallBack);
    CleanupStack::PushL(self);
    self->ConstructL(aHandle);
    return self;
    }


    /*
    -------------------------------------------------------------------------------
    -------------------------------------------------------------------------------
    */
    CExitMonitor::CExitMonitor(MExitMonitorCallBack* aCallBack)
    :CActive(0),iCallBack(aCallBack)
    {
    }
    /*
    -------------------------------------------------------------------------------
    -------------------------------------------------------------------------------
    */
    CExitMonitor::~CExitMonitor()
    {
    Cancel();
    iUndertaker.Close();
    }

    /*
    -------------------------------------------------------------------------------
    -------------------------------------------------------------------------------
    */
    void CExitMonitor::ConstructL(TInt aHandle)
    {
    CActiveScheduler::Add(this);

    iHandle = aHandle;
    iUndertaker.Create();
    iUndertaker.Logon(iStatus,iHandle);
    SetActive();
    }
    /*
    -------------------------------------------------------------------------------
    -------------------------------------------------------------------------------
    */
    void CExitMonitor:oCancel()
    {
    iUndertaker.LogonCancel();
    }
    /*
    -------------------------------------------------------------------------------
    -------------------------------------------------------------------------------
    */
    void CExitMonitor::RunL()
    {
    if(iStatus.Int() == KErrDied)
    {
    RThread r;
    r.SetHandle(iHandle);

    iCallBack->HandleExit(r.Name(),r.ExitType(),r.ExitReason(),r.ExitCategory());

    r.Close();
    }
    }

    /- the end --/

    yucca

  5. #5
    Registered User
    Join Date
    Nov 2004
    Posts
    7
    Thanks Yucca,

    I used following steps to do the same task :

    1) Found my process using TFindProcess
    2) Opened the process and passed the ownership of using Process.Open( )
    3) ExitReason and ExitCategory call when the process crashed.

    it works perfectly fine ;-)

    Thanks a lot for your response.

    Regards
    Ish

Posting Permissions

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