Meaning of exit code 139

49,696 views
Skip to first unread message

Neeraj Mudgil

unread,
Mar 29, 2012, 2:20:13 AM3/29/12
to omnetpp
Hello Everyone,

Can anyone please tell me what is the meaning of exit code 139 in omnet++ ?

Thank you!

--
Neeraj Mudgil
M.Tech Computer Engg.(2010-12)
NIT Kurukshetra


(¨`·.·´¨) Alwayz
`·.¸(¨`·.·´¨) Keep
       (¨`·.·´¨)¸.·´ Smiling!
        `·.¸.·´


Sagar Pareek

unread,
Mar 29, 2012, 4:35:08 AM3/29/12
to omn...@googlegroups.com
There must be some other errors too
check out other details in console...


--
Sent from the OMNeT++ mailing list. To configure your membership,
visit http://groups.google.com/group/omnetpp



--
KIND REGARDS --
SAGAR PAREEK
COMPUTER SCIENCE AND ENGINEERING
NIT ALLAHABAD

Rudolf Hornig

unread,
Mar 29, 2012, 3:32:58 PM3/29/12
to omn...@googlegroups.com
Unix systems return errono 128+signal when a signal received. 128 + 11 = 139 . SIgnal 11 is SIGSEV (i.e. segmentation violation). = There is a memory access bug in your C++ code.

Rudolf

Sagar Pareek

unread,
Mar 29, 2012, 4:58:24 PM3/29/12
to omn...@googlegroups.com
Yes Rudolf sir is correct...
I too got the same problem...Now you have to self examine where ur segfault is coming

Daniel Pfefferkorn

unread,
Mar 30, 2012, 3:57:04 AM3/30/12
to omn...@googlegroups.com
As Rudolf indicated this is a segmentation fault or "seg fault".

You can very easily find the problematic code lines using valgrind. An
example for a valgrind call could be:

valgrind --leak-check=full --track-origins=yes --show-reachable=yes
--log-file=valgrindlog.txt ./NAME_OF_YOUR_EXECUTABLE -r RUN_NUMBER -u
Cmdenv -c NAME_OF_YOUR_CONFIGURATION -n NED_PATH1; NED_PATH2 -l
LIB_PATH1 -l LIB_PATH2 --record-eventlog=false --debug-on-errors=false
./omnetpp.ini

All errors that occur will be logged to valgrindlog.txt and you can
check the sometimes rather lengthy file for the code lines resulting in
either memory holes or "seg faults".


Am 29.03.2012 21:32, schrieb Rudolf Hornig:
> Unix systems return errono 128+signal when a signal received. 128 + 11 =
> 139 . SIgnal 11 is SIGSEV (i.e. segmentation violation). = There is a
> memory access bug in your C++ code.
>
> Rudolf
>
> On Thu, Mar 29, 2012 at 10:35 AM, Sagar Pareek <sagar...@gmail.com
> <mailto:sagar...@gmail.com>> wrote:
>
> There must be some other errors too
> check out other details in console...
>
>
> On Thu, Mar 29, 2012 at 11:50 AM, Neeraj Mudgil
> <mudgil...@gmail.com <mailto:mudgil...@gmail.com>> wrote:
>
> Hello Everyone,
>
> Can anyone please tell me what is the meaning of exit code 139
> in omnet++ ?
>
> Thank you!
>
> --
> Neeraj Mudgil
> M.Tech Computer Engg.(2010-12)
> NIT Kurukshetra
>

> */
> /**/(�`�.���) Alwayz


