Cryolite / kanachan

A Japanese (Riichi) Mahjong AI Framework
286 stars 40 forks source link

Failed to Annotate: At `player_state.cpp:232` `level = 10703` #42

Closed shinkuan closed 1 year ago

shinkuan commented 1 year ago

File: 230611-0c68181a-c0f2-43bc-b29f-7a153286bcc9 The attached file causes the following error:

C:\Users\shink>docker run -v C:\Users\shink\Documents\datatest\test:/data:ro --rm cryolite/kanachan.annotate
`std::terminate' is called after throwing an instance of `boost::exception_detail::error_info_injector<std::invalid_argument>'.
/opt/kanachan/src/annotation/player_state.cpp:232: Kanachan::PlayerState::PlayerState(uint_fast8_t, uint_fast32_t, uint_fast32_t, uint_fast8_t, int_fast32_t, int_fast32_t): level = 10703
Backtrace:
 0# Kanachan::PlayerState::PlayerState(unsigned char, unsigned long, unsigned long, unsigned char, long, long) 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# __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
 4# _start in build/src/annotation/annotate

After doing some analysis to the code, I fount that: The level = 10703 came from: https://github.com/Cryolite/kanachan/blob/fd1303377be509b3c430eb1c66e2037f5e95d4c9/src/annotation/player_state.cpp#L255 case 10703u: https://github.com/Cryolite/kanachan/blob/fd1303377be509b3c430eb1c66e2037f5e95d4c9/src/annotation/player_state.cpp#L231-L253

It should get level_ = 15u but it didn't and raised an error.

shinkuan commented 1 year ago

Update: Got it working after building Annotate myself.

cryolite/kanachan.annotate is outdated.