System "crash" when adding a song

General discussions
Post Reply
FinFin
Posts: 9
Joined: Mon May 23, 2016 1:50 pm

System "crash" when adding a song

Post by FinFin »

Occasionally, my whole system "crashes" when I want to drag a new song to the playlist. The music continues to play, till the end of the song. Then it stops. I can move the cursor, but when I click anywhere nothing happens. The cursor is the hand with the + all the time.
The last terminal message at this moment is: "SOListBox::GetSelectedTracks <-1"
It happens with very different songs. But not all the time I add this song, so its not the broken song.

Any help?
THX
User avatar
anonbeat
Posts: 2013
Joined: Thu Sep 16, 2010 9:47 pm

Re: System "crash" when adding a song

Post by anonbeat »

Please can you do a backtrace ?
viewtopic.php?f=3&t=468

Thanks for your help
radiometer
Posts: 25
Joined: Sun Mar 20, 2011 4:27 am

Re: System "crash" when adding a song

Post by radiometer »

I'm having a problem that might be related. The first thing that happened is that songs in the playlist couldn't be dragged and dropped properly anymore. They could only be placed at position 10 or 11, no matter where I dropped them. The visual indicator (thick line between two songs) doesn't show (except when hovering over position 10). The same happend when dragging songs from the library into the playlist and also when dragging a file within a saved playlist, i.e. not in "Now playing".

To see if this is a configuration problem, I removed my entire config directory. Then I just added a directory to the libray and dragged several files at once into the playlist. This reproducibly leads to a segmentation fault. Here is a backtrace (couldn't attach it as a file; always get the error message "invalid file extension"):
Thread 1 "guayadeque" received signal SIGSEGV, Segmentation fault.
0x00007ffff64c5fa3 in __memmove_avx_unaligned_erms () from /lib64/libc.so.6
(gdb) bt
#0 0x00007ffff64c5fa3 in __memmove_avx_unaligned_erms () at /lib64/libc.so.6
#1 0x00000000006bb9b1 in std::__copy_move<true, true, std::random_access_iterator_tag>::__copy_m<Guayadeque::guTrack*>(Guayadeque::guTrack* const*, Guayadeque::guTrack* const*, Guayadeque::guTrack**) (__first=0x0, __last=0x58, __result=0x2dd6840) at /usr/include/c++/10/bits/stl_algobase.h:426
#2 0x00000000006bb906 in std::__copy_move_a2<true, Guayadeque::guTrack**, Guayadeque::guTrack**>(Guayadeque::guTrack**, Guayadeque::guTrack**, Guayadeque::guTrack**)
(__first=0x0, __last=0x58, __result=0x2dd6840) at /usr/include/c++/10/bits/stl_algobase.h:472
#3 0x00000000006bb89a in std::__copy_move_a1<true, Guayadeque::guTrack**, Guayadeque::guTrack**>(Guayadeque::guTrack**, Guayadeque::guTrack**, Guayadeque::guTrack**)
(__first=0x0, __last=0x58, __result=0x2dd6840) at /usr/include/c++/10/bits/stl_algobase.h:506
#4 0x00000000006bb7d6 in std::__copy_move_a<true, Guayadeque::guTrack**, Guayadeque::guTrack**>(Guayadeque::guTrack**, Guayadeque::guTrack**, Guayadeque::guTrack**)
(__first=0x0, __last=0x58, __result=0x2dd6840) at /usr/include/c++/10/bits/stl_algobase.h:513
#5 0x00000000006bb6c1 in std::copy<std::move_iterator<Guayadeque::guTrack**>, Guayadeque::guTrack**>(std::move_iterator<Guayadeque::guTrack**>, std::move_iterator<Guayadeque::guTrack**>, Guayadeque::guTrack**) (__first=..., __last=..., __result=0x2dd6840) at /usr/include/c++/10/bits/stl_algobase.h:569
#6 0x00000000006bb56e in std::__uninitialized_copy<true>::__uninit_copy<std::move_iterator<Guayadeque::guTrack**>, Guayadeque::guTrack**>(std::move_iterator<Guayadeque::guTrack**>, std::move_iterator<Guayadeque::guTrack**>, Guayadeque::guTrack**) (__first=..., __last=..., __result=0x2dd6840) at /usr/include/c++/10/bits/stl_uninitialized.h:109
#7 0x00000000006bb236 in std::uninitialized_copy<std::move_iterator<Guayadeque::guTrack**>, Guayadeque::guTrack**>(std::move_iterator<Guayadeque::guTrack**>, std::move_iterator<Guayadeque::guTrack**>, Guayadeque::guTrack**) (__first=..., __last=..., __result=0x2dd6840) at /usr/include/c++/10/bits/stl_uninitialized.h:150
#8 0x00000000006bae74 in std::__uninitialized_copy_a<std::move_iterator<Guayadeque::guTrack**>, Guayadeque::guTrack**, Guayadeque::guTrack*>(std::move_iterator<Guayadeque::guTrack**>, std::move_iterator<Guayadeque::guTrack**>, Guayadeque::guTrack**, std::allocator<Guayadeque::guTrack*>&) (__first=..., __last=..., __result=0x2dd6840)
at /usr/include/c++/10/bits/stl_uninitialized.h:325
#9 0x00000000006ba9b9 in std::__uninitialized_move_if_noexcept_a<Guayadeque::guTrack**, Guayadeque::guTrack**, std::allocator<Guayadeque::guTrack*> >(Guayadeque::guTrack**, Guayadeque::guTrack**, Guayadeque::guTrack**, std::allocator<Guayadeque::guTrack*>&) (__first=0x0, __last=0x58, __result=0x2dd6840, __alloc=...) at /usr/include/c++/10/bits/stl_uninitialized.h:347
#10 0x00000000007a4dd2 in std::vector<Guayadeque::guTrack*, std::allocator<Guayadeque::guTrack*> >::_M_fill_insert(__gnu_cxx::__normal_iterator<Guayadeque::guTrack**, std::vector<Guayadeque::guTrack*, std::allocator<Guayadeque::guTrack*> > >, unsigned long, Guayadeque::guTrack* const&)
(this=0x24e7ca8, __position=<error reading variable: Cannot access memory at address 0x58>, __n=1, __x=@0x7fffffffb248: 0x2d93710) at /usr/include/c++/10/bits/vector.tcc:573
#11 0x00000000007a2b77 in std::vector<Guayadeque::guTrack*, std::allocator<Guayadeque::guTrack*> >::insert(__gnu_cxx::__normal_iterator<Guayadeque::guTrack* const*, std::vector<Guayadeque::guTrack*, std::allocator<Guayadeque::guTrack*> > >, unsigned long, Guayadeque::guTrack* const&)
(this=0x24e7ca8, __position=<error reading variable: Cannot access memory at address 0x58>, __n=1, __x=@0x7fffffffb248: 0x2d93710) at /usr/include/c++/10/bits/stl_vector.h:1338
#12 0x000000000096e1e4 in wxBaseObjectArray<Guayadeque::guTrack, Guayadeque::wxObjectArrayTraitsForguTrackArray>::Insert(Guayadeque::guTrack const&, unsigned long, unsigned long)
(this=0x24e7ca8, item=..., uiIndex=11, nInsert=1) at /usr/include/wx-3.1/wx/dynarray.h:386
#13 0x00000000009600af in Guayadeque::guPlayList::AddItem(Guayadeque::guTrack const&, int) (this=0x24e78c0, NewItem=..., pos=0)
at /home/philipp/Programs/compile/guayadeque-git/src/ui/player/PlayList.cpp:720
#14 0x0000000000961aff in Guayadeque::guPlayList::AddToPlayList(Guayadeque::guTrackArray const&, bool, int) (this=0x24e78c0, items=..., deleteold=false, aftercurrent=0)
at /home/philipp/Programs/compile/guayadeque-git/src/ui/player/PlayList.cpp:1167
#15 0x000000000095e87b in Guayadeque::guPlayList::OnDropTracks(Guayadeque::guTrackArray const*) (this=0x24e78c0, tracks=0x2aac4e0)
at /home/philipp/Programs/compile/guayadeque-git/src/ui/player/PlayList.cpp:293
#16 0x0000000000806e1c in Guayadeque::guListViewDropTarget::OnData(int, int, wxDragResult) (this=0x24c7160, x=137, y=227, def=wxDragCopy)
at /home/philipp/Programs/compile/guayadeque-git/src/ui/itemlistbox/ListView.cpp:1827
#17 0x00007ffff78bbf85 in () at /usr/lib64/libwx_gtk3u_core-suse.so.4.0.0
#18 0x00007ffff5f5b404 in () at /usr/lib64/libgtk-3.so.0
#19 0x00007ffff71d32de in () at /usr/lib64/libgobject-2.0.so.0
#20 0x00007ffff71eba99 in g_signal_emit_valist () at /usr/lib64/libgobject-2.0.so.0
#21 0x00007ffff71ec22f in g_signal_emit_by_name () at /usr/lib64/libgobject-2.0.so.0
#22 0x00007ffff5f2feed in () at /usr/lib64/libgtk-3.so.0
#23 0x00007ffff5f5a5dc in () at /usr/lib64/libgtk-3.so.0
#24 0x00007ffff71d32de in () at /usr/lib64/libgobject-2.0.so.0
#25 0x00007ffff71eba99 in g_signal_emit_valist () at /usr/lib64/libgobject-2.0.so.0
#26 0x00007ffff71ec22f in g_signal_emit_by_name () at /usr/lib64/libgobject-2.0.so.0
#27 0x00007ffff5e4a134 in gtk_selection_convert () at /usr/lib64/libgtk-3.so.0
#28 0x00007ffff78bcc94 in () at /usr/lib64/libwx_gtk3u_core-suse.so.4.0.0
#29 0x00007ffff5f4f2f7 in () at /usr/lib64/libgtk-3.so.0
#30 0x00007ffff71d3092 in g_closure_invoke () at /usr/lib64/libgobject-2.0.so.0
#31 0x00007ffff71e57d3 in () at /usr/lib64/libgobject-2.0.so.0
#32 0x00007ffff71eb77e in g_signal_emit_valist () at /usr/lib64/libgobject-2.0.so.0
#33 0x00007ffff71ec22f in g_signal_emit_by_name () at /usr/lib64/libgobject-2.0.so.0
#34 0x00007ffff5f35ab0 in () at /usr/lib64/libgtk-3.so.0
#35 0x00007ffff5dbc8c3 in gtk_main_do_event () at /usr/lib64/libgtk-3.so.0
#36 0x00007ffff5a9d013 in () at /usr/lib64/libgdk-3.so.0
#37 0x00007ffff5ad3e02 in () at /usr/lib64/libgdk-3.so.0
#38 0x00007ffff70e0e57 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
--Type <RET> for more, q to quit, c to continue without paging--c
#39 0x00007ffff70e11d8 in () at /usr/lib64/libglib-2.0.so.0
#40 0x00007ffff70e128f in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#41 0x00007ffff5db9c95 in gtk_main_iteration () at /usr/lib64/libgtk-3.so.0
#42 0x00007ffff78bf09d in wxDropSource::DoDragDrop(int) () at /usr/lib64/libwx_gtk3u_core-suse.so.4.0.0
#43 0x000000000080075a in Guayadeque::guListView::OnBeginDrag(wxCommandEvent&) (this=0x23d32b0, event=...) at /home/philipp/Programs/compile/guayadeque-git/src/ui/itemlistbox/ListView.cpp:317
#44 0x00007ffff7ef099e in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () at /usr/lib64/libwx_baseu-suse.so.4.0.0
#45 0x00007ffff7ef20ad in wxEvtHandler::SearchDynamicEventTable(wxEvent&) () at /usr/lib64/libwx_baseu-suse.so.4.0.0
#46 0x00007ffff7ef2350 in wxEvtHandler::TryHereOnly(wxEvent&) () at /usr/lib64/libwx_baseu-suse.so.4.0.0
#47 0x00007ffff7ef23fb in wxEvtHandler::ProcessEventLocally(wxEvent&) () at /usr/lib64/libwx_baseu-suse.so.4.0.0
#48 0x00007ffff7ef2519 in wxEvtHandler::ProcessEvent(wxEvent&) () at /usr/lib64/libwx_baseu-suse.so.4.0.0
#49 0x00007ffff7ae15de in wxScrollHelperEvtHandler::ProcessEvent(wxEvent&) () at /usr/lib64/libwx_gtk3u_core-suse.so.4.0.0
#50 0x00000000008019dd in Guayadeque::guListView::OnMouse(wxMouseEvent&) (this=0x23d32b0, event=...) at /home/philipp/Programs/compile/guayadeque-git/src/ui/itemlistbox/ListView.cpp:652
#51 0x00007ffff7ef099e in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () at /usr/lib64/libwx_baseu-suse.so.4.0.0
#52 0x00007ffff7ef20ad in wxEvtHandler::SearchDynamicEventTable(wxEvent&) () at /usr/lib64/libwx_baseu-suse.so.4.0.0
#53 0x00007ffff7ef2350 in wxEvtHandler::TryHereOnly(wxEvent&) () at /usr/lib64/libwx_baseu-suse.so.4.0.0
#54 0x00007ffff7ef23fb in wxEvtHandler::ProcessEventLocally(wxEvent&) () at /usr/lib64/libwx_baseu-suse.so.4.0.0
#55 0x00007ffff7ef2519 in wxEvtHandler::ProcessEvent(wxEvent&) () at /usr/lib64/libwx_baseu-suse.so.4.0.0
#56 0x00007ffff7afb6fc in wxVarScrollHelperEvtHandler::ProcessEvent(wxEvent&) () at /usr/lib64/libwx_gtk3u_core-suse.so.4.0.0
#57 0x00007ffff7ef31c7 in wxEvtHandler::SafelyProcessEvent(wxEvent&) () at /usr/lib64/libwx_baseu-suse.so.4.0.0
#58 0x00007ffff78dcf8f in () at /usr/lib64/libwx_gtk3u_core-suse.so.4.0.0
#59 0x00007ffff5f4ec9b in () at /usr/lib64/libgtk-3.so.0
#60 0x00007ffff71d3092 in g_closure_invoke () at /usr/lib64/libgobject-2.0.so.0
#61 0x00007ffff71e57d3 in () at /usr/lib64/libgobject-2.0.so.0
#62 0x00007ffff71eb77e in g_signal_emit_valist () at /usr/lib64/libgobject-2.0.so.0
#63 0x00007ffff71ec00f in g_signal_emit () at /usr/lib64/libgobject-2.0.so.0
#64 0x00007ffff5f17414 in () at /usr/lib64/libgtk-3.so.0
#65 0x00007ffff5dbb710 in () at /usr/lib64/libgtk-3.so.0
#66 0x00007ffff5dbc9cb in gtk_main_do_event () at /usr/lib64/libgtk-3.so.0
#67 0x00007ffff5a9d013 in () at /usr/lib64/libgdk-3.so.0
#68 0x00007ffff5ad3e02 in () at /usr/lib64/libgdk-3.so.0
#69 0x00007ffff70e0e57 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#70 0x00007ffff70e11d8 in () at /usr/lib64/libglib-2.0.so.0
#71 0x00007ffff70e14cb in g_main_loop_run () at /usr/lib64/libglib-2.0.so.0
#72 0x00007ffff5db9bfd in gtk_main () at /usr/lib64/libgtk-3.so.0
#73 0x00007ffff78b4995 in wxGUIEventLoop::DoRun() () at /usr/lib64/libwx_gtk3u_core-suse.so.4.0.0
#74 0x00007ffff7e143dd in wxEventLoopBase::Run() () at /usr/lib64/libwx_baseu-suse.so.4.0.0
#75 0x00007ffff7df150a in wxAppConsoleBase::MainLoop() () at /usr/lib64/libwx_baseu-suse.so.4.0.0
#76 0x00007ffff7e53cba in wxEntry(int&, wchar_t**) () at /usr/lib64/libwx_baseu-suse.so.4.0.0
#77 0x0000000000690528 in main(int, char**) (argc=1, argv=0x7fffffffdaf8) at /home/philipp/Programs/compile/guayadeque-git/src/MainApp.cpp:41
radiometer
Posts: 25
Joined: Sun Mar 20, 2011 4:27 am

Re: System "crash" when adding a song

Post by radiometer »

Hmm, probably this has nothing to do with the original post, but since I posted my stack trace here already...

@anonbeat: Did you have some time to look into this?

What happens here is that in Playlist.cpp, e.g. if guPlayList::MoveSelection() or guPlayList::AddItem() is called, no matter where I drop a file or playlist entry, there is always m_DragOverItem=10. If the playlist doesn't have this many items, the program crashes with a segfault. Otherwise the item is inserted at position 10.

I'm using wxWidgets 3.1.4 on openSUSE Tumbleweed.
User avatar
ontologger
Posts: 12
Joined: Mon Mar 01, 2021 5:50 pm

Re: System "crash" when adding a song

Post by ontologger »

Looks like ~guDataObjectComposite() is called before m_ListView->OnDropTracks( Tracks ) in ListView.cpp .....

Some compiler optimization I guess, but that's not 100% :roll:
radiometer
Posts: 25
Joined: Sun Mar 20, 2011 4:27 am

Re: System "crash" when adding a song

Post by radiometer »

I'm using a debug build with optimisations disabled. To be certain I explicitly added -DCMAKE_CXX_FLAGS_DEBUG="-O0" to the cmake command in ./buildd and checked that -O0 actually appears on the compiler command lines with `make VERBOSE=1`.
User avatar
anonbeat
Posts: 2013
Joined: Thu Sep 16, 2010 9:47 pm

Re: System "crash" when adding a song

Post by anonbeat »

radiometer wrote: Mon Mar 22, 2021 10:26 pm Hmm, probably this has nothing to do with the original post, but since I posted my stack trace here already...

@anonbeat: Did you have some time to look into this?

What happens here is that in Playlist.cpp, e.g. if guPlayList::MoveSelection() or guPlayList::AddItem() is called, no matter where I drop a file or playlist entry, there is always m_DragOverItem=10. If the playlist doesn't have this many items, the program crashes with a segfault. Otherwise the item is inserted at position 10.

I'm using wxWidgets 3.1.4 on openSUSE Tumbleweed.
I will take a look when I can.

Thank you for reporting it
User avatar
anonbeat
Posts: 2013
Joined: Thu Sep 16, 2010 9:47 pm

Re: System "crash" when adding a song

Post by anonbeat »

Hello,
I tried to reproduce the problem but I cant. Drag and drop is working fine for me.

Thanks for your help
radiometer
Posts: 25
Joined: Sun Mar 20, 2011 4:27 am

Re: System "crash" when adding a song

Post by radiometer »

I just tried with the Tumbleweed Live CD image (https://get.opensuse.org/tumbleweed) on VirtualBox. I Installed only what is needed to build and run Guayadeque and got the same problem: As soon as an audio file is dropped into the playlist, Guayadeque crashes.

In case you want to try (but I do understand if you don't want to spend your time doing that), the following packages are needed:
git-core gcc-c++ cmake automake wxGTK3-3_2-devel gstreamer-devel gstreamer-plugins-base-devel sqlite3-devel libcurl-devel libtag-devel libgpod-devel jsoncpp-devel
The rest should be pulled in as dependencies. But wxsqlite3 for the gtk3 backend is not available from the repositories and must be built from source:
$ git clone https://github.com/utelle/wxsqlite3.git
$ cd wxsqlite3
$ autoreconf
$ mkdir build-gtk
$ cd build-gtk
$ ../configure --prefix=/usr --libdir=lib64
$ make
$ sudo make install
Post Reply