> `�.�(�`�.���) Keep
> (�`�.���)�.�� Smiling!

> `�.�.�� /*


>
> --
> Sent from the OMNeT++ mailing list. To configure your membership,
> visit http://groups.google.com/group/omnetpp
>
>
>
>
> --

> /**/KIND REGARDS --


> SAGAR PAREEK
> COMPUTER SCIENCE AND ENGINEERING
> NIT ALLAHABAD
>
> --
> Sent from the OMNeT++ mailing list. To configure your membership,
> visit http://groups.google.com/group/omnetpp
>
>

Rudolf Hornig

unread,
Mar 30, 2012, 4:28:54 AM3/30/12
to omn...@googlegroups.com
I'm not sure everybody knows, but a tip for today :)

OMNeT++ IDE contais CDT's Linux Tools project and it can start valgrind too (if installed in your distro). 

Choose the project in question in the project explorer, right click and select Profile As.. | OMNeT++ simulation.
After running your project, the valgrind output will appear in a separate view at the bottom...

Rudolf

>         /**/(จ`ท.ทดจ) Alwayz
>         `ท.ธ(จ`ท.ทดจ) Keep
>                (จ`ท.ทดจ)ธ.ทด Smiling!
>                 `ท.ธ.ทด /*

Sagar Pareek

unread,
Mar 30, 2012, 4:34:25 AM3/30/12
to omn...@googlegroups.com
Debug is another option

Humberto Escudero Argumanez

unread,
Mar 30, 2012, 4:33:59 AM3/30/12
to omn...@googlegroups.com
The best answer forever ever
How do we link valgrind with OMNeT????

On 03/30/2012 10:28 AM, Rudolf Hornig wrote:
> I'm not sure everybody knows, but a tip for today :)
>
> OMNeT++ IDE contais CDT's Linux Tools project and it can start
> valgrind too (if installed in your distro).
>
> Choose the project in question in the project explorer, right click
> and select Profile As.. | OMNeT++ simulation.
> After running your project, the valgrind output will appear in a
> separate view at the bottom...
>
> Rudolf
>
> On Fri, Mar 30, 2012 at 9:57 AM, Daniel Pfefferkorn
> <daniel.pf...@ims.uni-hannover.de

> <mailto:daniel.pf...@ims.uni-hannover.de>> wrote:
>
> As Rudolf indicated this is a segmentation fault or "seg fault".
>
> You can very easily find the problematic code lines using valgrind. An
> example for a valgrind call could be:
>
> valgrind --leak-check=full --track-origins=yes --show-reachable=yes
> --log-file=valgrindlog.txt ./NAME_OF_YOUR_EXECUTABLE -r RUN_NUMBER -u
> Cmdenv -c NAME_OF_YOUR_CONFIGURATION -n NED_PATH1; NED_PATH2 -l
> LIB_PATH1 -l LIB_PATH2 --record-eventlog=false --debug-on-errors=false
> ./omnetpp.ini
>
> All errors that occur will be logged to valgrindlog.txt and you can
> check the sometimes rather lengthy file for the code lines
> resulting in
> either memory holes or "seg faults".
>
>

> Am 29.03.2012 <tel:29.03.2012> 21:32, schrieb Rudolf Hornig:
> > Unix systems return errono 128+signal when a signal received.
> 128 + 11 =
> > 139 . SIgnal 11 is SIGSEV (i.e. segmentation violation). = There
> is a
> > memory access bug in your C++ code.
> >
> > Rudolf
> >
> > On Thu, Mar 29, 2012 at 10:35 AM, Sagar Pareek
> <sagar...@gmail.com <mailto:sagar...@gmail.com>

> > <mailto:sagar...@gmail.com <mailto:sagar...@gmail.com>>>


> wrote:
> >
> > There must be some other errors too
> > check out other details in console...
> >
> >
> > On Thu, Mar 29, 2012 at 11:50 AM, Neeraj Mudgil
> > <mudgil...@gmail.com <mailto:mudgil...@gmail.com>

> <mailto:mudgil...@gmail.com <mailto:mudgil...@gmail.com>>>

Daniel Pfefferkorn

unread,
Mar 30, 2012, 4:39:10 AM3/30/12
to omn...@googlegroups.com
Debug is only for in-depth testing of a non-crashing sim.
If you get a segfault, then your simulation crashes and you will have to
restart the debug session.

If you want to determine what kind of non-algorithmic errors there are
in your code (mem access etc.) it saves a lot of time to go with
valgrind directly IMHO.

Cheers,
Dan

Am 30.03.2012 10:34, schrieb Sagar Pareek:
> Debug is another option
>
> On Fri, Mar 30, 2012 at 1:58 PM, Rudolf Hornig <rudolf...@gmail.com
> <mailto:rudolf...@gmail.com>> wrote:
>
> I'm not sure everybody knows, but a tip for today :)
>
> OMNeT++ IDE contais CDT's Linux Tools project and it can start
> valgrind too (if installed in your distro).
>
> Choose the project in question in the project explorer, right click
> and select Profile As.. | OMNeT++ simulation.
> After running your project, the valgrind output will appear in a
> separate view at the bottom...
>
> Rudolf
>
> On Fri, Mar 30, 2012 at 9:57 AM, Daniel Pfefferkorn
> <daniel.pf...@ims.uni-hannover.de

> > <mailto:sagar...@gmail.com <mailto:sagar...@gmail.com>>>


> wrote:
> >
> > There must be some other errors too
> > check out other details in console...
> >
> >
> > On Thu, Mar 29, 2012 at 11:50 AM, Neeraj Mudgil
> > <mudgil...@gmail.com <mailto:mudgil...@gmail.com>

> <mailto:mudgil...@gmail.com <mailto:mudgil...@gmail.com>>>


> wrote:
> >
> > Hello Everyone,
> >
> > Can anyone please tell me what is the meaning of exit
> code 139
> > in omnet++ ?
> >
> > Thank you!
> >
> > --
> > Neeraj Mudgil
> > M.Tech Computer Engg.(2010-12)
> > NIT Kurukshetra
> >
> > */

> > /**/(๏ฟฝ`๏ฟฝ.๏ฟฝ๏ฟฝ๏ฟฝ) Alwayz
> > `๏ฟฝ.๏ฟฝ(๏ฟฝ`๏ฟฝ.๏ฟฝ๏ฟฝ๏ฟฝ) Keep
> > (๏ฟฝ`๏ฟฝ.๏ฟฝ๏ฟฝ๏ฟฝ)๏ฟฝ.๏ฟฝ๏ฟฝ Smiling!
> > `๏ฟฝ.๏ฟฝ.๏ฟฝ๏ฟฝ /*

Daniel Pfefferkorn

unread,
Mar 30, 2012, 4:40:32 AM3/30/12
to omn...@googlegroups.com
That's why friday's can be awesome.
Thank you, Rudolf!

Cheers,
Daniel


Am 30.03.2012 10:28, schrieb Rudolf Hornig:
> I'm not sure everybody knows, but a tip for today :)
>
> OMNeT++ IDE contais CDT's Linux Tools project and it can start valgrind
> too (if installed in your distro).
>
> Choose the project in question in the project explorer, right click and
> select Profile As.. | OMNeT++ simulation.
> After running your project, the valgrind output will appear in a
> separate view at the bottom...
>
> Rudolf
>
> On Fri, Mar 30, 2012 at 9:57 AM, Daniel Pfefferkorn
> <daniel.pf...@ims.uni-hannover.de

> <mailto:daniel.pf...@ims.uni-hannover.de>> wrote:
>
> As Rudolf indicated this is a segmentation fault or "seg fault".
>
> You can very easily find the problematic code lines using valgrind. An
> example for a valgrind call could be:
>
> valgrind --leak-check=full --track-origins=yes --show-reachable=yes
> --log-file=valgrindlog.txt ./NAME_OF_YOUR_EXECUTABLE -r RUN_NUMBER -u
> Cmdenv -c NAME_OF_YOUR_CONFIGURATION -n NED_PATH1; NED_PATH2 -l
> LIB_PATH1 -l LIB_PATH2 --record-eventlog=false --debug-on-errors=false
> ./omnetpp.ini
>
> All errors that occur will be logged to valgrindlog.txt and you can
> check the sometimes rather lengthy file for the code lines resulting in
> either memory holes or "seg faults".
>
>
> Am 29.03.2012 <tel:29.03.2012> 21:32, schrieb Rudolf Hornig:
> > Unix systems return errono 128+signal when a signal received. 128
> + 11 =
> > 139 . SIgnal 11 is SIGSEV (i.e. segmentation violation). = There is a
> > memory access bug in your C++ code.
> >
> > Rudolf
> >
> > On Thu, Mar 29, 2012 at 10:35 AM, Sagar Pareek
> <sagar...@gmail.com <mailto:sagar...@gmail.com>

> > <mailto:sagar...@gmail.com <mailto:sagar...@gmail.com>>> wrote:
> >
> > There must be some other errors too
> > check out other details in console...
> >
> >
> > On Thu, Mar 29, 2012 at 11:50 AM, Neeraj Mudgil
> > <mudgil...@gmail.com <mailto:mudgil...@gmail.com>

> <mailto:mudgil...@gmail.com <mailto:mudgil...@gmail.com>>> wrote:
> >
> > Hello Everyone,
> >
> > Can anyone please tell me what is the meaning of exit code 139
> > in omnet++ ?
> >
> > Thank you!
> >
> > --
> > Neeraj Mudgil
> > M.Tech Computer Engg.(2010-12)
> > NIT Kurukshetra
> >
> > */

> > /**/(๏ฟฝ`๏ฟฝ.๏ฟฝ๏ฟฝ๏ฟฝ) Alwayz
> > `๏ฟฝ.๏ฟฝ(๏ฟฝ`๏ฟฝ.๏ฟฝ๏ฟฝ๏ฟฝ) Keep
> > (๏ฟฝ`๏ฟฝ.๏ฟฝ๏ฟฝ๏ฟฝ)๏ฟฝ.๏ฟฝ๏ฟฝ Smiling!

> > `๏ฟฝ.๏ฟฝ.๏ฟฝ๏ฟฝ /*

Rudolf Hornig

unread,
Mar 30, 2012, 5:34:26 AM3/30/12
to omn...@googlegroups.com
You don't have to link with valgrind. It's a processor emulator. You can run the compiled code WITHOUT any change at all. Think it as a different kind of (automatic) debugger...

Rudolf

On Fri, Mar 30, 2012 at 10:33 AM, Humberto Escudero Argumanez <humberto.escu...@fkie.fraunhofer.de> wrote:
The best answer forever ever
How do we link valgrind with OMNeT????


On 03/30/2012 10:28 AM, Rudolf Hornig wrote:
I'm not sure everybody knows, but a tip for today :)

OMNeT++ IDE contais CDT's Linux Tools project and it can start valgrind too (if installed in your distro).

Choose the project in question in the project explorer, right click and select Profile As.. | OMNeT++ simulation.
After running your project, the valgrind output will appear in a separate view at the bottom...

Rudolf

Neeraj Mudgil

unread,
Mar 30, 2012, 8:20:05 PM3/30/12
to omn...@googlegroups.com
Thanks to all of you for the discussion and a special thanks to Rudolf sir and Daniel Sir discussion on valgrind. Can any one please tell me valgrind package comes with omnet++ 4.1 or I have to separately install it. How I can ensure whether valgrind is included in my distro??? 
Contact: 09992300873

(¨`·.·´¨) Alwayz

`·.¸(¨`·.·´¨) Keep
       (¨`·.·´¨)¸.·´ Smiling!
        `·.¸.·´

Neeraj Mudgil

unread,
Mar 30, 2012, 8:44:53 PM3/30/12
to omn...@googlegroups.com
Hello Everyone,

I have following function in my code.

void BIIR:: sendDataPacket(BIIR_Packet *packet) {

   if(!outstandingRREQList.getByDestAddr(destAddr.getInt(),32)){

     sendDown(packet,LL_VANET_ROUTERS.getInt());
     BIIR_OutstandingRREQ* outstandingRREQ=new BIIR_OutstandingRREQ;
     outstandingRREQ->tries=1;
     outstandingRREQ->wait_time=new BIIR_Timer(this,"REQ_WAIT_TIME");
     outstandingRREQ->wait_time->start(REQ_WAIT_TIME);
     outstandingRREQ->destAddr=destAddr.getInt();
     outstandingRREQ->creationTime=simTime();
     outstandingRREQList.add(outstandingRREQ);
   }
     /* Also Store the packet in a Queue*/

     cQueue * queuedElements; //declared as global variable in actual project in .h file.
     QueueElement* qElement=new QueueElement(packet->getDestAddress(),myAddr,packet);
     ev.printf("\n I am saving the packet in a Queue");
     queuedElements->insert(qElement);

}

void BIIR:: sendDown(cPacket*apMsg,int destAddr)
{
    ev.printf("\n Inside Method Send Down\n");
    simtime_t jitter = dblrand() * MAXJITTER;
    const BIIR_Packet *pkt=dynamic_cast<const BIIR_Packet*>(apMsg);
   
        .
        .
        .

    sendDelayed(apMsg, jitter, mLowergateOut[0]);
           
}



where, BIIR_OutstandingRREQ,  BIIR_OutstadingRREQList and QueueElement  are classes defined as follows.

class BIIR_OutstandingRREQ {
    public:
        unsigned int tries;
        BIIR_Timer* wait_time;
        unsigned int destAddr;
        simtime_t creationTime;

    public:
        friend std::ostream& operator<<(std::ostream& os, const BIIR_OutstandingRREQ& o);
};
class BIIR_OutstandingRREQList : public cObject
{
    public:
        BIIR_OutstandingRREQList();
        ~BIIR_OutstandingRREQList();

        /** @brief inherited from cObject */
        virtual const char* getFullName() const;

        /** @brief inherited from cObject */
        virtual std::string info() const;

        /** @brief inherited from cObject */
        virtual std::string detailedInfo() const;


        void add(BIIR_OutstandingRREQ* outstandingRREQ);
        BIIR_OutstandingRREQ* getByDestAddr(unsigned int destAddr, int prefix);

};


void BIIR_OutstandingRREQList::add(BIIR_OutstandingRREQ* outstandingRREQ) {
    outstandingRREQs.push_back(outstandingRREQ);
}

BIIR_OutstandingRREQ* getByDestAddr(unsigned int destAddr, int prefix) {
.
.
.
}
                

 class QueueElement : public cPacket
{
    public:
        QueueElement(){destAddr=0; srcAddr = 0;obj = NULL; };

        QueueElement(unsigned int destAddr, unsigned int srcAddr, BIIR_Packet* obj){
            this->destAddr = destAddr;
            this->srcAddr = srcAddr;
            this->obj = obj;
        };
        virtual ~QueueElement(){};
       
    private:
        unsigned int destAddr;
        unsigned int srcAddr;
        BIIR_Packet* obj;

};

 
This function works correctly until simtime reaches 2525 s . But terminates with exit code 139 after that . Moreover if I remove the 2 lines in black color in the sendDataPacket() function then program does not terminate and keeps running until simtime limit reaches. Can now anyone tell me please where I am doing mistake. I am stalled by this error.


Thank You !

Rudolf Hornig

unread,
Mar 31, 2012, 10:02:58 AM3/31/12
to omn...@googlegroups.com
I was referring omnet 4.2 regarding the linux tools integration. 4.1 does not have the valgrind profiler support.

valgrind is not bundled with omnet. Use your distro's package manager to install it.
Rudolf

Neeraj Mudgil

unread,
Mar 31, 2012, 10:47:25 AM3/31/12
to omn...@googlegroups.com
Thank you very much sir for reply. i installed valgrind successfully.
But I am not able to use it as when I am trying to run it using the
command format as told by Daniel sir it does not run. can u please
tell me in detail how I can use valgrind to debug my program. i am
using opensuse 11.4 and my project is contained in the veins (which is
based on inet framework) itself.

>>>>> daniel.pf...@ims.uni-**hannover.de<daniel.pf...@ims.uni-hannover.de><mailto:
>>>>> daniel.pfefferkorn@**ims.uni-hannover.de<daniel.pf...@ims.uni-hannover.de>>>

>>>>> > <mailto:sagar...@gmail.com <mailto:sagar...@gmail.com>**>>


>>>>>
>>>>> wrote:
>>>>> >
>>>>> > There must be some other errors too
>>>>> > check out other details in console...
>>>>> >
>>>>> >
>>>>> > On Thu, Mar 29, 2012 at 11:50 AM, Neeraj Mudgil

>>>>> > <mudgil...@gmail.com <mailto:mudgil...@gmail.com**>
>>>>> <mailto:mudgil...@gmail.com <mailto:mudgil...@gmail.com**>>>


>>>>>
>>>>> wrote:
>>>>> >
>>>>> > Hello Everyone,
>>>>> >
>>>>> > Can anyone please tell me what is the meaning of exit
>>>>> code 139
>>>>> > in omnet++ ?
>>>>> >
>>>>> > Thank you!
>>>>> >
>>>>> > --
>>>>> > Neeraj Mudgil
>>>>> > M.Tech Computer Engg.(2010-12)
>>>>> > NIT Kurukshetra
>>>>> >
>>>>> > */
>>>>> > /**/(จ`ท.ทดจ) Alwayz
>>>>> > `ท.ธ(จ`ท.ทดจ) Keep
>>>>> > (จ`ท.ทดจ)ธ.ทด Smiling!
>>>>> > `ท.ธ.ทด /*
>>>>> >
>>>>> > --
>>>>> > Sent from the OMNeT++ mailing list. To configure your
>>>>> membership,
>>>>> > visit

>>>>> http://groups.google.com/**group/omnetpp<http://groups.google.com/group/omnetpp>


>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> > --
>>>>> > /**/KIND REGARDS --
>>>>> > SAGAR PAREEK
>>>>> > COMPUTER SCIENCE AND ENGINEERING
>>>>> > NIT ALLAHABAD
>>>>> >
>>>>> > --
>>>>> > Sent from the OMNeT++ mailing list. To configure your
>>>>> membership,
>>>>> > visit

>>>>> http://groups.google.com/**group/omnetpp<http://groups.google.com/group/omnetpp>


>>>>> >
>>>>> >
>>>>> > --
>>>>> > Sent from the OMNeT++ mailing list. To configure your membership,
>>>>> > visit

>>>>> http://groups.google.com/**group/omnetpp<http://groups.google.com/group/omnetpp>


>>>>>
>>>>> --
>>>>> Sent from the OMNeT++ mailing list. To configure your membership,
>>>>> visit

>>>>> http://groups.google.com/**group/omnetpp<http://groups.google.com/group/omnetpp>


>>>>>
>>>>>
>>>>> --
>>>>> Sent from the OMNeT++ mailing list. To configure your membership,
>>>>> visit

>>>>> http://groups.google.com/**group/omnetpp<http://groups.google.com/group/omnetpp>


>>>>>
>>>>
>>>> --
>>>> Sent from the OMNeT++ mailing list. To configure your membership, visit

>>>> http://groups.google.com/**group/omnetpp<http://groups.google.com/group/omnetpp>


>>>>
>>>
>>> --
>>> Sent from the OMNeT++ mailing list. To configure your membership,
>>> visit http://groups.google.com/group/omnetpp
>>>
>>
>>
>>
>> --
>> Neeraj Mudgil
>> M.Tech Computer Engg.(2010-12)
>> NIT Kurukshetra
>> Contact: 09992300873

>> *
>> **(¨`·.·´¨) Alwayz


>> `·.¸(¨`·.·´¨) Keep
>> (¨`·.·´¨)¸.·´ Smiling!

>> `·.¸.·´ *


>>
>> --
>> Sent from the OMNeT++ mailing list. To configure your membership,
>> visit http://groups.google.com/group/omnetpp
>>
>
> --
> Sent from the OMNeT++ mailing list. To configure your membership,
> visit http://groups.google.com/group/omnetpp
>


--
Neeraj Mudgil
M.Tech Computer Engg.(2010-12)
NIT Kurukshetra
Contact: 09992300873

*
**(¨`·.·´¨) Alwayz


`·.¸(¨`·.·´¨) Keep
(¨`·.·´¨)¸.·´ Smiling!

`·.¸.·´ *

Alfonso Ariza Quintana

unread,
Apr 1, 2012, 4:48:34 AM4/1/12
to omn...@googlegroups.com

there are several form to discover memory problems, the first a easier is to run the simulation in debug mode, the debug, usually, will stop the simulation in the line of code where the the error that crashes  the simulation is detected. Some times, the line were the error is detected is not the cause of the error (for example an array out of limits that write in memory), in this case, the debug doesn't help and you will need valgrind, valgrind can discover this type of problems.

> Date: Sat, 31 Mar 2012 20:17:25 +0530
> Subject: Re: [Omnetpp-l] Meaning of exit code 139
> From: mudgil...@gmail.com
> To: omn...@googlegroups.com

Alfonso Ariza Quintana

unread,
Apr 1, 2012, 1:25:02 PM4/1/12
to omn...@googlegroups.com

have you checked the number of element in the queue?
If you are adding element but never extract the simulation will crass if the number of element are bigger that the maximum



Date: Sat, 31 Mar 2012 06:14:53 +0530

Subject: Re: [Omnetpp-l] Meaning of exit code 139
From: mudgil...@gmail.com
To: omn...@googlegroups.com

Neeraj Mudgil

unread,
Apr 1, 2012, 6:52:28 PM4/1/12
to omn...@googlegroups.com
Thank you very much for reply Alfonso sir... till now I am not deleing
any item from queue and keeps on anding adding them. can you please
tell me what is maximum limit of omnetpp in built cQueue? Sir, my
simulation is running correctly upto simtime 2524 s and packets are
added successfully upto this time but crashed after that. Shall I need
to check the upper limit before I can add item to queue.

On 4/1/12, Alfonso Ariza Quintana <aari...@hotmail.com> wrote:
>
>
> have you checked the number of element in the queue?
> If you are adding element but never extract the simulation will crass if the
> number of element are bigger that the maximum
>
>

*
**(¨`·.·´¨) Alwayz


`·.¸(¨`·.·´¨) Keep
(¨`·.·´¨)¸.·´ Smiling!

`·.¸.·´ *

Alfonso Ariza Quintana

unread,
Apr 2, 2012, 3:24:35 AM4/2/12
to omn...@googlegroups.com
if you are using std::vector the size is

vector::max_size


> Date: Mon, 2 Apr 2012 04:22:28 +0530

Neeraj Mudgil

unread,
Apr 3, 2012, 8:44:55 AM4/3/12
to omn...@googlegroups.com
Hello everyone ,

How can I print the max_size of std::vector

ev<<vector::max_size is not working and it gives error vector not
declared also ev<<std::vector::max_size not working.

Neeraj Mudgil

unread,
Apr 3, 2012, 8:53:27 AM4/3/12
to omn...@googlegroups.com
ohh... Sorry for silly question . i should have used
myVectorObject.max_size() instead.

SB

unread,
Jul 13, 2013, 10:22:31 PM7/13/13
to omn...@googlegroups.com
hi

I am using this code in scribe.cc in oversim, to get nxt closest node when a node cannot join a parent.

GroupList::iterator group = groupList.find( joinDeny->getGroupId());

set<NodeHandle>::iterator nxtJoin = group->second.getChildrenBegin();

set<NodeHandle>::iterator denyNode = group->second.getChildrenBegin();
set<NodeHandle>::iterator it=group->second.getChildrenBegin();


for(it = group->second.getChildrenBegin(); it !=group->second.getChildrenEnd(); ++it )
{
    if( ( (getThisNode().getKey())-(it->getKey()) ) < ( (getThisNode().getKey())-(nxtJoin->getKey()) ) )
                {
                   denyNode=nxtJoin;
                    nxtJoin=it;

                }

}


getting this error: Simulation terminated with exit code: 139


plz help me its very very urgent

Alfonso Ariza Quintana

unread,
Jul 15, 2013, 5:10:14 AM7/15/13
to omn...@googlegroups.com

You need to check if the iterator is valid

GroupList::iterator group = groupList.find( joinDeny->getGroupId());

if (group != groupList.end())

{

// is valid

……

--

--
Sent from the OMNeT++ mailing list. To configure your membership,
visit http://groups.google.com/group/omnetpp
 

---
You received this message because you are subscribed to the Google Groups "omnetpp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages