Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

an error was encountered when using annotation #18

Open
constellation39 opened this issue Dec 8, 2022 · 4 comments
Open

an error was encountered when using annotation #18

constellation39 opened this issue Dec 8, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@constellation39
Copy link

an error was encountered when using annotation

`std::terminate' is called after throwing an instance of `boost::exception_detail::error_info_injector<std::logic_error>'.
/opt/kanachan/src/annotation/annotation.cpp:472: Kanachan::Annotation::Annotation(uint_fast8_t, const std::array<Kanachan::PlayerState, 4>&, const Kanachan::RoundProgress&, const std::vector<lq::OptionalOperation>&, const lq::RecordDiscardTile&): 4,8,52,60,68,76,80,108,116,120,132,140       142
Backtrace:
 0# Kanachan::Annotation::Annotation(unsigned char, std::array<Kanachan::PlayerState, 4ul> const&, Kanachan::RoundProgress const&, std::vector<lq::OptionalOperation, std::allocator<lq::OptionalOperation> > const&, lq::RecordDiscardTile const&) in build/src/annotation/annotate
 1# (anonymous namespace)::convert(std::filesystem::__cxx11::path const&) in build/src/annotation/annotate
 2# main in build/src/annotation/annotate
 3# 0x00007F6CFD767D90 in /lib/x86_64-linux-gnu/libc.so.6
 4# __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
 5# _start in build/src/annotation/annotate

I put
/kanachan/src/annotation/annotation.cpp:456
std::uint_fast16_t const moqie = 1;
when the moqie value is set to 0, the error disappears, but should I do this?

used game records : 191218-b60ab11a-e2f1-406e-8b20-f94c25aec469

@Cryolite Cryolite self-assigned this Dec 8, 2022
@Cryolite
Copy link
Owner

Cryolite commented Dec 9, 2022

Thank you for the bug report.

I have confirmed that an exception is thrown on my side as well. However, the error on my side seems to be different from yours. I guess that you may have modified the source code locally and built the cryolite/kanachan.annotate image. If so, please remove the local cryolite/kanachan.annotate image and try docker run without building anything.

The most likely cause of the error is that an old format of game records is not supported. There are three formats of game records in Mahjong Soul: the oldest format up to 2019/12/31, the old format from 2020/01/01 up to 2021/07/28, and the current format from 2021/07/28 up to now. Currently, kanachan does not support the oldest format up to 2019/12/31. Since the game record you are trying is one on 2019/12/18, it is very likely that this is the cause of the error.

I will add support for the oldest format as soon as possible. As a workaround for the time being, please use only game records after 2020/01/01.

By the way, I have very few game records before 2019/12/31, so if you have other game records before 2019/12/31, a list of their IDs would be greatly appreciated.

@Cryolite Cryolite added the bug Something isn't working label Dec 9, 2022
@constellation39
Copy link
Author

Thanks for your answer.

yes, i modified the local program, and i apologize for not mentioning it before.

i have tried the following modifications constellation39@dd12977
changes in src/annotation/utility.hpp may be the reason for the different errors.

but it's worth noting that the earliest records I can find is 2019/12/01.

I uploaded some records from 2019/12/01, hope this can help.

Finally, thank you for your work on this.

@constellation39
Copy link
Author

records.zip

@Cryolite
Copy link
Owner

Thank you! This list will be very helpful in implementing and testing for the oldest format!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants