Cryolite/kanachan

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

shinkuan opened this issue · 1 comments

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:

KANACHAN_THROW<std::invalid_argument>(_1) << "level = " << level;

case 10703u:
case 10701u:
case 10702u:
case 10703u:
case 10704u:
case 10705u:
case 10706u:
case 10707u:
case 10708u:
case 10709u:
case 10710u:
case 10711u:
case 10712u:
case 10713u:
case 10714u:
case 10715u:
case 10716u:
case 10717u:
case 10718u:
case 10719u:
case 10720u:
// 四麻魂天 (2021/08/26 魂珠導入以降)
level_ = 15u;
break;

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

Update: Got it working after building Annotate myself.

cryolite/kanachan.annotate is outdated.