Browsing By Dir
David Hough <[email protected]>
| Newsgroups | gmane.comp.audio.zinf.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I've made some improvements to my initial support for browsing by dir in
the gtkmm browser. It no longer crashes when the dir dosen't exist, it
only displays supported file types and it sorts the directory contents.
I've also added a new preference MusicBrowserShowDirs which is a ';'
seperated list of dirs that should be displayed in the browser. It no
longer uses the "watch this dir" pref.
I've also come across a quite annoying bug that occasionally makes zinf
seg fault when reading the dir contents (when expanding a dir node in the
tree). It appears to be a problem with boost, the backtrace is
#0 0x40124d30 in __pthread_unlock () from /lib/i686/libpthread.so.0
#1 0x40121e85 in pthread_mutex_unlock () from /lib/i686/libpthread.so.0
#2 0x0809b02c in boost::detail::sp_counted_base::release() ()
#3 0x080a8cda in boost::filesystem::directory_iterator::m_inc() ()
#4 0x080997c3 in MusicCollection::readDirEntries(std::string const&,
std::vector<std::string, std::allocator<std::string> >&) ()
#5 0x080995bc in MusicCollection::readEntries(std::string const&,
std::vector<std::string, std::allocator<std::string> >&) ()
#6 0x40cae0f0 in FilesystemInfo::refresh_item_data() ()
from ./plugins/musicbrowsermm.ui
#7 0x40ca4f1e in
GTKLibrary::GTKLibraryTree::check_expanded_children(Gtk::TreeNodeChildren
const&, CatalogInfo*) () from ./plugins/musicbrowsermm.ui
#8 0x40ca52c2 in GTKLibrary::GTKLibraryTree::row_expanded(Gtk::TreeIter
const&, Gtk::TreePath const&) () from ./plugins/musicbrowsermm.ui
#9 0x40ca61ff in SigC::ObjectSlot2_<void, Gtk::TreeIter const&,
Gtk::TreePath const&, GTKLibrary::GTKLibraryTree>::proxy(Gtk::TreeIter
const&, Gtk::TreePath const&, void*) () from ./plugins/musicbrowsermm.ui
#10 0x40e55fee in (anonymous
namespace)::TreeView_signal_row_expanded_callback(_GtkTreeView*,
_GtkTreeIter*, _GtkTreePath*, void*) (self=0x838fca0,
p0=0x83429e0, p1=0x839b470, data=0x42964fec) at treeview.cc:633
The fact its segfaults in a pthread function and it only happens
occasionally suggests that there's some threading problem with reading the
dir contents but I can't think what it could possibly be. Any ideas would
be appreciated.
Again the updated code is avaliable as a tla/arch archive at
http://www-student.cs.york.ac.uk/~djh123/arch/
I've also finally got around to patching all my changes against the
current CVS. The patch is at
http://www-student.cs.york.ac.uk/~djh123/arch/dirpatch-cvs.diff
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php