×

Discussion Board

Results 1 to 12 of 12

Thread: Panic APPARC 42

  1. #1
    Regular Contributor
    Join Date
    Aug 2010
    Posts
    347

    Panic APPARC 42

    Hi,

    After successful build, when I run my application in S60 emulator I get a Panic APPARC 42.
    I would appreciate any suggestions to resolve this issue.

    TIA
    Vin

  2. #2
    Super Contributor
    Join Date
    Jan 2008
    Location
    Bangalore, India
    Posts
    777

    Re: Panic APPARC 42

    Quote Originally Posted by vinp View Post
    Hi,

    After successful build, when I run my application in S60 emulator I get a Panic APPARC 42.
    I would appreciate any suggestions to resolve this issue.

    TIA
    Vin
    somehow its related to your application architecture, check your views and their UIDs.
    Search for "apparc " in the SDK Help
    Regards
    $-Nitesh-$

  3. #3
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165

    Re: Panic APPARC 42

    Also you could try debugging on where you are getting the panic from.

  4. #4
    Regular Contributor
    Join Date
    Aug 2010
    Posts
    347

    Re: Panic APPARC 42

    Hi,

    Based on the debug log, I can see that the panic occurs as soon as the control enters the thread of my application code:

    Thread CardGameGUIAppVer1.exe::CardGameGUIAppVer1 Panic APPARC 42

    Is it possible to get more information about the source of this panic? Also, I did indeed check whether I have missed out any details specified by the Application Framework.
    Based on my limited knowledge, I could not find any omissions. I have an application class object that is instantiated by the application factory object , a Document Class that is instantiated by the application class object, a Controller (AppUi) class object instantiated by the Document object, and a View class object that is instantiated and managed by the Controller object.

    I am still looking into this. Any tips would be greatly appreciated.
    thanks
    Vin

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,734

    Re: Panic APPARC 42

    In the emulator you can enable Just In Time debugging (somewhere in Tools/Preferences), which will stop your code when the panic happens. Then run your code in debug mode from Carbide.c++.
    If you encounter some error message about ECMT Manager on your way, search for ECMT in the Wiki.

  6. #6
    Regular Contributor
    Join Date
    Aug 2010
    Posts
    347

    Re: Panic APPARC 42

    Quote Originally Posted by wizard_hu_ View Post
    In the emulator you can enable Just In Time debugging (somewhere in Tools/Preferences), which will stop your code when the panic happens. Then run your code in debug mode from Carbide.c++.
    If you encounter some error message about ECMT Manager on your way, search for ECMT in the Wiki.
    I could not find the Just in Time Debugging option in Carbide v2.3. Under Run->Debug Configurations->Debugger, there is an option Break at Entry Point which is set to E32Main by defualt.
    I see the following error repeatedly in the emulator log before the panic occurs:

    CTouchFeedbackImpl::ClientHandle - Error: No window defined, not possible to get handle!!
    177.740 CTouchFeedbackImpl::SetFeedbackArea - Err: Invalid Control

    Is this relevant to the panic?

    thanks
    Vin

  7. #7
    Regular Contributor
    Join Date
    Aug 2010
    Posts
    347

    Re: Panic APPARC 42

    In the emulator, I can see only the following options under Tools:
    Calculator
    Connections
    Connect to PC
    File Manager
    Remote Sync
    Time
    Voice

    There is no Preferences option to turn Just In Time debugging on

    Vin

  8. #8
    Regular Contributor
    Join Date
    Aug 2010
    Posts
    347

    Re: Panic APPARC 42

    Based on the following thread
    http://discussion.forum.nokia.com/fo...ot-feature-how
    I edited epoc32\data\epoc.ini and set JustInTime to 1 and restarted Carbide C++.

    Now I get the following panic and error upon running the app in debug mode:

    Thread WidgetRegistry.EXE::!WidgetRegistry Panic ALLOC: 36642aa4

    No source available for "0x2ABA266( ekern.exe )() "

    when I look at the trace the errors the thread executing this particular exe has been shown as halted by user:
    Thread [Thread id: 2436] (Suspended: Signal 'Halt' received. Description: User halted thread.)
    21 0x2ABA266( ekern.exe )() 0x02aba266
    20 0x2ABA44B( ekern.exe )() 0x02aba44b
    19 0x2ACD0D4( ekern.exe )() 0x02acd0d4
    18 0x2AE487E( ekern.exe )() 0x02ae487e
    17 0x2AE46A2( ekern.exe )() 0x02ae46a2
    16 0x2AB21F8( ekern.exe )() 0x02ab21f8
    15 0x2AB19BC( ekern.exe )() 0x02ab19bc
    14 0x2AB11F5( ekern.exe )() 0x02ab11f5
    13 0x2AB27B4( ekern.exe )() 0x02ab27b4
    12 0x2AE4AE2( ekern.exe )() 0x02ae4ae2
    11 0x2ADA2E7( ekern.exe )() 0x02ada2e7
    10 0x2AB346D( ekern.exe )() 0x02ab346d
    9 0x2AB3424( ekern.exe )() 0x02ab3424
    8 0x60043076( euser.dll )() 0x60043076
    7 0x60014156( euser.dll )() 0x60014156
    6 0x6001A015( euser.dll )() 0x6001a015
    5 0x2FD6CF08( WidgetRegistry.exe )() 0x2fd6cf08
    4 0x2FD6DE68( WidgetRegistry.exe )() 0x2fd6de68
    3 0x2AB947F( ekern.exe )() 0x02ab947f
    2 0x2AB7987( ekern.exe )() 0x02ab7987
    1 0x7C80B50B( KERNEL32.dll )() 0x7c80b50b

    Please share your thoughts
    thanks
    Vin

  9. #9
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,734

    Re: Panic APPARC 42

    WidgetRegistry is not your application, simply click continue.

    "In the emulator you can enable Just In Time debugging (somewhere in Tools/Preferences)" means the emulator, not Carbide.c++. If you check the emulator carefully, it has a standard "Windows-style" menu, "File, Tools, Help" or something, that would have been the one.

  10. #10
    Regular Contributor
    Join Date
    Aug 2010
    Posts
    347

    Re: Panic APPARC 42

    Thanks I was able to set the Just-In-Time debugging option.

  11. #11
    Regular Contributor
    Join Date
    Aug 2010
    Posts
    347

    Re: Panic APPARC 42

    Upon further debugging after enabling Just-In_Time debugging, I could get the following additional information.

    In non-debug mode, when the application crashes, a Error:USER 0 is generated in the emulator.
    When I re-run the application in debug mode, I see that the line of code that gets executed in my application, prior to the crash, is the following:
    return EikStart::RunApplication(AppFactory);
    Additional information on the stack trace points to the value of AppFactory.TApaApplicationFactory.iApplication equal to 0x00000000:
    iApplication 0x00000000

    Apparently, the application object is not getting initialized.

    In my code, before invoking EikStart::RunApplication, I create object of type CBasicGUIAppFactory, which is derived from TApaApplicationFactory:

    //CBasicGUIAppFactory.h
    //macro definition for UID3
    #define UID3DECIMALVAL 3758096385
    //definition for resource file
    _LIT(KResourceFile, "CardGameGUIAppVer1.rsc");

    class CBasicGUIAppFactory : public TApaApplicationFactory
    {
    public:
    CBasicGUIAppFactory();
    ~CBasicGUIAppFactory();
    static CApaApplication* NewApplication();
    };


    //main.cpp

    GLDEF_C TInt E32Main()
    {
    __UHEAP_MARK;
    //initialize the application factory
    CBasicGUIAppFactory AppFactory;
    return EikStart::RunApplication(AppFactory);
    __UHEAP_MARKEND;
    }

    And here is the definition of the class methods in CBasicGUIAppFactory

    //CBasicGUIAppFactory .cpp
    //constructor
    BasicGUIAppFactory::CBasicGUIAppFactory(): TApaApplicationFactory(CBasicGUIAppFactory::NewApplication)
    {

    }
    //same signature asTFunction in TApaApplication
    CApaApplication* CBasicGUIAppFactory::NewApplication()
    {
    //create the resource file object
    CBasicGUIResourceFile ResourceFile(KResourceFile);
    //create and return the application object
    return new CBasicGUIApp(ResourceFile, UID3DECIMALVAL);
    }
    And here is the class definition for CBasicGUIApp (this is the application class):

    //CBasicGUIApp.h
    class CBasicGUIResourceFile : public TFileName
    {
    public:
    CBasicGUIResourceFile(const TDesC& aString);
    ~CBasicGUIResourceFile();
    private:
    const TDesC& iString;
    };

    class CBasicGUIApp : public CAknApplication
    {
    public:
    CBasicGUIApp(CBasicGUIResourceFile& aResourceFile, TInt Uid);
    ~CBasicGUIApp();
    //override the method inherited from CApaApplication
    TUid AppDllUid()const;
    //override the method inherited from CEikApplication
    CApaDocument* CreateDocumentL(void);
    //override the method inherited from CEikApplication
    TFileName ResourceFileName(void);
    private:
    TUid UID3;// = 0xE0000001
    CBasicGUIResourceFile& objResourceFile;
    };

    //CBasicGUIApplication.cpp
    CBasicGUIApp::CBasicGUIApp(CBasicGUIResourceFile& aResourceFile, TInt Uid) : objResourceFile(aResourceFile)
    {
    //construct the UID3 object from the 32-bit integer value
    UID3.Uid(Uid);
    }
    I am not able to make out where exactly is the problem in the above code framework, which prohibits the succesful creation of the application object.
    Any suggestions would be appreciated.
    TIA
    Vin

  12. #12
    Regular Contributor
    Join Date
    Aug 2010
    Posts
    347

    Re: Panic APPARC 42

    Is there some documentation about why a Panic USER 0 is generated for an application? I looked up the SDK documentation and it is very generic:

    This panic is raised when a thread calls User::Invariant().

    Typically, User::Invariant() is called when a test for a class invariant fails, i.e. when a test which checks that the internal data of an object is self-consistent, fails.

    Check the design and implementation of your class.


    Is there a way to find out which invariant failed, because of which this panic was raised?

    thanks
    Vin

Similar Threads

  1. Panic USER 42: how it is here ???
    By KhaledMahmood in forum Symbian Networking & Messaging (Closed)
    Replies: 10
    Last Post: 2010-01-25, 14:26
  2. APPARC 7 Panic
    By Kaz32 in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2009-09-09, 08:23
  3. APPARC Panic reference (S60 3rd MR)?
    By akrapacs in forum Symbian User Interface
    Replies: 1
    Last Post: 2006-09-21, 08:16
  4. APPARC 7 Panic
    By johnward1978 in forum Symbian
    Replies: 0
    Last Post: 2005-02-23, 16:06
  5. Panic USER 42 - Please Help !!!
    By yuvalgeva in forum Symbian
    Replies: 2
    Last Post: 2002-05-21, 07: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
  •  
×