Skip to content

std::out_of_range exception #1

@lalten

Description

@lalten
$ sudo ./gtop 
terminate called after throwing an instance of 'std::out_of_range'
                                                                    what():  vector::_M_range_check: __n (which is 1) >= this->size() (which is 1)
                                                                                                                                                  Aborted (core dumped)

I built the code with $ g++ -std=c++14 gtop.cc utils.cc display.cc -o gtop -pedantic -Wall -Wextra -lncurses -lpthread -g
and gdb reveals:

(gdb) bt
#0  0x0000007fb7f0e30c in __pthread_cond_wait (cond=0x423718 <cv>, mutex=0x4236e8 <m>) at pthread_cond_wait.c:186
#1  0x0000007fb7e24e10 in std::condition_variable::wait(std::unique_lock<std::mutex>&) () from /usr/lib/aarch64-linux-gnu/libstdc++.so.6
#2  0x00000000004048dc in std::condition_variable::wait<main()::<lambda()> >(std::unique_lock<std::mutex> &, <lambda()>) (this=0x423718 <cv>, __lock=..., __p=...) at /usr/include/c++/5/condition_variable:98
#3  0x00000000004039d8 in main () at gtop.cc:45

This is on a Nvidia Jetson TX2 with ubuntu 16.04.03 and kernel 4.4.38

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions