Giter Site home page Giter Site logo

Comments (5)

boysetsfrog avatar boysetsfrog commented on July 17, 2024

Hello. I am probably not going to get a chance to look at this for a few days but if you want you can run vimpc in gdb "gdb ./vimpc" and then when it crashes do a "thread apply all bt" to get a stack trace of each thread. Based on the error you have pasted it looks as though it is trying to make a string from a null pointer so it should be a relatively easy thing for me to look at, verify and fix.

Thanks

from vimpc.

AloisJanicek avatar AloisJanicek commented on July 17, 2024

Here is output (my first time with gdb :-) )

terminate called after throwing an instance of 'std::logic_error'                                                                                             1/191 -- Top
                                                                   what():  basic_string::_S_construct null not valid

Program received signal SIGABRT, Aborted.
0x00007ffff66493d9 in raise () from /usr/lib/libc.so.6
(gdb) 
(gdb) thread apply all bt

Thread 3 (Thread 0x7ffff5bfc700 (LWP 11506)):
#0  0x00007ffff69cb3e8 in pthread_cond_timedwait@@GLIBC_2.3.2 ()
   from /usr/lib/libpthread.so.0
#1  0x000000000042b75b in __gthread_cond_timedwait (__abs_timeout=0x7ffff5bfbeb0, 
    __mutex=<optimized out>, __cond=0x6be5e0 <Condition>)
    at /usr/include/c++/4.8.2/x86_64-unknown-linux-gnu/bits/gthr-default.h:871
#2  __wait_until_impl<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (
    __atime=..., __lock=..., this=0x6be5e0 <Condition>)
    at /usr/include/c++/4.8.2/condition_variable:160
#3  wait_until<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (
    __atime=..., __lock=..., this=0x6be5e0 <Condition>)
    at /usr/include/c++/4.8.2/condition_variable:100
#4  wait_for<long, std::ratio<1l, 1000l> > (__rtime=..., __lock=..., 
    this=0x6be5e0 <Condition>) at /usr/include/c++/4.8.2/condition_variable:132
#5  ConditionWait<std::mutex> (TimeoutMs=250, Lock=..., Condition=...)
    at src/compiler.hpp:68
#6  Mpc::Client::ClientQueueExecutor (this=0x7fffffffd9d8, client=<optimized out>)
    at src/mpdclient.cpp:1909
#7  0x00007ffff71a7d30 in ?? () from /usr/lib/libstdc++.so.6
#8  0x00007ffff69c70a2 in start_thread () from /usr/lib/libpthread.so.0
#9  0x00007ffff66f949d in clone () from /usr/lib/libc.so.6

Thread 2 (Thread 0x7ffff63fd700 (LWP 11505)):
#0  0x00007ffff66f09dd in poll () from /usr/lib/libc.so.6
#1  0x000000000042f3a4 in QueueInput (inputWindow=0x7c0fa0) at src/screen.cpp:130
#2  0x00007ffff71a7d30 in ?? () from /usr/lib/libstdc++.so.6
#3  0x00007ffff69c70a2 in start_thread () from /usr/lib/libpthread.so.0
#4  0x00007ffff66f949d in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7ffff7fcc740 (LWP 11501)):
#0  0x00007ffff66493d9 in raise () from /usr/lib/libc.so.6
#1  0x00007ffff664a7d8 in abort () from /usr/lib/libc.so.6
#2  0x00007ffff7156af5 in __gnu_cxx::__verbose_terminate_handler() ()
   from /usr/lib/libstdc++.so.6
#3  0x00007ffff7154c66 in ?? () from /usr/lib/libstdc++.so.6
#4  0x00007ffff7154c93 in std::terminate() () from /usr/lib/libstdc++.so.6
#5  0x00007ffff7154ebe in __cxa_throw () from /usr/lib/libstdc++.so.6
#6  0x00007ffff71a6467 in std::__throw_logic_error(char const*) ()
   from /usr/lib/libstdc++.so.6
#7  0x00007ffff71b1cb1 in char* std::string::_S_construct<char const*>(char const*, char const*, std::allocator<char> const&, std::forward_iterator_tag) ()
   from /usr/lib/libstdc++.so.6
---Type <return> to continue, or q <return> to quit---
#8  0x00007ffff71b2048 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) ()
   from /usr/lib/libstdc++.so.6
#9  0x0000000000418b3c in Mpc::ClientState::DisplaySongInformation (
    this=0x7fffffffda88) at src/clientstate.cpp:308
#10 0x000000000044d169 in operator() (__args#0=..., this=0x7fffffffd580)
    at /usr/include/c++/4.8.2/functional:2464
#11 Main::Vimpc::Run (this=this@entry=0x7fffffffd830, hostname="", 
    port=port@entry=0) at src/vimpc.cpp:194
#12 0x0000000000407dff in main (argc=1, argv=0x7fffffffdc68) at src/main.cpp:121
(gdb) 


from vimpc.

boysetsfrog avatar boysetsfrog commented on July 17, 2024

I haven't had a chance to try and replicate the issue yet, but based on the information you gave me, I think I know what the problem is and i have made a small modification. If you want you can pull the head to the latest commit and try it and let me know if it helps.

Thanks a lot of the backtrace.

from vimpc.

AloisJanicek avatar AloisJanicek commented on July 17, 2024

Issue is gone, You did it πŸ‘ Thank You.

from vimpc.

boysetsfrog avatar boysetsfrog commented on July 17, 2024

It's no problem. Happy to help.

from vimpc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.