Open pinkisemils opened 10 years ago
thanks for the report. the topen error -20 means that you are trying to write a non writable file. I suspect that your application is trying to write a temporary file with some strange permissions. I'll fix the bug.
I added the printf for quick debugging, they will be removed in future releases. there's already a log() function that will replace every printf and cout :)
Thank you for the rather instant reply. C++11 didn't fix anything though :( And as far as I know of, cmus shouldn't write anything to the files or directories. In fact, if I set the mountpoint to be read only after I've mounted it, it still crashes, even though Cmus should crash or at least stop scanning if it encountered a read problem due to a permission check. It always happens with the same file. I renamed the parent directory, and it turns out that you shouldn't use whitespaces. Messes everything up. So it's a problem with dealing with paths. Why don't you try and use boost path/IO libraries ?
the paths are handled directly by MEGA, it's probably a bug in their API. I'll check and open a ticket with them. Thanks for finding the source of the issue.
The code is written in C++11, so you were already using it even if not specified explicitly.
I did a bulk rename for the whole "drive", and I still get the same error every time I try to add the drive to my cmus library. Maybe it's just my files that have problems. Would you care enough to test it ?
I'm not sure if this is related, but I get a similar error when I try to open the folder in gnome's file viewer. The drive is fully interactive from the command line, but gnome's file manager kills it with this error:
/usr/include/c++/4.8/debug/vector:346:error: attempt to subscript container
with out-of-bounds index 0, but container only holds 0 elements.
Objects involved in the operation:
sequence "this" @ 0x0x7ff3b4000f48 {
type = NSt7__debug6vectorIbSaIbEEE;
}
Aborted (core dumped)
I get a similar
topen riuscito
download fallito: -20
/usr/include/c++/6.1.1/debug/safe_iterator.h:284:
Error: attempt to dereference a past-the-end iterator.
Objects involved in the operation:
iterator "this" @ 0x0x7f207c81f970 {
type = __gnu_debug::_Safe_iterator<std::__detail::_Node_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, file_cache_row>, false, true>, std::__debug::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, file_cache_row, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, file_cache_row> > > > (mutable iterator);
state = past-the-end;
references sequence with type 'std::__debug::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, file_cache_row, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, file_cache_row> > >' @ 0x0x2426aa0
}
fish: “MegaFuse” terminated by signal SIGABRT (Abort)
error while using cmus to add the music in mega.
Hello, I am running megafuse on 32 bit Archlinux. I compiled the latest git version. I did most of my uploading with a 64 bit desktop, now I am trying to access my files. Every time I try to add a file to the playlist in DeadBeef from my mega drive, it crashes. Every time I try to scan the drive with cmus, it crashes. I can freely parse through it with cd and ls, but none of the applications are able to access the data without crashing. This is the output: topen riuscito download fallito: -20 /usr/include/c++/4.9.0/debug/safe_iterator.h:275:error: attempt to dereference a past-the-end iterator.
Objects involved in the operation: iterator "this" @ 0x0xb64c6fa8 { type = N11__gnu_debug14_Safe_iteratorINSt8detail14_Node_iteratorISt4pairIKSs14file_cache_rowELb0ELb1EEENSt7debug13unordered_mapISsS5_St4hashISsESt8equal_toISsESaIS6_EEEEE (mutable iterator); state = past-the-end; references sequence with type `NSt7__debug13unordered_mapISs14file_cache_rowSt4hashISsESt8equal_toISsESaISt4pairIKSsS1_EEEE' @ 0x0x9633098 } Aborted (core dumped)
I will try compiling it with the c++11 enabled and see what happens.
Also, it's 2014, please use streams and not printf() :)