×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    Registered User
    Join Date
    Jun 2009
    Posts
    31

    Error: branch out of range

    HI,
    my app work fine on emulator and under desktop, when I want to deploy on 58OO.

    I got the message below:

    {standard input}: Assembler messages:

    {standard input}:29794: Error: branch out of range

    in fact ,It works before i make some modification on icon


    Regards

    Sanness
    Last edited by sanness; 2010-12-16 at 09:44.

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

    Re: Error: branch out of range

    How big is your application? Check out http://discussion.forum.nokia.com/fo...overlap-errors

    Also, if you have large images or other large files in your resource files, it may be better to remove them and use DEPLOYMENT instead. Large files in a resource file increase the size of your application's "memory footprint" that much.

  3. #3
    Registered User
    Join Date
    Jun 2009
    Posts
    31

    Re: Error: branch out of range

    Hi again,
    I delete all resource in my project.
    my project consist of just one widget with many tabWidget and button

    Any help please!!!!!!

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

    Re: Error: branch out of range


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

    Re: Error: branch out of range

    EDIT:
    What modifications to icon!?
    --
    This should go away if building for ARM (see thread danhicksbyron linked). You say you only have a small application?
    BL out of range is not a feature of small app and if indeed is a small application it should be considered error in the compiler.
    What version of GCCE you use ?

    Can you do
    Code:
    fromelf -z <object_file_where_error_comes_from>
    I suppose the object file is main.o since you talk about small project.
    To find out what is the largest relocation segment use:
    Code:
    fromelf -r <object_file_where_error_comes_from>
    And search for Size and give us the maximum you found.

    You can find the object files from epoc32\build\<project><target><release_target><release_mode> , happy browsing
    If you can't find anything interesting or extraordinary one place to look is data segments (fromelf -d).

  6. #6
    Registered User
    Join Date
    Jun 2009
    Posts
    31

    Re: Error: branch out of range

    Hi again,

    i copy all the compile history for more details.
    just another stupid question where to launch fromelf????

    regards
    Sana

    =========================

    ***Building project "Elmathbakh" for configuration "Phone Release (GCCE) [S60_5th_Edition_SDK_v1.0]"

    ***Printing environment variables modified from default:
    PATH=C:\S60\devices\S60_5th_Edition_SDK_v1.0\epoc32\tools;C:\S60\devices\S60_5th_Edition_SDK_v1.0\epoc32\gcc\bin;C:/Symbian/Tools/ADT_1.0/Carbide.c++/jre/bin/client;C:/Symbian/Tools/ADT_1.0/Carbide.c++/jre/bin;C:\STM\ST40R5.0.0\bin;C:\Program Files\Common Files\Symbian\Tools;C:\STM\STMCR1.4.0\bin;C:\STM\ST40R4.4.0\bin;C:\Symbian\Tools\ADT_1.0\Carbide.c++\x86Build\Symbian_Tools\Command_Line_Tools;C:\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ReflectionX\;C:\Program Files\CSL Arm Toolchain\bin;C:\Program Files\Rational\common;C:\Program Files\Rational\ClearCase\bin;\dvdbr-admin\scripts\user;\\tunnt013\perl\bin;c:\STM\bin;
    EPOCROOT=\S60\devices\S60_5th_Edition_SDK_v1.0\
    NO_DEPENDENCIES=-nd
    MAKE=make -j 4

    Working Directory: C:/MElmathbakh-5rd2010


    ***Invoking bldmake command
    perl.exe -S bldmake.pl bldfiles gcce

    Total Time: 2 sec

    ***Invoking abld command
    perl.exe -S ABLD.PL \MElmathbakh-5rd2010\ export
    make -r -f "\S60\devices\S60_5th_Edition_SDK_v1.0\EPOC32\BUILD\MElmathbakh-5rd2010\EXPORT.make" EXPORT VERBOSE=-s
    Nothing to do

    Total Time: 4 sec

    ***Generating abld makefile.

    ***Invoking abld command
    perl.exe -S ABLD.PL \MElmathbakh-5rd2010\ makefile gcce Makefile_0xE2F845DE
    make -r -f "\S60\devices\S60_5th_Edition_SDK_v1.0\EPOC32\BUILD\MElmathbakh-5rd2010\GCCE.make" MAKEFILEMAKEFILE_0XE2F845DE VERBOSE=-s
    make -j 4 -s -C \MElmathbakh-5rd2010 -f "MAKEFILE_0XE2F845DE.MK" TO_ROOT=.. EPOCBLD=\S60\devices\S60_5th_Edition_SDK_v1.0\EPOC32\BUILD\MAKEFILE_0XE2F845DE\GCCE TO_BLDINF=..\MElmathbakh-5rd2010 PLATFORM=GCCE MAKMAKE

    Total Time: 6 sec

    ***Generating abld makefile.

    ***Invoking abld command
    perl.exe -S ABLD.PL \MElmathbakh-5rd2010\ makefile gcce Elmathbakh_0xE2F845DE
    make -r -f "\S60\devices\S60_5th_Edition_SDK_v1.0\EPOC32\BUILD\MElmathbakh-5rd2010\GCCE.make" MAKEFILEELMATHBAKH_0XE2F845DE VERBOSE=-s
    perl -S makmake.pl -nd -D \MElmathbakh-5rd2010\ELMATHBAKH_0XE2F845DE GCCE

    Total Time: 8 sec

    ***Invoking abld command
    perl.exe -S ABLD.PL \MElmathbakh-5rd2010\ library gcce
    make -r -f "\S60\devices\S60_5th_Edition_SDK_v1.0\EPOC32\BUILD\MElmathbakh-5rd2010\GCCE.make" LIBRARY VERBOSE=-s
    make -s -C \MElmathbakh-5rd2010 -f "MAKEFILE_0XE2F845DE.MK" TO_ROOT=.. EPOCBLD=\S60\devices\S60_5th_Edition_SDK_v1.0\EPOC32\BUILD\MAKEFILE_0XE2F845DE\GCCE TO_BLDINF=..\MElmathbakh-5rd2010 PLATFORM=GCCE LIB
    make -s -r -f "\S60\devices\S60_5th_Edition_SDK_v1.0\EPOC32\BUILD\MElmathbakh-5rd2010\ELMATHBAKH_0XE2F845DE\GCCE\ELMATHBAKH_0XE2F845DE.GCCE" LIBRARY

    Total Time: 12 sec

    ***Invoking abld command
    perl.exe -S ABLD.PL \MElmathbakh-5rd2010\ resource gcce urel
    make -r -f "\S60\devices\S60_5th_Edition_SDK_v1.0\EPOC32\BUILD\MElmathbakh-5rd2010\GCCE.make" RESOURCE CFG=UREL VERBOSE=-s
    make -s -C \MElmathbakh-5rd2010 -f "MAKEFILE_0XE2F845DE.MK" TO_ROOT=.. EPOCBLD=\S60\devices\S60_5th_Edition_SDK_v1.0\EPOC32\BUILD\MAKEFILE_0XE2F845DE\GCCE TO_BLDINF=..\MElmathbakh-5rd2010 PLATFORM=GCCE CFG=UREL RESOURCE
    make -s -r -f "\S60\devices\S60_5th_Edition_SDK_v1.0\EPOC32\BUILD\MElmathbakh-5rd2010\ELMATHBAKH_0XE2F845DE\GCCE\ELMATHBAKH_0XE2F845DE.GCCE" RESOURCEUREL



    Total Time: 13 sec

    ***Invoking abld command
    perl.exe -S ABLD.PL \MElmathbakh-5rd2010\ target gcce urel
    make -r -f "\S60\devices\S60_5th_Edition_SDK_v1.0\EPOC32\BUILD\MElmathbakh-5rd2010\GCCE.make" TARGET CFG=UREL VERBOSE=-s
    make -j 4 -s -C \MElmathbakh-5rd2010 -f "MAKEFILE_0XE2F845DE.MK" TO_ROOT=.. EPOCBLD=\S60\devices\S60_5th_Edition_SDK_v1.0\EPOC32\BUILD\MAKEFILE_0XE2F845DE\GCCE TO_BLDINF=..\MElmathbakh-5rd2010 PLATFORM=GCCE CFG=UREL BLD
    make -j 4 -s -r -f "\S60\devices\S60_5th_Edition_SDK_v1.0\EPOC32\BUILD\MElmathbakh-5rd2010\ELMATHBAKH_0XE2F845DE\GCCE\ELMATHBAKH_0XE2F845DE.GCCE" UREL
    elmathbakh.cpp
    /MElmathbakh-5rd2010/elmathbakh.cpp: In member function `void Elmathbakh:n_PoidsIdealPB_clicked()':
    /MElmathbakh-5rd2010/elmathbakh.cpp:89: warning: converting to `int' from `double'
    /MElmathbakh-5rd2010/elmathbakh.cpp: In member function `void Elmathbakh::insertData(QString, QString, int)':
    /MElmathbakh-5rd2010/elmathbakh.cpp:576: warning: comparison between signed and unsigned integer expressions
    /MElmathbakh-5rd2010/elmathbakh.cpp: In member function `void Elmathbakh::reset()':
    /MElmathbakh-5rd2010/elmathbakh.cpp:640: warning: comparison between signed and unsigned integer expressions
    {standard input}: Assembler messages:
    {standard input}:28824: Error: branch out of range
    make[1]: *** [\S60\devices\S60_5th_Edition_SDK_v1.0\EPOC32\BUILD\MElmathbakh-5rd2010\ELMATHBAKH_0XE2F845DE\GCCE\urel\Elmathbakh.o] Error 1
    make: *** [TARGETELMATHBAKH_0XE2F845DE] Error 2

    Total Time: 39 sec

    ***Invoking abld command
    perl.exe -S ABLD.PL \MElmathbakh-5rd2010\ final gcce urel
    make -r -f "\S60\devices\S60_5th_Edition_SDK_v1.0\EPOC32\BUILD\MElmathbakh-5rd2010\GCCE.make" FINAL CFG=UREL VERBOSE=-s
    make -j 4 -s -C \MElmathbakh-5rd2010 -f "MAKEFILE_0XE2F845DE.MK" TO_ROOT=.. EPOCBLD=\S60\devices\S60_5th_Edition_SDK_v1.0\EPOC32\BUILD\MAKEFILE_0XE2F845DE\GCCE TO_BLDINF=..\MElmathbakh-5rd2010 PLATFORM=GCCE CFG=UREL FINAL

    Total Time: 48 sec

    ***Invoking abld command
    perl.exe -S ABLD.PL \MElmathbakh-5rd2010\ test export
    make -r -f "\S60\devices\S60_5th_Edition_SDK_v1.0\EPOC32\BUILD\MElmathbakh-5rd2010\EXPORTtest.make" EXPORT VERBOSE=-s
    Nothing to do

    Total Time: 48 sec

    ***Errors were detected in build. See the Problems or Console view for details.

    Total Time: 48 sec

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

    Re: Error: branch out of range

    How many lines of code is elmathbakh.cpp? Are you declaring any static variables in it?

  8. #8
    Registered User
    Join Date
    Jun 2009
    Posts
    31

    Re: Error: branch out of range

    Hi,
    elmathbak.cpp contains 1280 lines ( 50 lines comments).

    the is no static declaration !!!

    can the .ui file has any impact on this or the related moc?????

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

    Re: Error: branch out of range

    fromelf is part of RVCT, sorry. GCCE equivalent is arm-none-symbianelf-objdump.exe which you can find in <GCCE>/bin.

    This error is hard to debug without going to assembly level, so prepare with lots of coffee.
    Use objdump to dissamble the code and paste the failing BL instruction. I want to see where it tries to jump.
    Then you need to search for the label and that is why I wanted to see the relocation entries.

    Also the code snippet after and before the modifications would be useful to see that you are not doing something that could cause this.

    moc naturally has impact on .o size if included in the cpp. One thing to try is to split up the cpp file to 2 and see if the error goes away. This means bit of refactoring.

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

    Re: Error: branch out of range

    Since this doesn't happen with any frequency (in fact, first I've heard of it), I'm guessing there's a source bug or at least an "unusual construct" in the C++ source -- very possibly not a compiler bug at all, except that it's not diagnosing bad source when it should. The thing to do is to comment out portions of the code (it doesn't have to be executable, just "legal" to compile). Find out what area, when commented out, allows the module to compile. Then comment out less and less until the bug appears again. Likely this will point to something like a dodgy switch statement.

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

    Re: Error: branch out of range

    I agree with danhicksbyron here, this is most likely caused by conditional branching in switch case. Do you have large switch case, extra bonus if with goto statements?
    Since you already know which lines create the error it should be easy to weed out the bad ones. You could satisfy my curiosity by posting them here too

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

    Re: Error: branch out of range

    [never mind]

  13. #13
    Registered User
    Join Date
    Jun 2009
    Posts
    31

    Re: Error: branch out of range

    Hi again,
    thanks a lot guys
    in fact i have a lot of switch case in my code.
    I will go to commemt one by one.
    when i find the bug i will go back to you jakoskin
    cheers
    sanness

  14. #14
    Registered User
    Join Date
    Jun 2009
    Posts
    31

    Re: Error: branch out of range

    Hi,
    i finally find the source of error but i cann't understand the real pb:
    i have the function below:

    I call this 2 lines 200 times , at each time i change the ASCII code, the error is caused when arriving 200, 199 times error compile without error

    item2 =QApplication::translate("ElmathbakhClass", "\330\263\330\261\330\257\331\212\331\206 \331\205\330\271\331\204\330\250\330\251", 0, QApplication::UnicodeUTF8);
    insertData(item1,item2,201);
    =======
    void Elmathbakh::insertData(QString qsCat, QString qsElt, int iCal)
    {
    int iIndex=ui.m_cbCat->findText(qsCat);
    if(iIndex==-1)
    {
    iIndex=ui.m_cbCat->count();
    ui.m_cbCat->addItem(qsCat);
    }
    if(m_listVector.size()<=iIndex)
    m_listVector.resize(iIndex+1);

    m_listVector[iIndex]<<qsElt;
    int iIndexElt=m_listVector[iIndex].size()-1;
    m_DataCal.addDataCal(iIndex, iIndexElt, iCal);

    }

    typedef vector<QStringList> listVector;
    DataCal m_DataCal; // typedef QMap<int,TypeMap*> CatMap;
    listVector m_listVector;
    ====================
    any explication for this pb?

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

    Re: Error: branch out of range

    What happens if you move the logic for that 200th time into a separate method and call it from the original method?

    Or maybe declare new variable item2a and use that?

Similar Threads

  1. Replies: 11
    Last Post: 2010-06-28, 23:22
  2. ordinal not in range
    By mugvin in forum Symbian
    Replies: 2
    Last Post: 2008-05-23, 07:01
  3. user set branch parameter in jain-sip via header?
    By vkunapuli in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2007-09-28, 17:13
  4. Connectivity range
    By Mrlb in forum Bluetooth Technology
    Replies: 1
    Last Post: 2003-08-18, 00:18
  5. Temperature range
    By devilsmartini in forum Nokia M2M
    Replies: 1
    Last Post: 1970-01-01, 02:00

Posting Permissions

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