hugoam/kiui

File Browser demo crash

alexeyknyshev opened this issue · 7 comments

Crash in readdir (DIR * is NULL)

See video:
https://www.youtube.com/watch?v=qBnX-q7Rm_Y

gdb bt:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5b18786 in _readdir (dirp=0x0) at ../sysdeps/posix/readdir.c:44
44 ../sysdeps/posix/readdir.c: Нет такого файла или каталога.
(gdb) bt
0 0x00007ffff5b18786 in readdir (dirp=0x0) at ../sysdeps/posix/readdir.c:44
1 0x00007ffff7a0e076 in mk::Directory::update() () from /usr/local/lib/libkiui.so
2 0x00007ffff7a0e16b in mk::Directory::setLocation(std::string const&) () from /usr/local/lib/libkiui.so
3 0x00007ffff7a0e1c7 in mk::Directory::moveIn(std::string const&) () from /usr/local/lib/libkiui.so
4 0x00007ffff7a0dc0b in mk::Dir::trigger() () from /usr/local/lib/libkiui.so
5 0x00007ffff7a13068 in mk::WrapButton::leftClick(float, float) () from /usr/local/lib/libkiui.so
6 0x00007ffff7a06f16 in mk::Widget::mouseReleased(float, float, mk::MouseButton) ()
from /usr/local/lib/libkiui.so
7 0x00007ffff7a0bd4a in mk::RootSheet::mouseReleased(float, float, mk::MouseButton) ()
from /usr/local/lib/libkiui.so
8 0x00007ffff7ac6a83 in mk::UiWindow::dispatchMouseReleased(float, float, mk::MouseButton) ()
from /usr/local/lib/libkiui.so
9 0x00007ffff7abdc74 in mk::GlWindow::injectMouseButton(int, int, int) () from /usr/local/lib/libkiui.so
10 0x00007ffff7abd1f9 in mk::GlWindow::initContext()::{lambda(GLFWwindow
, int, int, int)%3}::operator()(GLFWwindow
, int, int, int) const () from /usr/local/lib/libkiui.so
11 0x00007ffff7abd22e in mk::GlWindow::initContext()::{lambda(GLFWwindow
, int, int, int)%3}::FUN(GLFWwindow, int, int, int) () from /usr/local/lib/libkiui.so
12 0x00007ffff663c660 in ?? () from /usr/lib/x86_64-linux-gnu/libglfw.so.3
13 0x00007ffff7abd8af in mk::GlWindow::renderFrame() () from /usr/local/lib/libkiui.so
14 0x000000000041e1a7 in main ()

Can you tell me the value of Directory::mPath just before the crash ?

Yeap, just a minute.

in mk::Directory::setLocation(const mk::string& path):

  path    "..\vnc_client" mk::string &
  this    @0xf6f700   mk::Directory

Problem with handling relative paths.

Or maybe '' instead '/'
Looks strange enough

Try this ? eee466a
I'm not used to linux environments. Didn't even know backslash works only on windows.

Great, all is good.
Thank you, man