willzhang05 / twitter-location-test

Testing prediction of location with the Twitter API
MIT License
0 stars 0 forks source link

insufficient handling of error conditions #2

Open pefoley2 opened 8 years ago

pefoley2 commented 8 years ago

peter@bronx ~/twitter-location-test $ valgrind ./main ==20294== Memcheck, a memory error detector ==20294== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==20294== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info ==20294== Command: ./main ==20294== Enter Twitter Username: terminate called after throwing an instance of 'Json::LogicError' what(): in Json::Value::operator: requires arrayValue ==20294== ==20294== Process terminating with default action of signal 6 (SIGABRT) ==20294== at 0x3AE8433308: raise (in /lib64/libc-2.22.so) ==20294== by 0x3AE8434759: abort (in /lib64/libc-2.22.so) ==20294== by 0x3AEA08FB5C: gnu_cxx::__verbose_terminate_handler() (in /usr/lib64/gcc/x86_64-pc-linux-gnu/5.3.0/libstdc++.so.6.0.21) ==20294== by 0x3AEA08D975: ??? (in /usr/lib64/gcc/x86_64-pc-linux-gnu/5.3.0/libstdc++.so.6.0.21) ==20294== by 0x3AEA08D9C0: std::terminate() (in /usr/lib64/gcc/x86_64-pc-linux-gnu/5.3.0/libstdc++.so.6.0.21) ==20294== by 0x3AEA08DBD8: cxa_throw (in /usr/lib64/gcc/x86_64-pc-linux-gnu/5.3.0/libstdc++.so.6.0.21) ==20294== by 0x4C6AAF6: Json::throwLogicError(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) (in /usr/lib64/libjsoncpp.so.1.6.5) ==20294== by 0x4C7062B: Json::Value::operator[](unsigned int) (in /usr/lib64/libjsoncpp.so.1.6.5) ==20294== by 0x4C70936: Json::Value::operator (in /usr/lib64/libjsoncpp.so.1.6.5) ==20294== by 0x404DDD: parse_json(Json::Value&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >&) (main.cpp:155) ==20294== by 0x405128: main (main.cpp:183) ==20294== ==20294== HEAP SUMMARY: ==20294== in use at exit: 181,728 bytes in 3,302 blocks ==20294== total heap usage: 4,110 allocs, 808 frees, 283,933 bytes allocated ==20294== ==20294== LEAK SUMMARY: ==20294== definitely lost: 0 bytes in 0 blocks ==20294== indirectly lost: 0 bytes in 0 blocks ==20294== possibly lost: 228 bytes in 2 blocks ==20294== still reachable: 181,500 bytes in 3,300 blocks ==20294== suppressed: 0 bytes in 0 blocks ==20294== Rerun with --leak-check=full to see details of leaked memory ==20294== ==20294== For counts of detected and suppressed errors, rerun with: -v ==20294== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Aborted