[Noob] - EikStart::RunApplication() makes the emulator crash

Login to reply to this topic.
Mon, 2008-08-11 01:22
Joined: 2008-08-10
Forum posts: 4

Hello everybody,
I'm developing an application (EXE) and I have a problem with RunApplication method.
This is part of my code:

LOCAL_C CApaApplication* NewApplication()
{
    return new CIMClientApp;
}

GLDEF_C TInt E32Main()
{
    return EikStart::RunApplication( NewApplication );
}

where CIMClientApp is a subclass of CAknApplication.

The method EikStart::RunApplication() makes the application and the emulator crash badly. Method NewApplication() is not executed, because crash occurs before its execution.
Running the debugger (I'm using Carbide.c++) and catching any cpu exception, I get this stack trace:

Thread [Thread id: 5276] (Suspended: Signal 'Exception 29539' received. Description: Microsoft C++ Exception (0xE06D7363).)       
        18 0x7C812AEB( KERNEL32.dll )()  0x7c812aeb       
        17 0x6004906B( euser.dll )()  0x6004906b       
        16 0x60026FA8( euser.dll )()  0x60026fa8       
        15 0x83F31F7( elocal.fsy )()  0x083f31f7       
        14 0x620074C2( efile.exe )()  0x620074c2       
        13 0x620076A1( efile.exe )()  0x620076a1       
        12 0x6200AA68( efile.exe )()  0x6200aa68       
        11 0x6200ABCA( efile.exe )()  0x6200abca       
        10 0x6202AB4B( efile.exe )()  0x6202ab4b       
        9 0x6202ABE7( efile.exe )()  0x6202abe7       
        8 0x6202A4E1( efile.exe )()  0x6202a4e1       
        7 0x62031F3B( efile.exe )()  0x62031f3b       
        6 0x62031B13( efile.exe )()  0x62031b13       
        5 0x62031A77( efile.exe )()  0x62031a77       
        4 0x620403FB( efile.exe )()  0x620403fb       
        3 0x271884F( ekern.exe )()  0x0271884f       
        2 0x2716E04( ekern.exe )()  0x02716e04       
        1 0x7C80B713( KERNEL32.dll )()  0x7c80b713       

Help me please Sad


Tue, 2008-08-12 23:29
Joined: 2008-08-10
Forum posts: 4
Re: [Noob] - EikStart::RunApplication() makes the emulator crash

Ok I solved the problem, unchecking '0xE06D7363' under Debug Dialog->x86 Exceptions.
I discovered that this exception occurred during the emulator startup (after some seconds), so before executing application code.
Now the emulator starts correctly, but when RunApplication() is executed everything crashes again...
This is the last console output, (unfortunately I can't get any stack trace):

...........
...........
...........
62.425        TeUtl: ECN.HandleCallBack.<
62.440        TeUtl: ECN.DoHandleCallBack.<
62.440        TeUtl: ECN.DoHandleCallBack.>
62.440        TeUtl: ECN.HandleCallBack.>
62.445        CDRMClock::TimeChanged
62.450        CDRMClock::TimeChanged ok
62.560        Thread IMClient.exe::Main created @ 0x297bbf8 - Win32 Thread ID 0x93c
62.590        Thread IMClient.exe::IMClient Killed -1

Please tell me some hint Puzzled

Wed, 2008-08-13 11:03
Joined: 2004-11-29
Forum posts: 1233
Re: [Noob] - EikStart::RunApplication() makes the emulator crash

-1 is KErrNotFound.

Possibly you have some problem with application resources missing that the app framework try to load.

Wed, 2008-08-13 14:22
Joined: 2003-12-05
Forum posts: 672
Re: [Noob] - EikStart::RunApplication() makes the emulator crash

I'd guess that your resource file is broken. Check that all your resources are after RSS_SIGNATURE (must be first), RESOURCE TBUF r_default_document_name and EIK_APP_INFO.

Wed, 2008-08-13 15:17
Joined: 2008-08-10
Forum posts: 4
Re: [Noob] - EikStart::RunApplication() makes the emulator crash

Thanks for replies. I think you are right, because actually I'm trying to use an old project (made with 2nd edition, I guess) with last sdk and carbide, and I know that resource definition is slightly different, so in fact everything in my project is broken.
I'm reading this document to port the project (which I suggest to everyone trying to port old applications),

http://www.forum.nokia.com/info/sw.nokia.com/id/6190aad6-3b3b-4a6a-a53a-221e61c94248/S60_Platform_Porting_from_2nd_to_3rd_Edition_v1_1_en.pdf.html

but I still have much confusion about resources. I changed something (like RESOURCE to START RESOURCE...) and now the crash is different, and this time I have also a stack trace! (I've compressed it in some way)

Thread [Thread id: 1776] (Suspended: Signal 'Halt' received. Description: User halted thread.)       
38 0x2719636( ekern.exe )()  0x02719636       
......
26 0x27131A4( ekern.exe )()  0x027131a4       
25 0x600423C6( euser.dll )()  0x600423c6       
......
21 0x6002E8BF( euser.dll )()  0x6002e8bf       
20 0x40112A8C( bafl.dll )()  0x40112a8c       
19 0x40112A5E( bafl.dll )()  0x40112a5e       
18 0x40108A86( bafl.dll )()  0x40108a86       
17 0x4060BD41( cone.dll )()  0x4060bd41       
16 0x1589471( eikcoctl.dll )()  0x01589471       
15 0x40B4A812( eikcore.dll )()  0x40b4a812       
14 0x40B4A73E( eikcore.dll )()  0x40b4a73e       
13 0x48378F( avkon.dll )()  0x0048378f       
12 0x485102( avkon.dll )()  0x00485102       
11 CAppUi::ConstructL() D:\Symbian\Carbide\workspace\IMClient-mod\src\ui\Appui.cpp:35 0x00401dfa       
10 0x40B4DFF5( eikcore.dll )()  0x40b4dff5       
......
6 0x40B5565D( eikcore.dll )()  0x40b5565d       
5 E32Main() D:\Symbian\Carbide\workspace\IMClient-mod\src\App.cpp:62 0x00401704       
4 _E32Startup() Z:\src\cedar\generic\base\e32\EUSER\epoc\win32\uc_exe.cpp:74 0x0040ae7a       
3 0x271884F( ekern.exe )()  0x0271884f       
2 0x2716E04( ekern.exe )()  0x02716e04       
1 0x7C80B713( KERNEL32.dll )()  0x7c80b713       

In case you are wondering what's in Appui.cpp:35 here is the line:
BaseConstructL(EAknEnableSkin);

Am I following the "right" way?

EDIT:
Also, these are the console last words:

69.565 Thread IMClient_0x0648A0B2::IMClient_0x0648A0B2 Panic USER 23

This is the beginning of resources, other definitions follow.
RESOURCE RSS_SIGNATURE { }

RESOURCE TBUF { buf = "IMClient"; }

RESOURCE EIK_APP_INFO
    {
    hotkeys = r_imclient_hotkeys;
    menubar = r_imclient_menubar_offline;
    cba = R_BUTTONS_OFFLINE;    
    }

Wed, 2008-08-13 18:01
Joined: 2003-12-05
Forum posts: 672
Re: [Noob] - EikStart::RunApplication() makes the emulator crash

USER 23: "This panic is raised when any operation that moves or copies data to an 8 bit variant descriptor, causes the length of that descriptor to exceed its maximum length."

Are you doing something with 8 bit descriptors? Care to show the whole AppUi::ConstructL?

Edit: If you are using Carbide.C++, I suggest installing the Panic lookup plugin, which is a quick way to find out the error code and panic explanations.

Fri, 2008-08-15 14:10
Joined: 2008-08-10
Forum posts: 4
Re: [Noob] - EikStart::RunApplication() makes the emulator crash

Thank you Andreas,it helped me a lot.
Now the project starts "almost" fine.
Bye!

  • Login to reply to this topic.