{"action":"created","issue":{"url":"https://api.github.com/repos/loskutov/deadbeef-lyricbar/issues/2","repository_url":"https://api.github.com/repos/loskutov/deadbeef-lyricbar","labels_url":"https://api.github.com/repos/loskutov/deadbeef-lyricbar/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/loskutov/deadbeef-lyricbar/issues/2/comments","events_url":"https://api.github.com/repos/loskutov/deadbeef-lyricbar/issues/2/events","html_url":"https://github.com/loskutov/deadbeef-lyricbar/issues/2","id":178406571,"number":2,"title":"Using the plugin with the latest deadbeef master","user":{"login":"yunake","id":2151374,"avatar_url":"https://avatars.githubusercontent.com/u/2151374?v=3","gravatar_id":"","url":"https://api.github.com/users/yunake","html_url":"https://github.com/yunake","followers_url":"https://api.github.com/users/yunake/followers","following_url":"https://api.github.com/users/yunake/following{/other_user}","gists_url":"https://api.github.com/users/yunake/gists{/gist_id}","starred_url":"https://api.github.com/users/yunake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yunake/subscriptions","organizations_url":"https://api.github.com/users/yunake/orgs","repos_url":"https://api.github.com/users/yunake/repos","events_url":"https://api.github.com/users/yunake/events{/privacy}","received_events_url":"https://api.github.com/users/yunake/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-21T17:04:07Z","updated_at":"2016-09-21T23:20:48Z","closed_at":"2016-09-21T18:28:51Z","body":"First of all, thank you for this excellent plugin, I've been using it for a while now.\r\n\r\nI've encountered some crashes when trying to update lyrics on some of my (potentially ill-formed) files, here's a backtrace:\r\n\r\n```\r\nThread 15 \"deadbeef-main\" received signal SIGABRT, Aborted.\r\n[Switching to Thread 0x7fffb65f4700 (LWP 31059)]\r\n0x00007ffff734a04f in raise () from /usr/lib/libc.so.6\r\n(gdb) bt\r\n#0  0x00007ffff734a04f in raise () from /usr/lib/libc.so.6\r\n#1  0x00007ffff734b47a in abort () from /usr/lib/libc.so.6\r\n#2  0x00007fffec37f4bd in __gnu_cxx::__verbose_terminate_handler () at /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/vterminate.cc:95\r\n#3  0x00007fffec37d276 in __cxxabiv1::__terminate (handler=<optimized out>) at /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:47\r\n#4  0x00007fffec37d2c1 in std::terminate () at /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:57\r\n#5  0x00007fffec37d4d8 in __cxxabiv1::__cxa_throw (obj=obj@entry=0x7fff980012c0, tinfo=0x7fffec668a38 <typeinfo for std::logic_error>, \r\n    dest=0x7fffec392cc0 <std::logic_error::~logic_error()>) at /build/gcc-multilib/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc:87\r\n#6  0x00007fffec3a6caf in std::__throw_logic_error (__s=__s@entry=0x7fffec42a610 \"basic_string::_M_construct null not valid\")\r\n    at /build/gcc-multilib/src/gcc/libstdc++-v3/src/c++11/functexcept.cc:74\r\n#7  0x00007fffec414384 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*> (\r\n    this=this@entry=0x7fffb65f3ef0, __beg=__beg@entry=0x0, __end=<optimized out>)\r\n    at /build/gcc-multilib/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.tcc:212\r\n#8  0x00007fffec41453c in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct_aux<char const*> (\r\n    __end=<optimized out>, __beg=0x0, this=0x7fffb65f3ef0)\r\n    at /build/gcc-multilib/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:196\r\n#9  std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*> (__end=<optimized out>, __beg=0x0, \r\n    this=0x7fffb65f3ef0) at /build/gcc-multilib/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:215\r\n#10 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string (this=0x7fffb65f3ef0, __s=0x0, __a=...)\r\n    at /build/gcc-multilib/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:456\r\n#11 0x00007fffee58c435 in update_lyrics(void*) () from /home/yunake/.local/lib64/deadbeef/ddb_lyricbar_gtk2.so\r\n#12 0x00007ffff76bc454 in start_thread () from /usr/lib/libpthread.so.0\r\n#13 0x00007ffff73ff7df in clone () from /usr/lib/libc.so.6\r\n```\r\n\r\nThis is on deadbeef master and lyricbar built from master around March I think. I've ignored them for a while but I had some free time today and decided to investigate. First things first I thought, lets update! I updated to the current deadbeef master without problems. After a while I managed to compile the latest lyricbar master using the fix from #1.\r\n\r\nRight now though the plugin can't be loaded, with the following message:\r\n\r\n```\r\nload_plugin_dir /home/yunake/.local/lib64/deadbeef: scandir found 4 files\r\nloading plugin /home/yunake/.local/lib64/deadbeef/ddb_lyricbar_gtk3.so\r\ndlsym error: (null) (_lyricbar_gtk3_load)\r\nplugin not found or failed to load\r\n```\r\n\r\nCurrent Makefile generates `ddb_lyricbar.so`, but if I'm reading deadbeef's `plugins.c` correctly, it expects the entry symbol to be `PLUGINFILENAME_load`:\r\n\r\n```\r\n    void *handle = dlopen (fullname, RTLD_NOW);\r\n    d_name[l-sizeof (PLUGINEXT)+1] = 0;\r\n    strcat (d_name, \"_load\");\r\n    DB_plugin_t *(*plug_load)(DB_functions_t *api) = dlsym (handle, d_name+3);\r\n```\r\n\r\n`lyricbar` defines `ddb_lyricbar_gtk2_load()` so I tried renaming the file to `ddb_lyricbar_gtk2.so`. This allows the plugin to load successfully (well, at least it does not produce any error messages or crashes), but the main GTK thread seems to be stalled and stuffed immediately and no deadbeef window appears:\r\n\r\n```\r\n$ deadbeef\r\n<SNIP>\r\nsearching for GUI plugins in /home/yunake/.local/lib64/deadbeef\r\nload_plugin_dir /home/yunake/.local/lib64/deadbeef: scandir found 4 files\r\nsearching for GUI plugins in /home/yunake/.local/lib/deadbeef\r\nsearching for GUI plugins in /usr/lib/deadbeef\r\nload_plugin_dir /usr/lib/deadbeef: scandir found 66 files\r\nfound gui plugin ddb_gui_GTK2.so\r\nadded GTK2 gui plugin\r\nload gui plugin\r\nchecking GUI plugin: GTK2\r\nfound selected GUI plugin: GTK2\r\nloading plugin /usr/lib/deadbeef/ddb_gui_GTK2.so\r\nloading plugins from /home/yunake/.local/lib64/deadbeef\r\nload_plugin_dir /home/yunake/.local/lib64/deadbeef: scandir found 4 files\r\nloading plugin /home/yunake/.local/lib64/deadbeef/ddb_lyricbar_gtk2.so\r\nloading plugins from /home/yunake/.local/lib/deadbeef\r\n\r\n<SNIP>\r\n\r\ngtkui plugin compiled for gtk version: 2.24.30\r\nconnecting button tray signals\r\n\r\n(deadbeef:5940): GLib-GObject-WARNING **: cannot register existing type 'GdkCursor'\r\n\r\n(deadbeef:5940): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed\r\n\r\n(deadbeef:5940): GLib-GObject-WARNING **: cannot register existing type 'GdkDevice'\r\n\r\n(deadbeef:5940): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed\r\n\r\n(deadbeef:5940): GLib-GObject-WARNING **: cannot register existing type 'GdkDisplay'\r\n\r\n(deadbeef:5940): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed\r\n\r\n(deadbeef:5940): GLib-GObject-WARNING **: cannot register existing type 'GdkDisplayManager'\r\n\r\n(deadbeef:5940): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed\r\n\r\n(deadbeef:5940): GLib-GObject-WARNING **: cannot register existing type 'GdkDragContext'\r\n\r\n(deadbeef:5940): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed\r\n\r\n(deadbeef:5940): GLib-GObject-WARNING **: cannot register existing type 'GdkScreen'\r\n\r\n(deadbeef:5940): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed\r\n\r\n(deadbeef:5940): GLib-GObject-WARNING **: cannot register existing type 'GdkVisual'\r\n\r\n(deadbeef:5940): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed\r\n\r\n(deadbeef:5940): GLib-GObject-WARNING **: cannot register existing type 'GdkWindow'\r\n\r\n(deadbeef:5940): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed\r\n\r\n<HANGS HERE>\r\n^C\r\n```\r\n\r\nAny hint on how to further debug this would be appreciated :)"},"comment":{"url":"https://api.github.com/repos/loskutov/deadbeef-lyricbar/issues/comments/248771534","html_url":"https://github.com/loskutov/deadbeef-lyricbar/issues/2#issuecomment-248771534","issue_url":"https://api.github.com/repos/loskutov/deadbeef-lyricbar/issues/2","id":248771534,"user":{"login":"loskutov","id":1202012,"avatar_url":"https://avatars.githubusercontent.com/u/1202012?v=3","gravatar_id":"","url":"https://api.github.com/users/loskutov","html_url":"https://github.com/loskutov","followers_url":"https://api.github.com/users/loskutov/followers","following_url":"https://api.github.com/users/loskutov/following{/other_user}","gists_url":"https://api.github.com/users/loskutov/gists{/gist_id}","starred_url":"https://api.github.com/users/loskutov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loskutov/subscriptions","organizations_url":"https://api.github.com/users/loskutov/orgs","repos_url":"https://api.github.com/users/loskutov/repos","events_url":"https://api.github.com/users/loskutov/events{/privacy}","received_events_url":"https://api.github.com/users/loskutov/received_events","type":"User","site_admin":false},"created_at":"2016-09-21T23:20:48Z","updated_at":"2016-09-21T23:20:48Z","body":"It means that master is still pretty much broken :("}}
{"actor":{"display_login":"loskutov"}}