×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    Oct 2006
    Location
    Espoo-Finland
    Posts
    71

    E60 App crashes at StringLoader::LoadLC( R_CHAT_SERVICE_NAME );

    Hi,
    I am using portion of code from BtServices sample. Following line of code crashes application at application startup:
    Code:
    HBufC* textResource = StringLoader::LoadLC( R_CHAT_SERVICE_NAME );
    During startup AppUi creates CChatBt.
    If I add same line of code to ConstructL method of CChatBt everything works fine.
    Code:
    void CChatBt::ConstructL()
        {
        //OK
        HBufC* textResource = StringLoader::LoadLC( R_CHAT_SERVICE_NAME );      
        CleanupStack::PopAndDestroy( textResource );
        iAdvertiser = CChatServiceAdvertiser::NewL();
        }
    
    void CChatServiceAdvertiser::ConstructL()
        {
        //Crashes app
        HBufC* textResource = StringLoader::LoadLC( R_CHAT_SERVICE_NAME );
        CleanupStack::PopAndDestroy( textResource );
        }
    As soon as I comment code in CChatServiceAdvertiser::ConstructL() app starts.
    I have surounded command with TRAPD
    Code:
    TRAPD(err, textResource = StringLoader::LoadL( R_CHAT_SERVICE_NAME );)
    but it does not help. App stil crashes.

    My first gues was stack size. I removed string loading from
    Code:
    void CChatBt::ConstructL()
        {
        //OK
        //HBufC* textResource = StringLoader::LoadLC(R_CHAT_SERVICE_NAME);
        //CleanupStack::PopAndDestroy( textResource );
        iAdvertiser = CChatServiceAdvertiser::NewL();
        }
    Application stil craches.
    stack is 20 kb
    (in mmp file)
    EPOCSTACKSIZE 0x5000
    Increasing stack size to 0x6000 did not help.

    I have added
    Code:
    HBufC* textResource = StringLoader::LoadLC(R_CHAT_SERVICE_NAME);
    To constructL method of each class which is created during app startup. As soon as I add it to 6th class in chain, app craches.

    What can cose this behaviour?

    Zdenko

  2. #2
    Regular Contributor
    Join Date
    Jan 2004
    Location
    Braunschweig, Germany
    Posts
    345

    Re: E60 App crashes at StringLoader::LoadLC( R_CHAT_SERVICE_NAME );

    That seems to be a strange problem. How does the application crash? Do you get a KERN-EXEC-3 or another Panic?

    Bernd

  3. #3
    Regular Contributor
    Join Date
    Oct 2006
    Location
    Espoo-Finland
    Posts
    71

    Re: E60 App crashes at StringLoader::LoadLC( R_CHAT_SERVICE_NAME );

    Application closes without any message.
    Since all this is going on at startup I do not see applications view. Only thing I see is short screen flicker. All icons from screen disapear for aproximatly half second and everything is back after it.

  4. #4
    Regular Contributor
    Join Date
    Jan 2004
    Location
    Braunschweig, Germany
    Posts
    345

    Re: E60 App crashes at StringLoader::LoadLC( R_CHAT_SERVICE_NAME );

    Ok. On the device you usually don't get the Panic code displayed. Did you try to run the program in the emulator in debug mode? It will be hard to get the BT part working, but you might be able to find the source for this problem.

    Bernd

  5. #5
    Nokia Developer Champion
    Join Date
    Feb 2005
    Location
    Karachi, Pakistan
    Posts
    277

    Re: E60 App crashes at StringLoader::LoadLC( R_CHAT_SERVICE_NAME );

    hello,

    zdenko, did you managed to make it work? if yes how?

    i'm creating some other application, but this is happening exactly same on my cell. StringLoader::LoadLC works in ConstructL, but crashs on elsewhere.

    thanks,

    // chall3ng3r //
    Faisal Iqbal (skype: chall3ng3r)
    Flash Mobile Specialist | Orison Technologies
    _____________________________________
    blog: F·L·A·S·H·I·S·M
    swf2go: www.swf2go.com

  6. #6
    Nokia Developer Champion
    Join Date
    Feb 2005
    Location
    Karachi, Pakistan
    Posts
    277

    Re: E60 App crashes at StringLoader::LoadLC( R_CHAT_SERVICE_NAME );

    very strange.....

    on emulator, and on cell the behavior was same, as soon as StringLoader::LoadLC is called, the app was crashed without any errors.

    i searched around a found another way to load resource data:
    HBufC * infoText = CEikonEnv::Static()->AllocReadResourceLC(R_TEXT_MYDATA);

    this code works fine in emulator and i can see the loaded data, everything is working fine... but on cellphone, the behavior is same as with StringLoader::LoadLC, crash with no errors.

    can anyone help me?

    // chall3ng3r //
    Faisal Iqbal (skype: chall3ng3r)
    Flash Mobile Specialist | Orison Technologies
    _____________________________________
    blog: F·L·A·S·H·I·S·M
    swf2go: www.swf2go.com

Similar Threads

  1. App crashes in various stages - 3rd Edition
    By m00gl3 in forum Symbian
    Replies: 2
    Last Post: 2006-05-17, 04:17
  2. SMS messaging app crashes after receiving second message. Plz Help!!
    By stephenallan in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2006-02-09, 12:49
  3. Incoming SMS crashes app
    By Ishibo San in forum Symbian
    Replies: 1
    Last Post: 2005-07-18, 11:08
  4. My app crashes when the call is in progress
    By michalpleban in forum Symbian User Interface
    Replies: 0
    Last Post: 2004-10-15, 17:43
  5. 3410 app crashes when other MIDlets installed
    By marcpalmer in forum Mobile Java General
    Replies: 2
    Last Post: 2003-10-01, 00:43

Posting Permissions

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