Closed heinezen closed 1 year ago
@zoli111 Can you check if https://github.com/SFTtech/openage/pull/1565 fixes this?
Unfortunately no. I got almost the same error:
FATAL: terminate has been called
uncaught exception
Traceback (most recent call last):
File ?, in ? [0x7f709f2aa9eb]
File ?, in ? [0x7f709f4e1943]
File ?, in ? [0x7f709fcf06b1]
File ?, in ? [0x7f709fcf068c]
File ?, in openage::presenter::Presenter::run(bool)+0x6e [0x7f709fe0bcac]
File ?, in openage::presenter::Presenter::init_graphics(bool)+0x806 [0x7f709fe0af76]
INFO [T3] Loading .nyan file: hd_base/data/tech/generic/ring_archer_armor/ring_archer_armor.nyan
File ?, in openage::presenter::Presenter::init_gui()+0x1c2 [0x7f709fe0a01c]
File ?, in openage::error::Error::Error(openage::log::message const&, bool, bool)+0xba [0x7f709fcf2e42]
File "libopenage/presenter/presenter.cpp", line 162, in void openage::presenter::Presenter::init_gui()
openage::error::Error: could not find qml root folder Path(Union(<openage.util.fslike.union.Union object at 0x7f7095e3c750>.root @ (b'cfg',), <openage.util.fslike.union.Union object at 0x7f7095f4cbd0>.root @ (b'assets',)):/assets/test/qml)
current stack:
Traceback (most recent call last):
File ?, in ? [0x7f709f2aa9eb]
File ?, in ? [0x7f709f4e1943]
INFO [T3] Loading .nyan file: hd_base/data/tech/generic/plate_mail_armor/plate_mail_armor.nyan
File ?, in ? [0x7f709fcf06b1]
File ?, in ? [0x7f709fcf068c]
INFO [T3] Loading .nyan file: hd_base/data/tech/generic/plate_barding_armor/plate_barding_armor.nyan
File ?, in openage::presenter::Presenter::run(bool)+0x6e [0x7f709fe0bcac]
File ?, in openage::presenter::Presenter::init_graphics(bool)+0x806 [0x7f709fe0af76]
INFO [T3] Loading .nyan file: hd_base/data/tech/generic/padded_archer_armor/padded_archer_armor.nyan
File ?, in openage::presenter::Presenter::init_gui()+0x1f5 [0x7f709fe0a04f]
File ?, in ? [0x7f709f4b03ed]
File ?, in ? [0x7f709f4b0189]
File ?, in ? [0x7f709f4b011c]
INFO [T3] Loading .nyan file: hd_base/data/tech/generic/leather_archer_armor/leather_archer_armor.nyan
File ?, in openage::error::terminate_handler()+0x1da [0x7f709fcf3a83]
handing over to the system...
terminate called after throwing an instance of 'openage::error::Error'
what(): could not find qml root folder Path(Union(<openage.util.fslike.union.Union object at 0x7f7095e3c750>.root @ (b'cfg',), <openage.util.fslike.union.Union object at 0x7f7095f4cbd0>.root @ (b'assets',)):/assets/test/qml)
Aborted (core dumped)```
Hmm.. but the directory assets/test/qml
exists right?
Yes. I cloned your repo, switched to the mentioned branch (and merged fix/asset-path-union
to make path handling work). Also checked the existence of the added files and they are in place.
Something with the path must be wrong. I've updated the PR to output the used path into the logs. Can you check again to see which asset path is used?
Something with the path must be wrong. I've updated the PR to output the used path into the logs. Can you check again to see which asset path is used?
Where can I find the logs?
it should be printed to the console as a message right before the error
Here is the message:
INFO [T2] Presenter: Setting QML root to Path(Union(<openage.util.fslike.union.Union object at 0x7f5e21596110>.root @ (b'cfg',), <openage.util.fslike.union.Union object at 0x7f5e21800290>.root @ (b'assets',)):/assets/test/qml)
The log message sgould pretty print the union path instead of writing
<openage.util.fslike.union.Union object at 0x7f5e21596110>.root @ (b'assets',)
e.g.
Union(/home/christoph/git/openage/assets).root @ (b'assets',)
maybe that's part of the problem? I'll look into it.
Can you try the latest updates to https://github.com/SFTtech/openage/pull/1565 and paste the last console output? It should print a native path now.
Is it... possible that I still get no visible path?
Yes, I double checked if I'm on the right branch and commit, even checked if the changes in file exist.
So here is the full error:
uncaught exception
Traceback (most recent call last):
File ?, in ? [0x7fc4492aa9eb]
File ?, in ? [0x7fc4494e1943]
File ?, in ? [0x7fc449cf06b1]
File ?, in ? [0x7fc449cf068c]
File ?, in openage::presenter::Presenter::run(bool)+0x6e [0x7fc449e0bf28]
File ?, in openage::presenter::Presenter::init_graphics(bool)+0x806 [0x7fc449e0b1f2]
File ?, in openage::presenter::Presenter::init_gui()+0x199 [0x7fc449e09ff3]
File ?, in openage::util::Path::resolve_native_path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const+0x113 [0x7fc449ee3a59]
File ?, in openage::util::Path::resolve_native_path_r[abi:cxx11]() const+0xae [0x7fc449ee3738]
File ?, in openage::error::Error::Error(openage::log::message const&, bool, bool)+0xba [0x7fc449cf2e42]
File "libopenage/util/path.cpp", line 185, in std::string openage::util::Path::resolve_native_path_r() const
openage::error::Error: failed to locate readable path: Path(Union(<openage.util.fslike.union.Union object at 0x7fc43ff94e50>.root @ (b'cfg',), <openage.util.fslike.union.Union object at 0x7fc4400a8150>.root @ (b'assets',)):/assets/test/qml)
current stack:
Traceback (most recent call last):
File ?, in ? [0x7fc4492aa9eb]
File ?, in ? [0x7fc4494e1943]
INFO [T3] Loading .nyan file: hd_base/data/tech/generic/theocracy/theocracy.nyan
INFO [T3] Loading .nyan file: hd_base/data/tech/generic/sanctity/sanctity.nyan
File ?, in ? [0x7fc449cf06b1]
INFO [T3] Loading .nyan file: hd_base/data/tech/generic/redemption/redemption.nyan
File ?, in ? [0x7fc449cf068c]
INFO [T3] Loading .nyan file: hd_base/data/tech/generic/illumination/illumination.nyan
INFO [T3] Loading .nyan file: hd_base/data/tech/generic/heresy/heresy.nyan
INFO [T3] Loading .nyan file: hd_base/data/tech/generic/fervor/fervor.nyan
File ?, in openage::presenter::Presenter::run(bool)+0x6e [0x7fc449e0bf28]
INFO [T3] Loading .nyan file: hd_base/data/tech/generic/faith/faith.nyan
INFO [T3] Loading .nyan file: hd_base/data/tech/generic/block_printing/block_printing.nyan
File ?, in openage::presenter::Presenter::init_graphics(bool)+0x806 [0x7fc449e0b1f2]
INFO [T3] Loading .nyan file: hd_base/data/tech/generic/atonement/atonement.nyan
INFO [T3] Loading .nyan file: hd_base/data/game_entity/generic/conifer/conifer.nyan
File ?, in openage::presenter::Presenter::init_gui()+0x199 [0x7fc449e09ff3]
File ?, in openage::util::Path::resolve_native_path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const+0x113 [0x7fc449ee3a59]
INFO [T3] Loading .nyan file: hd_base/data/game_entity/generic/wonder/wonder.nyan
File ?, in openage::util::Path::resolve_native_path_r[abi:cxx11]() const+0xe6 [0x7fc449ee3770]
File ?, in ? [0x7fc4494b03ed]
File ?, in ? [0x7fc4494b0189]
File ?, in ? [0x7fc4494b011c]
File ?, in openage::error::terminate_handler()+0x1da [0x7fc449cf3a83]
handing over to the system...
terminate called after throwing an instance of 'openage::error::Error'
what(): failed to locate readable path: Path(Union(<openage.util.fslike.union.Union object at 0x7fc43ff94e50>.root @ (b'cfg',), <openage.util.fslike.union.Union object at 0x7fc4400a8150>.root @ (b'assets',)):/assets/test/qml)
Aborted (core dumped)```
@zoli111 The thing is there should definitely be a readable path because the file we access are on the file system. The OS should be able to return a native path string.
So either this is a permission error (which I doubt because it can load the nyan files fine) or somethings wrong with the path object here that prevents it from accessing the files properly. We might have to do some back ad forth here to figure out what's wrong, since I can't reproduce this at all.
We might have to do some back ad forth here to figure out what's wrong, since I can't reproduce this at all.
I can help test on weekends because I'm not home during the week, and my laptop isn't fast enough to build openage multiple times, aand I have to study anyway.
Okay, new try with https://github.com/SFTtech/openage/pull/1566 . Can you run that and check the output? It should list all dirs starting with the asset directory.
I can help test on weekends because I'm not home during the week, and my laptop isn't fast enough to build openage multiple times, aand I have to study anyway.
I'm positive we can still solve this quickly :D @zoli111
Resolved itself (see https://github.com/SFTtech/openage/pull/1566#issuecomment-1752028058)
From https://github.com/SFTtech/openage/issues/1562
@zoli111 gets an error saying game couldn't find qml root folder
Originally posted by @zoli111 in https://github.com/SFTtech/openage/issues/1562#issuecomment-1751767383