Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 30
  1. #1
    Registered User nstapleton's Avatar
    Join Date
    Apr 2009
    Posts
    43
    I am using TCommDbConnPref to discover the different IAPs available.

    When I run my app in phone debug mode my TCommDbConnPref object is described as Invalid Format.

    When I run it in emulator mode it is ok.

    I notice that the first phase constructor is not called in Phone debug mode but it is called in emulator mode.

    CHTTPEngine::CHTTPEngine(MClientObserver& aObserver)
    : iObserver(aObserver),
    iPostData(NULL),
    iRunning(EFalse),
    iConnectionSetupDone(EFalse),
    iPrevProfileId(-1)
    {

    }
    // Now we have the iap Id. Use it to connect for the connection
    TCommDbConnPref connectPref;
    // Setup preferences
    connectPref.SetDialogPreference(ECommDbDialogPrefDoNotPrompt);
    // Sets the CommDb ID of the IAP to use for this connection
    connectPref.SetIapId(iSelectedIap);
    // Start connection
    ------> User::LeaveIfError(iConnection.Start(connectPref)); //<------------------failing here
    Appreciate any guidance

  2. #2
    Regular Contributor mrudulpen's Avatar
    Join Date
    Feb 2007
    Location
    Tampere
    Posts
    368
    Hi,

    Are the variables iSelectedIap & iConnection initialized?

    Also what is the error you get?
    Regards

    - MVP
    "Dare To Dream" - A.P.J.Kalam

  3. #3
    Registered User nstapleton's Avatar
    Join Date
    Apr 2009
    Posts
    43
    Hi

    iSelectedIap is initialized; in this case to 3

    iConnection is also Invalid format. It is of type RConnection

    Not getting any error; just a panic and the application aborts.

    thanks

  4. #4
    Regular Contributor mrudulpen's Avatar
    Join Date
    Feb 2007
    Location
    Tampere
    Posts
    368
    Hi,

    You need to open a connection to SocketServe and then open a RConnection before you can use it further(iConnection.Start).

    Have a look at the code over here
    Regards

    - MVP
    "Dare To Dream" - A.P.J.Kalam

  5. #5
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    27,747
    Quote Originally Posted by nstapleton View Post
    Not getting any error; just a panic and the application aborts.
    "just a panic"... http://wiki.forum.nokia.com/index.ph...ded_panic_code

  6. #6
    Registered User nstapleton's Avatar
    Join Date
    Apr 2009
    Posts
    43
    Yes - I do that already:

    // IAP Selected
    // Open socket server and start the connection
    User::LeaveIfError(iSocketServ.Connect());
    User::LeaveIfError(iConnection.Open(iSocketServ));
    // Now we have the iap Id. Use it to connect for the connection
    TCommDbConnPref connectPref;
    // Setup preferences
    connectPref.SetDialogPreference(ECommDbDialogPrefDoNotPrompt);
    // Sets the CommDb ID of the IAP to use for this connection
    connectPref.SetIapId(iSelectedIap);
    // Start connection
    User::LeaveIfError(iConnection.Start(connectPref));
    I am convinced it is to with the "Invalid Format" of connectPref and iConnection. Can anyone explain that?

  7. #7
    Regular Contributor mrudulpen's Avatar
    Join Date
    Feb 2007
    Location
    Tampere
    Posts
    368
    Hi,

    Just Out of curiosity, iSelectedIap what is this initialized to?
    You can look up into the table using following
    Code:
    // initialize a view
         CCommsDbConnectionPrefTableView* commDBView =
         commDB->OpenConnectionPrefTableInRankOrderLC(ECommDbConnectionDirectionOutgoing);
    
    
         // go to the first record
         User::LeaveIfError(commDBView->GotoFirstRecord());
    
         // Declare a prefTableView Object.
         CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref pref;
    
         // read the connection preferences
         commDBView->ReadConnectionPreferenceL(pref);
         //TUint32 iapID = pref.iBearer.iIapId;
         iIapID = pref.iBearer.iIapId;
    In case of your code iIAPID == iSelectedIap

    Also check if there are any valid accesspoints on your device/Emulator
    Regards

    - MVP
    "Dare To Dream" - A.P.J.Kalam

  8. #8
    Registered User nstapleton's Avatar
    Join Date
    Apr 2009
    Posts
    43
    From debugging I know the value of iSelectedIap is 3

    I know that this is a valid access point as I have used the same point without failure. I downloaded the sample code from:

    http://www.forum.nokia.com/info/sw.n...I_Example.html

    When I run this app I can use it no problems.

    I am trying to adapt the same code to run it in my own application but I am getting a failure.

    I am still wondering why in my app, the first phase constructor is not called and the connectPref and iConnection are "Invalid Format" when I check them in debug.

  9. #9
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    27,747
    If you put a breakpoint on "User::LeaveIfError(iConnection.Start(connectPref));", and let the application run until that line, do you still see that "Invalid Format"?

  10. #10
    Registered User nstapleton's Avatar
    Join Date
    Apr 2009
    Posts
    43
    Yes - have checked that and I do still see the invalid format for both objects.

    Don't think this is significant but this is where I create my HTTP engine from:

    /**
    * Second-phase constructor for view.
    * Initialize contents from resource.
    */
    void CHTTPWorkContainerView::ConstructL()
    {
    // [[[ begin generated region: do not modify [Generated Code]
    BaseConstructL( R_HTTPWORK_CONTAINER_HTTPWORK_CONTAINER_VIEW );

    // ]]] end generated region [Generated Code]

    // add your own initialization code here
    ------->iEngine = CHTTPEngine::NewL(*this);<----------------------------------
    }
    Methods from the engine object are subsequently called from within CHTTPWorkContainerView

  11. #11
    Super Contributor mahbub_s60's Avatar
    Join Date
    Mar 2008
    Posts
    1,481
    Can you try to catch the leave code and see what is that in this line.
    User::LeaveIfError(iConnection.Start(connectPref)); //<------------------failing here

    Also could you check your connectPref is valid before starting the connection

  12. #12
    Registered User nstapleton's Avatar
    Join Date
    Apr 2009
    Posts
    43
    No the connectPref is not valid.

    Will post the leave code.

  13. #13
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    27,747
    Maybe it sounds a bit rude, but could you please forget debugging for a moment and tell us what panic code you get? Here is the method: install the application to your device. Install ErrRd as described in the article referred in #5. Then start the application on your device.

  14. #14
    Registered User nstapleton's Avatar
    Join Date
    Apr 2009
    Posts
    43
    Resolved the problem.

    Nothing was being written to the ErrRd file.

    Sorry guys for time wasting; It was an error in my resource file causing the crash.

  15. #15
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    27,747
    Who cares about the content of the ErrRd file? It is a flag: if it exists, the device shows you the error message. If it does not exist, the error message remains hidden.

Page 1 of 2 12 LastLast

Similar Threads

  1. Cannot create sis package?
    By gomcoite in forum Themes/Carbide.ui
    Replies: 4
    Last Post: 2008-09-27, 17:54
  2. Error in packaging process :(
    By a-eqla3 in forum Themes/Carbide.ui
    Replies: 2
    Last Post: 2008-07-30, 22:03
  3. Error in packaging process :(
    By a-eqla3 in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2008-07-24, 20:33
  4. ERROR IN CREATING THEME
    By ssmantri in forum Themes/Carbide.ui
    Replies: 5
    Last Post: 2008-05-29, 20:58
  5. Replies: 7
    Last Post: 2006-09-20, 23:46

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved