Closed byjove01 closed 11 months ago
@byjove01 What's the path it's trying to load the file from? Can you try putting a debugger breakpoint to see?
I am not used to use gdb so I could need some help from you if you want me to manually put a debugger breakpoint. The executable doesn't give me any hint about the path it tries to take the file from.
hm..
I don't have a Linux system and never used GDB, so I'm afraid I can't help you here personally.
Built it in debug mode and running the executable gives me that assertion fail output:
ASSERT INFO: /usr/src/debug/wxwidgets/wxWidgets-3.2.2.1/src/unix/dir.cpp(284): assert ""IsOpened()"" failed in GetNext(): must wxDir::Open() first
BACKTRACE:
[1] wxDir::GetNext(wxString*) const
[2] wxFindNextFile()
[3] wxLocalFSHandler::FindNext()
[4] wxFileSystem::FindNext()
[5] wxXmlResource::Load(wxString const&)
[6] wxEntry(int&, wchar_t**)
[7] __libc_start_main
That means it cannot find the "res" folder or there's no permission to open the "res" folder where the "Setup.xrc" file should be located.
However, I got all permissions to my "res" folder and the Setup.xrc is in there.
it loads Setup.xrc
from the data dir. try strace ./BodySlide 2>&1 |grep -i Setup.xrc
to find the path where it is looking
Here is the output.
What I read from that: /usr/local/share/BodySlide/res/xrc/Setup.xrc
is missing. if you want to have bodyslide there, I don't know, but this is where it searches for it.
newfstatat(AT_FDCWD, "{working directory path}/share/BodySlide/res/xrc/Setup.xrc", 0x7fff8ed4ade0, 0) = -1 ENOENT (Aucun fichier ou dossier de ce type)
openat(AT_FDCWD, "{working directory path}/share/BodySlide/res/xrc", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (Aucun fichier ou dossier de ce type)
newfstatat(AT_FDCWD, "{working directory path}/share/BodySlide/res/xrc/Setup.xrc", 0x7fff8ed4aaa0, 0) = -1 ENOENT (Aucun fichier ou dossier de ce type)
Ok, I got the problem now. BodySlide forces its binaries to rely on a hypothetic "share" folder like the one you can find in Linux's root partition ; it would be nice if we could directly configure Cmake to make a relative search so this software could be portable.
@byjove01 This is caused by the BodySlide code calling GetDataDir()
in the standard paths class:
https://github.com/ousnius/BodySlide-and-Outfit-Studio/blob/dev/src/program/BodySlideApp.cpp#L111
https://github.com/wxWidgets/wxWidgets/blob/master/src/unix/stdpaths.cpp#L230
On Windows this is where the application is installed (where the executable resides): https://github.com/wxWidgets/wxWidgets/blob/master/src/msw/stdpaths.cpp#L318
This was done to prevent BodySlide trying to load the resource files from the working directory.
Description Everything is in the title.
How to reproduce
uint32_t
-related compilation-killing error in "BodySlide-and-Outfit-Studio/src/utils/PlatformUtil.h" by puttinginclude <stdint.h>
to the top