×

Discussion Board

Results 1 to 15 of 24

Hybrid View

  1. #1
    Registered User
    Join Date
    Jul 2010
    Location
    Bangalore
    Posts
    20

    Panic KERN-EXEC 3 Error

    Hi all,
    I am in the midst of developing my first symbian application which solely based on the forum nokia thread about retriving the incoming/outgoing calls .
    http://wiki.forum.nokia.com/index.php/TSS000685_-_Retrieving_incoming_and_outgoing_call_numbers
    It is jus a simple d60 GUI application which handling an active object CallLogNotifier.
    I got kernel panic error when i run it on the emulator .then i trued debugging i got one more error dialog
    application closed:!WidgetRegistry ALLOC:36c62aa40 before the kernel get panic.

    i can find that the error is based on the code statement
    iTelephony->NotifyChange( iStatus, CTelephony::EVoiceLineStatusChange, lineStatusPckg );


    my source code for both the active object and a simple application view are given..
    please give me a solution.


    Code:
    //ActiveObject Header file
    
    #ifndef CALLLOGNOTIFIER_H_
    #define CALLLOGNOTIFIER_H_
    #include <Etel3rdParty.h>
    class MCallLogObserver
    {
    public:	
    	virtual void NotifyChange(const TBool aCallType,const TDesC& aRemoteCaller) = 0;
    	
    };
    
    class CCallLogNotifier : public CActive
    	{
    	public:
    		static CCallLogNotifier* NewL(MCallLogObserver* aObserver);
    		static CCallLogNotifier* NewLC(MCallLogObserver* aObserver);
    		void ConstructL(void);
    		~CCallLogNotifier();
    	protected:	
    		void DoCancel();
    		void RunL();
    		
    	private:
    		CCallLogNotifier(MCallLogObserver* aObserver);
    		void GetCallLog();
    		
    	private:
    		MCallLogObserver* 			  iObserver;
    		CTelephony*                   iTelephony;
    		CTelephony::TCallStatusV1     iLineStatus;
    		CTelephony::TCallStatus       iLastInformedLineStatus;
    
    	};
    #endif /* CALLLOGNOTIFIER_H_ */
    
    //ActiveObject Source file
    
    #include "CallLogNotifier.h"
    
    CCallLogNotifier* CCallLogNotifier::NewL(MCallLogObserver* aObserver)
    {
    
    	CCallLogNotifier*  self = NewLC(aObserver);
    	CleanupStack::Pop(self);
    	return self;
    }
    
    CCallLogNotifier* CCallLogNotifier::NewLC(MCallLogObserver* aObserver)
    {
    	CCallLogNotifier* self = new (ELeave) CCallLogNotifier(aObserver);
    	CleanupStack::PushL(self);
    	self->ConstructL();
    	return self;
    }
    
    void CCallLogNotifier::ConstructL(void)
    {
    	CActiveScheduler::Add(this);
    	iLineStatus.iStatus = CTelephony::EStatusUnknown;
    	iLastInformedLineStatus = CTelephony::EStatusUnknown;
    	CTelephony::TCallStatusV1Pckg lineStatusPckg( iLineStatus );
    	iTelephony->NotifyChange( iStatus, CTelephony::EVoiceLineStatusChange, lineStatusPckg );
    	SetActive();
    }
    
    void CCallLogNotifier::DoCancel(void)
    {
    	iTelephony->CancelAsync(CTelephony::EVoiceLineStatusChangeCancel);
    }
    
    void CCallLogNotifier::RunL(void)
    {
    	if( iLineStatus.iStatus == CTelephony::EStatusDialling )
    	{
    		GetCallLog();
    	}
    	if(iLineStatus.iStatus == CTelephony::EStatusRinging)
    	{
    		if(iLastInformedLineStatus != CTelephony::EStatusDialling)
    	    {
    			GetCallLog();
    	    }
        }   
    	    iLastInformedLineStatus = iLineStatus.iStatus;
    }
    
    void CCallLogNotifier::GetCallLog()
    {
    	CTelephony::TCallInfoV1 callInfoV1;
    	    CTelephony::TCallInfoV1Pckg callInfoV1Pckg( callInfoV1 );
    	    CTelephony::TCallSelectionV1 callSelectionV1;
    	    CTelephony::TCallSelectionV1Pckg callSelectionV1Pckg( callSelectionV1 );
    	    CTelephony::TRemotePartyInfoV1 remotePartyInfoV1;
    	    CTelephony::TRemotePartyInfoV1Pckg remotePartyInfoV1Pckg( remotePartyInfoV1 );
    	    callSelectionV1.iLine = CTelephony::EVoiceLine;
    	    callSelectionV1.iSelect = CTelephony::EInProgressCall;
    	    iTelephony->GetCallInfo( callSelectionV1Pckg, callInfoV1Pckg, remotePartyInfoV1Pckg );
    	    if( remotePartyInfoV1.iRemoteIdStatus == CTelephony::ERemoteIdentityAvailable )
    	        {
    	        if( remotePartyInfoV1.iRemoteNumber.iTelNumber.Length() > 0 )
    	            {
    	        
    					iObserver->NotifyChange(1,remotePartyInfoV1.iRemoteNumber.iTelNumber);
    	        // Incoming call number can be read from
    	            // remotePartyInfoV1.iRemoteNumber.iTelNumber;
    	            }
    	        }
    	    if( callInfoV1.iDialledParty.iTelNumber.Length() > 0 )
    	        {
    	    iObserver->NotifyChange(1,callInfoV1.iDialledParty.iTelNumber);
    	        // Outgoing call number can be read from
    	        // callInfoV1.iDialledParty.iTelNumber;
    	        }
    }
    
    CCallLogNotifier::CCallLogNotifier(MCallLogObserver* aObserver)
    :CActive(0),iObserver(aObserver)
    {
    }
    CCallLogNotifier::~CCallLogNotifier()
    {
    	Cancel();
    	delete iTelephony;
    }
    
    //Application View Class header
    #ifndef __CALLLOGONLINEAPPVIEW_h__
    #define __CALLLOGONLINEAPPVIEW_h__
    
    // INCLUDES
    #include <coecntrl.h>
    #include "CallLogNotifier.h"
    // CLASS DECLARATION
    class CCallLogOnlineAppView : public CCoeControl,public MCallLogObserver
    	{
    public:
    	
    	static CCallLogOnlineAppView* NewL(const TRect& aRect);
    
    	
    	static CCallLogOnlineAppView* NewLC(const TRect& aRect);
    
    	
    	virtual ~CCallLogOnlineAppView();
    
    public:
    	
    	void Draw(const TRect& aRect) const;
    
    	
    	virtual void SizeChanged();
    
    virtual void HandlePointerEventL(const TPointerEvent& aPointerEvent);
    	virtual void NotifyChange(const TBool aCallType,const TDesC& aRemoteCaller);
    
    private:
    	
    	void ConstructL(const TRect& aRect);
    
    	CCallLogOnlineAppView();
    	TBool  iCallType;
    	HBufC* iRemoteCaller;
    	CCallLogNotifier* iCallLogNotifier; 
    	};
    
    #endif // __CALLLOGONLINEAPPVIEW_h__
    // End of File
    //Application View Source header
    #include <coemain.h>
    #include "CallLogOnlineAppView.h"
    CCallLogOnlineAppView* CCallLogOnlineAppView::NewL(const TRect& aRect)
    	{
    	CCallLogOnlineAppView* self = CCallLogOnlineAppView::NewLC(aRect);
    	CleanupStack::Pop(self);
    	return self;
    	}
    CCallLogOnlineAppView* CCallLogOnlineAppView::NewLC(const TRect& aRect)
    	{
    	CCallLogOnlineAppView* self = new (ELeave) CCallLogOnlineAppView;
    	CleanupStack::PushL(self);
    	self->ConstructL(aRect);
    	return self;
    	}
    void CCallLogOnlineAppView::ConstructL(const TRect& aRect)
    	{
    	CreateWindowL();
    	SetRect(aRect);
    	iCallLogNotifier=CCallLogNotifier::NewL(this);	
    	ActivateL();
    	}
    CCallLogOnlineAppView::CCallLogOnlineAppView()
    	{
    	}
    
    CCallLogOnlineAppView::~CCallLogOnlineAppView()
    {
    default implementaion
    }
    
    
    void CCallLogOnlineAppView::Draw(const TRect& /*aRect*/) const
    	{
    	default implementation.
    	}
    
    
    void CCallLogOnlineAppView::SizeChanged()
    	{
    	DrawNow();
    	}
    
    void CCallLogOnlineAppView::HandlePointerEventL(
    		const TPointerEvent& aPointerEvent)
    	{
    
    	
    	}
    
    void CCallLogOnlineAppView::NotifyChange(const TBool aCallType,const TDesC& aRemoteCaller)
    {
    	iCallType=aCallType;
    	iRemoteCaller = HBufC::NewL(aRemoteCaller.Length()+ 19);
    	if(iCallType)
    		iRemoteCaller->Des().Copy(_L("Incoming Call From:"));
    	else
    		iRemoteCaller->Des().Copy(_L("Outgoing Call To  :"));
    	
    	iRemoteCaller->Des().Append(aRemoteCaller);
    	//DrawNow();
    }
    // End of File

  2. #2
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    3,956

    Re: Panic KERN-EXEC 3 Error

    You have not allocated the memory for iTelephony object, you have simply declared it in header.

    Write the following in ConstructL(): iTelephony = CTelephony::NewL();

  3. #3
    Registered User
    Join Date
    Jul 2010
    Location
    Bangalore
    Posts
    20

    Re: Panic KERN-EXEC 3 Error

    hi vineet.jain,
    Thanks for the solution... Now its working...
    You know What happen to my application when a call gets active..? It might terminate????

  4. #4
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,142

    Re: Panic KERN-EXEC 3 Error

    Quote Originally Posted by vshnuforu@yahoo.co.in View Post
    hi vineet.jain,
    Thanks for the solution... Now its working...
    You know What happen to my application when a call gets active..? It might terminate????
    What do you mean by that ? Basically it depends on your logic and what you do there. Anf if your application suddenly terminates, then do check what panic code you get, and see whwther you can find the code part that causes the panic.

  5. #5
    Registered User
    Join Date
    Jul 2010
    Location
    Bangalore
    Posts
    20

    Re: Panic KERN-EXEC 3 Error

    hi sir,
    I meant what happened to my application when an incoming call in progress.. will it closed or will it notify???
    please help

  6. #6
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,142

    Re: Panic KERN-EXEC 3 Error

    You should really test that by yourself, and see how it behaves. It appears to be monitoring call and then notifying the state changes, though you should re-start the monitoring in RunL, so it would also get more than one event..

Similar Threads

  1. KERN EXEC 3 PANIC
    By s.baalajee in forum Symbian C++
    Replies: 5
    Last Post: 2010-04-12, 14:47
  2. Panic KERN-EXEC 3
    By rohitnegi in forum Symbian User Interface
    Replies: 2
    Last Post: 2010-02-26, 08:57
  3. panic kern exec 3 error need help
    By urban37 in forum Symbian User Interface
    Replies: 13
    Last Post: 2008-12-17, 08:24
  4. Replies: 5
    Last Post: 2008-12-12, 09:42
  5. kern-exec 3 panic?
    By samweb in forum Symbian C++
    Replies: 1
    Last Post: 2005-01-20, 09:04

Posting Permissions

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