×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    6

    Kern exec 3 in BaseConstuctL of UI

    Hi,

    I am writing a UI application (EXE file) with multiple views. I get a kern-exec 3 panic from BaseConstructL in UI::ConstructL function. Any help in this regard is deeply appreciated. I am posting the code for contructL, the resource and icon files

    I have already spent a day trying to figure this out. Where am I going wrong?

    Any help in resolving this is deeply appreciate.

    Regards,
    --Ashish

    void CMyAppUi::ConstructL()
    {
    // !!!! CRASHES AT THIS LINE !!!!
    BaseConstructL(0x08 | EAknEnableSkin); // Use ELayoutAwareAppFlag (0x08) to make the application support scalable UI on FP3 devices.

    // Show tabs for main views from resources
    CEikStatusPane* sp = StatusPane();

    // Fetch pointer to the default navi pane control
    iNaviPane = (CAknNavigationControlContainer*)sp->ControlL(
    TUid::Uid(EEikStatusPaneUidNavi));

    ...........
    ...........


    }

    resource files:

    //testsuite_reg.rss

    #include "testsuite.rls"
    #include <appinfo.rh>
    #include <testsuite.rsg>

    UID2 KUidAppRegistrationResourceFile
    UID3 0xE8D0A4AA

    RESOURCE APP_REGISTRATION_INFO
    {
    app_file="testsuite";
    localisable_resource_file = STRING_testsuite_loc_resource_file_1;
    localisable_resource_id = R_LOCALISABLE_APP_INFO;


    embeddability=KAppNotEmbeddable;
    newfile=KAppDoesNotSupportNewFile;
    }

    // testsuite.rss

    // RESOURCE IDENTIFIER
    NAME TEST // 4 letter ID

    // INCLUDES

    #include <eikon.rh>
    #include <avkon.rsg>
    #include <avkon.rh>
    #include <avkon.mbg>
    #include "testsuite.hrh"
    #include "testsuite.rls"


    #ifdef EKA2
    #include <appinfo.rh>
    #endif


    // RESOURCE DEFINITIONS

    RESOURCE RSS_SIGNATURE { }

    RESOURCE TBUF { buf="testsuite"; }

    RESOURCE EIK_APP_INFO
    {
    status_pane = r_testsuite_status_pane;
    }

    RESOURCE HOTKEYS r_testsuite_hotkeys
    {
    control=
    {
    HOTKEY { command=EAknCmdExit; key='e'; }
    };
    }

    RESOURCE AVKON_VIEW r_testsuite_view1
    {
    hotkeys=r_testsuite_hotkeys;
    menubar=r_testsuite_menubar_view1;
    cba=R_AVKON_SOFTKEYS_OPTIONS_EXIT;
    }

    RESOURCE MENU_BAR r_testsuite_menubar_view1
    {
    titles=
    {
    MENU_TITLE { menu_pane=r_testsuite_app_menu; txt="App"; },
    MENU_TITLE { menu_pane=r_testsuite_view1_menu; txt="View"; }
    };
    }

    RESOURCE MENU_PANE r_testsuite_view1_menu
    {
    items=
    {
    MENU_ITEM { command=ETestsuiteCmdView1Cmd1; txt = qtn_view1_option_item1; },
    MENU_ITEM { command=ETestsuiteCmdView1Cmd2; txt = qtn_view1_option_item2; },
    MENU_ITEM { command=ETestsuiteCmdView1Cmd3; txt = qtn_view1_option_item3; }
    };
    }

    RESOURCE AVKON_VIEW r_testsuite_view2
    {
    hotkeys=r_testsuite_hotkeys;
    menubar=r_testsuite_menubar_view2;
    cba=R_AVKON_SOFTKEYS_OPTIONS_EXIT;
    }

    RESOURCE MENU_BAR r_testsuite_menubar_view2
    {
    titles=
    {
    MENU_TITLE { menu_pane=r_testsuite_app_menu; txt="App"; },
    MENU_TITLE { menu_pane=r_testsuite_view2_menu; txt="View"; }
    };
    }

    RESOURCE MENU_PANE r_testsuite_view2_menu
    {
    items=
    {
    MENU_ITEM { command=ETestsuiteCmdView2Cmd1; txt = qtn_view2_option_item1; },
    MENU_ITEM { command=ETestsuiteCmdView2Cmd2; txt = qtn_view2_option_item2; },
    MENU_ITEM { command=ETestsuiteCmdView2Cmd3; txt = qtn_view2_option_item3; },
    MENU_ITEM { command=ETestsuiteCmdView2Cmd4; txt = qtn_view2_option_item4; }
    };
    }

    RESOURCE MENU_PANE r_testsuite_app_menu
    {
    items=
    {
    MENU_ITEM { command=EAknCmdExit; txt="Exit"; }
    };
    }


    RESOURCE STATUS_PANE_APP_MODEL r_testsuite_status_pane
    {
    panes=
    {
    SPANE_PANE
    {
    id = EEikStatusPaneUidNavi;
    type = EAknCtNaviPane;
    resource = r_testsuite_navi_decorator;
    }
    };
    }

    RESOURCE NAVI_DECORATOR r_testsuite_navi_decorator
    {
    type = ENaviDecoratorControlTabGroup;
    control = TAB_GROUP
    {
    tab_width = EAknTabWidthWithTwoTabs; // two tabs
    active = 0;
    tabs = {
    TAB
    {
    id = ETestsuiteView1Tab; // from application hrh
    txt = qtn_view1_tab;
    },
    TAB
    {
    id = ETestsuiteView2Tab;
    txt = qtn_view2_tab;
    }
    };
    };
    }

    // -----------------------------------------------------------------------------
    //
    // r_contact_number_query
    //
    // -----------------------------------------------------------------------------
    //
    RESOURCE DIALOG r_contact_number_query
    {
    flags = EGeneralQueryFlags;
    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
    items =
    {
    DLG_LINE
    {
    type = EAknCtQuery;
    id = EGeneralQuery;
    control= AVKON_DATA_QUERY
    {
    layout = ENumberLayout;
    label = "Contact number:";
    control = AVKON_INTEGER_EDWIN
    {
    min = 1;
    max = 999;
    };
    };
    }
    };
    }


    #ifdef EKA2
    // -----------------------------------------------------------------------------
    //
    // Resources for messages.
    //
    // -----------------------------------------------------------------------------
    //
    //RESOURCE TBUF32 r_testsuite_caption_string { buf=qtn_app_caption_string; }

    // ----------------------------------------------------------------------------
    //
    // r_localisable_app_info
    //
    // ----------------------------------------------------------------------------
    //
    RESOURCE LOCALISABLE_APP_INFO r_localisable_app_info
    {
    short_caption = qtn_app_short_caption_string;
    caption_and_icon =
    CAPTION_AND_ICON_INFO
    {
    caption = qtn_app_caption_string;

    number_of_icons = 1;
    icon_file = "\\resource\\apps\\testsuite.mif";
    };
    }




    #endif

    and finally the icon file
    // testsuiteaif.rss
    #include <aiftool.rh>

    RESOURCE AIF_DATA
    {
    app_uid=0x08D0A4AA ;
    num_icons=1;
    embeddability=KAppNotEmbeddable;
    newfile=KAppDoesNotSupportNewFile;
    }

    I have added the following line to mmp file
    AIF testsuite.aif ..\..\aif testsuiteaif.rss c12 context_pane_icon.bmp context_pane_icon_mask.bmp

    Below is the icons makfile
    //Icons_scalable_dc.mk

    ifeq (WINS,$(findstring WINS, $(PLATFORM)))
    ZDIR=$(EPOCROOT)epoc32\release\$(PLATFORM)\$(CFG)\Z
    else
    ZDIR=$(EPOCROOT)epoc32\data\z
    endif



    TARGETDIR=$(ZDIR)\resource\apps
    ICONTARGETFILENAME=$(TARGETDIR)\testsuite.mif

    ICONDIR=..\..\gfx

    do_nothing :
    @rem do_nothing

    MAKMAKE : do_nothing

    BLD : do_nothing

    CLEAN : do_nothing

    LIB : do_nothing

    CLEANLIB : do_nothing

    RESOURCE :

    FREEZE : do_nothing

    SAVESPACE : do_nothing

    RELEASABLES :
    @echo $(ICONTARGETFILENAME)

    FINAL : do_nothing

    $(ICONTARGETFILENAME): \
    $(ICONDIR)\qgn_menu_testsuite.svg
    mifconv $(ICONTARGETFILENAME) \
    /c32 $(ICONDIR)\qgn_menu_testsuite.svg


    ////////// here is the mmp file
    TARGET testsuite.exe
    TARGETTYPE exe
    UID 0 0xE8D0A4AA
    SECUREID 0xE8D0A4AA

    SYSTEMINCLUDE \epoc32\include

    USERINCLUDE ..\..\inc

    SOURCEPATH ..\..\src
    SOURCE testsuite.cpp
    SOURCE mainwindow.cpp
    SOURCE mainapp.cpp
    ....
    ....

    SOURCEPATH ..\..\data

    START RESOURCE testsuite.rss
    HEADER
    TARGETPATH resource\apps
    END // RESOURCE

    START RESOURCE testsuite_reg.rss

    #ifdef WINSCW
    TARGETPATH \private\10003a3f\apps
    #else
    TARGETPATH \private\10003a3f\import\apps
    #endif
    END

    LIBRARY euser.lib charconv.lib cntmodel.lib efsrv.lib
    LIBRARY imageconversion.lib
    LIBRARY eikcoctl.lib PbkView.lib hal.lib
    ....
    ....

    CAPABILITY None

    #ifdef ENABLE_ABIV2_MODE
    DEBUGGABLE_UDEBONLY
    #endif

    SOURCEPATH ..\..\src
    SOURCE myview1.cpp myview2.cpp

    AIF testsuite.aif ..\..\aif testsuiteaif.rss c12 context_pane_icon.bmp context_pane_icon_mask.bmp

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,568

    Re: Kern exec 3 in BaseConstuctL of UI

    What happens if you remove the 0x08? It is a flag for S60 2nd edition FP3, and should not cause problems here, but still worths a try.

  3. #3
    Registered User
    Join Date
    Apr 2009
    Posts
    6

    Re: Kern exec 3 in BaseConstuctL of UI

    Quote Originally Posted by wizard_hu_ View Post
    What happens if you remove the 0x08? It is a flag for S60 2nd edition FP3, and should not cause problems here, but still worths a try.
    Thanks for the response. I tried this but the same problem.

    Regards,
    --Ashish

  4. #4
    Super Contributor
    Join Date
    Nov 2004
    Posts
    1,009

    Re: Kern exec 3 in BaseConstuctL of UI

    Do check your .rss carefully or just make a single view at the moment and test it.

    After compilation just check all your .mif, .rsg etc gets generated or not.
    Regards,
    Shafali

  5. #5
    Registered User
    Join Date
    Apr 2009
    Posts
    6

    Re: Kern exec 3 in BaseConstuctL of UI

    Quote Originally Posted by shafalig82 View Post
    Do check your .rss carefully or just make a single view at the moment and test it.

    After compilation just check all your .mif, .rsg etc gets generated or not.
    All files are generated.

    I have not mentioned a very important point. I was initially thinking the error could be a minor issue. I am using the following code from MyApp to generate the UI class object (instead of
    EikStart::RunApplication(NewApplication))

    Sorry I did not mention this at the start.

    I have since tried to modify it to use RCoeResourceLoader. Is the class required to be used in the scenario? If so, how? Otherwise What do I have to do to use the resource file if I create the UI class in this manner?
    Any help is much appreciated.

    MyApp::MyApp()
    {
    CEikonEnv *iEnv = new (ELeave) CEikonEnv ;
    TRAPD(err, iEnv->ConstructL());

    MyAppUI *pAppUI = new (ELeave) MyAppUi
    TRAPD(err1, pAppUI->ConstructL());

    CEikonEnv::Static()->SetAppUi(pAppUI);
    }

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,568

    Re: Kern exec 3 in BaseConstuctL of UI

    Yes, such tiny details (like replacing the complete framework) usually matter.
    Although you have a CEikonEnv, and this approach could work with a CEikAppUi-inherited AppUi, you are apparently using Avkon stuff, refer Avkon resources, etc. Thus you would have to initialize Avkon too (probably CAknEnv, and perhaps some other steps are also required). This is where the whole things start to get fuzzy and undocumented by the way. You may also have to load the resource file manually (AddResourceFileL).
    Avkon Views, especially external ones (from PbkView.lib) definitely will not make things easier.

  7. #7
    Registered User
    Join Date
    Apr 2009
    Posts
    6

    Re: Kern exec 3 in BaseConstuctL of UI

    Quote Originally Posted by wizard_hu_ View Post
    Yes, such tiny details (like replacing the complete framework) usually matter.
    Although you have a CEikonEnv, and this approach could work with a CEikAppUi-inherited AppUi, you are apparently using Avkon stuff, refer Avkon resources, etc. Thus you would have to initialize Avkon too (probably CAknEnv, and perhaps some other steps are also required). This is where the whole things start to get fuzzy and undocumented by the way. You may also have to load the resource file manually (AddResourceFileL).
    Avkon Views, especially external ones (from PbkView.lib) definitely will not make things easier.

    Thanks for the reply. Can you give me some pointers? Or may be just write down some lines of code that I can play with?

    Your help is much appreciated.

    Regards,
    --Ashish

  8. #8
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,568

    Re: Kern exec 3 in BaseConstuctL of UI

    Not really, I have not done such think with Avkon. You can find related articles in the Wiki (search for exe ui) and on http://www.newlc.com, but they do not discuss Avkon-related stuff neither.
    Theoretically you could check the source codes on http://developer.symbian.org, even if those are for more recent/future devices, the basic concept is probably the same.

Similar Threads

  1. KERN EXEC 3 ERROR
    By sanjayks84 in forum Symbian User Interface
    Replies: 5
    Last Post: 2011-02-11, 07:16
  2. Replies: 2
    Last Post: 2009-09-08, 08:11
  3. Listbox in dialog gives 'Kern Exec 3' on mobile
    By hansapariya in forum Symbian User Interface
    Replies: 1
    Last Post: 2009-07-24, 07:01
  4. KERN EXEC 3 on device not on Epoc
    By Kavit Patel in forum Symbian C++
    Replies: 4
    Last Post: 2008-11-21, 15:02
  5. KERN EXEC 3 while deleting listbox
    By hansapariya in forum Symbian C++
    Replies: 4
    Last Post: 2008-03-29, 09:09

Posting Permissions

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