×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Sep 2010
    Posts
    31

    try catch with QT for Symbian

    Dear Folks,

    we are using Carbide++, QT for symbian, QT 4.7.0 and we are developing our application for S60 3rd release FP2 SDK to develop an Application for S60 3rdRelease FP2 based mobile phones..

    In our application we are catching the thrown exceptions using "catch( std::exception& e )" and in that "catch" we would like to throw the same exception ...

    If we do so, the application crashes .....

    Since we are using this catch in some of the global methods and in some of the non-QT class methods, we would like to catch the exception again in some of our QT classes which use those global methods and non-Qt class methods and from there we would like to show an errorscreen ...


    // global method
    void globalMethod ( ) {

    try {

    catch( std:exception& e ) {
    throw e; // ******* here the system crashes

    /// or we tried using just throw;

    }
    }

    class QTClass : public QWidget {

    public:

    void myQTClassMethod ( ) {

    try {

    } catch ( std::exception& e ) {

    // we are trying to showan Error screen from here through emit
    emit showErrorScreen();
    }

    };

    please assume that we are using the necessary, signals and other procedures to show the error screen and please assume that there are no syntax errors...

    My question to the folks is why is the system crashing at "throw" of that global method's "catch" block... and how to over come this issue...

    we are using Carbide, QT for symbian, QT 4.7.0 and we are developing our application for S60 3rd release FP2 SDK

    I am appreciating your answers/solutions in advance ... Thanking you...

    regarding ...

    Sundar

  2. #2
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    286

    Re: try catch with QT for Symbian

    Hi, your issue is most likely this http://bugreports.qt.nokia.com/browse/QTBUG-4852 which means you cannot have nested try-catch blocks in Symbian.

    If you get this in WINSCW then it could be too old version of Nokia x86 compiler.

    EDIT:
    One thing, isn't rethrow syntax just to call throw; without any object in it.

    -Janne
    Last edited by jakoskin; 2010-12-10 at 10:51.

  3. #3
    Registered User
    Join Date
    Sep 2010
    Posts
    31

    Re: try catch with QT for Symbian

    Hi Janne,

    Thank you for the quick response... But We are not using nested try catch and the Carbide C++ which we are using is the latest 2.3 version....We tried calling throw without any parameters too ... but without any success

  4. #4
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    286

    Re: try catch with QT for Symbian

    Ok so you get this with both on hardware and emulator ? Do you use GCCE or RCVT to build for HW? what version?
    "armcc --help" for RVCT
    "arm-none-symbianelf-gcc.exe --version" for GCCE
    "mwccsym2 -v" for WINSCW

    Carbide 2.3 isn't the latest. Latest available from Symbian Foundation is 2.6 and if you look at this http://bugreports.qt.nokia.com/browse/QTBUG-7132 there is a comment that fixed crash in Carbide 2.5 toolchain.

    -Janne

  5. #5
    Registered User
    Join Date
    Sep 2010
    Posts
    31

    Re: try catch with QT for Symbian

    Hi Janne,

    Thank you again .... I was trying my application with the emulator and haven't tried with the Hardware..

    Thank you for the link too which depicts that 2.6 is the latest version...

    regards,
    Sundar

  6. #6
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: try catch with QT for Symbian

    Have you reviewed this?

  7. #7
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    286

    Re: try catch with QT for Symbian

    We were able to run rethrowing code on 3.x devices, so the issue is old version of Carbide.
    I'm not sure if it helps just to upgrade the compiler or will you need the whole toolchain. Carbide 2.6 is available from Symbian Foundation website but beware that it will be closed in few days.
    I don't know what happens to Carbide distribution after the closing, I would assume it moves back to Forum Nokia.

  8. #8
    Registered User
    Join Date
    Sep 2010
    Posts
    31

    Re: try catch with QT for Symbian

    Quote Originally Posted by danhicksbyron View Post
    Have you reviewed this?
    Thank you ...

  9. #9
    Registered User
    Join Date
    Sep 2010
    Posts
    31

    Re: try catch with QT for Symbian

    Quote Originally Posted by jakoskin View Post
    We were able to run rethrowing code on 3.x devices, so the issue is old version of Carbide.
    I'm not sure if it helps just to upgrade the compiler or will you need the whole toolchain. Carbide 2.6 is available from Symbian Foundation website but beware that it will be closed in few days.
    I don't know what happens to Carbide distribution after the closing, I would assume it moves back to Forum Nokia.
    Thank you ...

  10. #10
    Registered User
    Join Date
    Sep 2010
    Posts
    31

    Re: try catch with QT for Symbian

    Hi folks,

    Thank you for the responses... I am facing a new problem after upgrading my Carbide C++ IDE from 2.3 to 2.6 ..... the new upgraded version of IDE ( ie 2.6 ) crashes, if i add a new class or if i paste header/source files to the existing workspace ..( it never happened with 2.3 )... in this scenario, do i require any patch to overcome this ...

    we are using SVN with the Carbide C++ IDE...( we integrated SVN with the old 2.3 IDE )...

    Appreciate your responses .... thanking you...

Similar Threads

  1. how to use try/catch?
    By komomo in forum Mobile Java General
    Replies: 4
    Last Post: 2010-06-21, 19:15
  2. Replies: 8
    Last Post: 2010-01-18, 06:31
  3. try catch and active objects
    By vishwas_vincy11 in forum Symbian
    Replies: 1
    Last Post: 2007-02-01, 18:12
  4. try catch finally dilema
    By swc43@blueyonder.co.uk in forum Mobile Java General
    Replies: 1
    Last Post: 2005-02-03, 12:20

Posting Permissions

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