×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Sep 2008
    Location
    Vancouver, Canada
    Posts
    588

    Does the use of StringLoader::LoadLC cause the symbian app to crash on few devices?

    Hi,

    I had used string literals in my application(on s60 3rd MR) at few places. The app was working just fine without crashes.

    Then i moved them to .rls file for localization and loaded them using resource name with StringLoader:LoadLC funtion.

    With that change in code, the app started crashing on E71 which was working previously on the same device.

    Do you think this API may cause app to crash on specific devices? I have not tested on other devices yet.

    Thanks for reading
    Raj

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,739

    Re: Does the use of StringLoader::LoadLC cause the symbian app to crash on few device

    You may want to reveal the error messages first http://www.developer.nokia.com/Commu...ded_panic_code

  3. #3
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    4,080

    Re: Does the use of StringLoader::LoadLC cause the symbian app to crash on few device

    A wild guess may be the missing CleanUpStack::Pop() statement required after utilizing StringLoader::LoadLC.

  4. #4
    Registered User
    Join Date
    Sep 2008
    Location
    Vancouver, Canada
    Posts
    588

    Re: Does the use of StringLoader::LoadLC cause the symbian app to crash on few device

    Quote Originally Posted by vineet.jain View Post
    A wild guess may be the missing CleanUpStack::Pop() statement required after utilizing StringLoader::LoadLC.
    Actually it depends on whether to use Cleanupstack::Pop() or PopAndDestroy() but i am using it but app is still crashing on device.

    Let me give you exact picture of it. Here is where i am using it.

    Code:
    	TBuf<40> itemText;
                    _LIT( KListItemFormat,"0\t%S\t");
    	HBufC* buf_dialer = StringLoader::LoadLC(R_DIALER);
    	TBuf<25> buffer(_L(""));
    	itemText.Format( KListItemFormat(), *buf_dialer, &buffer );
                    // Appended itemText to a descriptor array
                   Cleanupstack::PopAndDestroy(buf_dialer);
    Do you see anything wrong here?

    Thanks for suggestions.
    Raj

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

    Re: Does the use of StringLoader::LoadLC cause the symbian app to crash on few device

    This is why I do not like suggesting anything until users report an actual panic code. Now 6 days have passed, the issue is not with Cleanup Stack, and the panic code is still unknown.
    Otherwise your Format call is a candidate. %S expects the address of a descriptor, so passing buf_dialer (without the *) would be the right way. The other argument is not used by the format string (but the &buffer would be fine for an other %S, since it is the address of a descriptor).

  6. #6
    Registered User
    Join Date
    Sep 2008
    Location
    Vancouver, Canada
    Posts
    588

    Re: Does the use of StringLoader::LoadLC cause the symbian app to crash on few device

    thanks!
    you are absolutely correct!!
    had figured that out.

Similar Threads

  1. StringLoader::LoadLC in console application
    By lokesh_kumar_s in forum Symbian
    Replies: 5
    Last Post: 2009-07-24, 12:05
  2. StringLoader::LoadLC() fails...
    By MehulPatel in forum Symbian
    Replies: 6
    Last Post: 2008-04-24, 16:28
  3. StringLoader::LoadLC Problem
    By r.madhusudanan in forum Symbian
    Replies: 6
    Last Post: 2008-03-26, 12:03
  4. Problem with StringLoader::LoadLC
    By julienpfe in forum Symbian
    Replies: 2
    Last Post: 2007-02-15, 15:08
  5. StringLoader::LoadLC() Error????
    By sipi_chanchu in forum Symbian
    Replies: 8
    Last Post: 2006-12-29, 11:29

Posting Permissions

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