{"action":"created","issue":{"url":"https://api.github.com/repos/lxde/libfm-qt/issues/139","repository_url":"https://api.github.com/repos/lxde/libfm-qt","labels_url":"https://api.github.com/repos/lxde/libfm-qt/issues/139/labels{/name}","comments_url":"https://api.github.com/repos/lxde/libfm-qt/issues/139/comments","events_url":"https://api.github.com/repos/lxde/libfm-qt/issues/139/events","html_url":"https://github.com/lxde/libfm-qt/issues/139","id":275265072,"number":139,"title":"(no joke) nautilus crash","user":{"login":"damianatorrpm","id":6593358,"avatar_url":"https://avatars3.githubusercontent.com/u/6593358?v=4","gravatar_id":"","url":"https://api.github.com/users/damianatorrpm","html_url":"https://github.com/damianatorrpm","followers_url":"https://api.github.com/users/damianatorrpm/followers","following_url":"https://api.github.com/users/damianatorrpm/following{/other_user}","gists_url":"https://api.github.com/users/damianatorrpm/gists{/gist_id}","starred_url":"https://api.github.com/users/damianatorrpm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damianatorrpm/subscriptions","organizations_url":"https://api.github.com/users/damianatorrpm/orgs","repos_url":"https://api.github.com/users/damianatorrpm/repos","events_url":"https://api.github.com/users/damianatorrpm/events{/privacy}","received_events_url":"https://api.github.com/users/damianatorrpm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-11-20T07:54:55Z","updated_at":"2017-11-21T13:03:04Z","closed_at":null,"author_association":"NONE","body":"Something is not correct with the copy/cut->paste in libfm-qt\r\n\r\n1. Open pcmanfm-qt\r\n2. Open nautilus\r\n3. Cut/Copy a file in pcmanfm-qt\r\n4. Click into nautilus to paste the file //all good\r\n5. compile libfm-qt-master/src/test/test-folderview.cpp \r\n6. copy/cut a file there \r\n7. Click into nautilus to paste the file //nautilus crashes with\r\n```\r\nERROR:../src/nautilus-file.c:584:nautilus_file_new_from_filename: assertion failed: (filename[0] != '\\0')\r\nAborted (core dumped)\r\n```\r\nThis seems to be an issue with the clipboard implementation of libfm-qt as the following example program crashes for me too. I suspect depending on the place of the crash that somehow the clipboard data does not look exactly like it should or _convertPath not converting like expected.\r\n```\r\n....\r\n    Q_INVOKABLE void pasteFiles(QString pathToSomeFile) //like \"/home/you/testfolder/test.txt\r\n   {\r\n  auto uri  = Fm::FilePath::fromPathStr(pathToSomeFile.toLocal8Bit().constData());\r\n  auto home = Fm::FilePath::homeDir();\r\n   Fm::pasteFilesFromClipboard(home);\r\n      }\r\n....\r\n```\r\nwhere the crash is interestingly in path.h::386 which serves the same purpose as the thing nautilus crashes with\r\n\r\n```\r\n  static Path newForGfile(GFile* gf) {\r\n    return Path::wrapPtr(fm_path_new_for_gfile(gf));\r\n  }\r\n```\r\n\r\n```\r\nThread 1 (Thread 0x7ffff7fb3f40 (LWP 25276)):\r\n#0  0x00007ffff7baf7c3 in fm_path_ref () at /lib64/libfm.so.4\r\n#1  0x00007ffff7bb049a in fm_path_new_for_uri () at /lib64/libfm.so.4\r\n#2  0x00007ffff7bb02d2 in fm_path_new_for_str () at /lib64/libfm.so.4\r\n#3  0x00007ffff7bb0590 in fm_path_new_for_gfile () at /lib64/libfm.so.4\r\n#4  0x000000000046f460 in Fm::Path::newForGfile(_GFile*) (gf=0x835580) at ../untitled1/path.h:387\r\n#5  0x000000000046f734 in Fm::_convertPath(Fm::FilePath const&) (path=...) at ../untitled1/core/compat_p.h:19\r\n        __PRETTY_FUNCTION__ = \"Fm::Path Fm::_convertPath(const Fm::FilePath&)\"\r\n#6  0x000000000046f7de in Fm::_convertPathList(std::vector<Fm::FilePath, std::allocator<Fm::FilePath> > const&) (srcFiles=...) at ../untitled1/core/compat_p.h:25\r\n        file = @0xbd59f0: {gfile_ = {gobj_ = 0x835580}, static homeDir_ = {gfile_ = {gobj_ = 0x954300}, static homeDir_ = <same as static member of an already seen type>}}\r\n        __for_range = @0x7fffffffb0b0: {<std::_Vector_base<Fm::FilePath, std::allocator<Fm::FilePath> >> = {_M_impl = {<std::allocator<Fm::FilePath>> = {<__gnu_cxx::new_allocator<Fm::FilePath>> = {<No data fields>}, <No data fields>}, _M_start = 0xbd59f0, _M_finish = 0xbd59f8, _M_end_of_storage = 0xbd59f8}}, <No data fields>}\r\n        __for_begin = {_M_current = 0xbd59f0}\r\n        __for_end = {_M_current = 0xbd59f8}\r\n        ret = {dataPtr_ = 0x7fffd001b700}\r\n#7  0x00000000004bae2c in Fm::FileOperation::FileOperation(Fm::FileOperation::Type, std::vector<Fm::FilePath, std::allocator<Fm::FilePath> >, QObject*) (this=0x3213ac0, type=Fm::FileOperation::Move, srcFiles=..., parent=0x0) at ../untitled1/fileoperation.cpp:37\r\n#8  0x00000000004bc11d in Fm::FileOperation::moveFiles(std::vector<Fm::FilePath, std::allocator<Fm::FilePath> >, Fm::FilePath) (srcFiles=..., dest=...) at ../untitled1/fileoperation.cpp:254\r\n        op = 0x7fffffffb298\r\n#9  0x00000000004d3e8e in Fm::pasteFilesFromClipboard(Fm::FilePath const&, QWidget*) (destPath=..., parent=0x0) at ../untitled1/utilities.cpp:111\r\n        __PRETTY_FUNCTION__ = \"void Fm::pasteFilesFromClipboard(const Fm::FilePath&, QWidget*)\"\r\n        clipboard = 0x8b8870\r\n        data = 0x32123f0\r\n        paths = {<std::_Vector_base<Fm::FilePath, std::allocator<Fm::FilePath> >> = {_M_impl = {<std::allocator<Fm::FilePath>> = {<__gnu_cxx::new_allocator<Fm::FilePath>> = {<No data fields>}, <No data fields>}, _M_start = 0x2f039e0, _M_finish = 0x2f039e8, _M_end_of_storage = 0x2f039e8}}, <No data fields>}\r\n        isCut = true\r\n#10 0x00000000004e7a7c in Fm::ProxyFolderModel::pasteFiles(QString) (this=0x898490, filePath=...) at ../untitled1/proxyfoldermodel.h:92\r\n        folderPath = {gfile_ = {gobj_ = 0x95b220}, static homeDir_ = {gfile_ = {gobj_ = 0x954300}, static homeDir_ = <same as static member of an already seen type>}}\r\n        home = {gfile_ = {gobj_ = 0x954300}, static homeDir_ = {gfile_ = {gobj_ = 0x954300}, static homeDir_ = <same as static member of an already seen type>}}\r\n        clipboard = 0x8b8870\r\n        data = 0x32123f0\r\n        __PRETTY_FUNCTION__ = \"void Fm::ProxyFolderModel::pasteFiles(QString)\"\r\n#11 0x00000000004e7293 in Fm::ProxyFolderModel::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x898490, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0x7fffffffb490) at moc_proxyfoldermodel.cpp:116\r\n        _t = 0x898490\r\n```"},"comment":{"url":"https://api.github.com/repos/lxde/libfm-qt/issues/comments/346020064","html_url":"https://github.com/lxde/libfm-qt/issues/139#issuecomment-346020064","issue_url":"https://api.github.com/repos/lxde/libfm-qt/issues/139","id":346020064,"user":{"login":"tsujan","id":981076,"avatar_url":"https://avatars3.githubusercontent.com/u/981076?v=4","gravatar_id":"","url":"https://api.github.com/users/tsujan","html_url":"https://github.com/tsujan","followers_url":"https://api.github.com/users/tsujan/followers","following_url":"https://api.github.com/users/tsujan/following{/other_user}","gists_url":"https://api.github.com/users/tsujan/gists{/gist_id}","starred_url":"https://api.github.com/users/tsujan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsujan/subscriptions","organizations_url":"https://api.github.com/users/tsujan/orgs","repos_url":"https://api.github.com/users/tsujan/repos","events_url":"https://api.github.com/users/tsujan/events{/privacy}","received_events_url":"https://api.github.com/users/tsujan/received_events","type":"User","site_admin":false},"created_at":"2017-11-21T13:03:04Z","updated_at":"2017-11-21T13:03:04Z","author_association":"MEMBER","body":"OK. A workaround for Nautilus in libfm-qt! I'm a little suspicious but if it has no side effect...."}}
{"actor":{"display_login":"tsujan"}}