mellowagain / shiro

High performance, high quality osu!Bancho C++ re-implementation
GNU Affero General Public License v3.0
40 stars 6 forks source link

invalid vector<T> subscript #70

Closed emily33901 closed 5 years ago

emily33901 commented 5 years ago

Issue for this exception. Needs further investigation.

2018-11-12 22:56:57.977 ( 183.605s) [ ] routes.cc:51 ERR| A exception occurred in root::handle: Dynamic exception type: class std::out_of_range std::exception::what: invalid vector<T> subscript

48cf commented 5 years ago

If you could include entire log file, that would probably make the investigation easier.

emily33901 commented 5 years ago

This is one of them

File verbosity level: 0
date       time         ( uptime  ) [ thread name/id ]                   file:line     v| 
2018-11-12 22:53:54.373 (   0.001s) [                ]              loguru.hh:1896     0| Logging to 'logs/shiro 12-11-2018 22.53.54.log', mode: 'a', verbosity: 0
2018-11-12 22:53:54.378 (   0.006s) [main thread     ]              loguru.hh:1734     0| arguments: E:\\src\\shiro\\bin\\Debug\\shiro.exe
2018-11-12 22:53:54.381 (   0.009s) [main thread     ]              loguru.hh:1737     0| Current dir: E:\src\shiro\bin
2018-11-12 22:53:54.384 (   0.012s) [main thread     ]              loguru.hh:1739     0| stderr verbosity: 0
2018-11-12 22:53:54.386 (   0.014s) [main thread     ]              loguru.hh:1740     0| -----------------------------------
2018-11-12 22:53:54.388 (   0.016s) [main thread     ]              logger.cc:54       0| Logging was successfully initialized.
2018-11-12 22:53:54.394 (   0.022s) [main thread     ]            bot_file.cc:40       0| Successfully parsed bot.toml.
2018-11-12 22:53:54.397 (   0.025s) [main thread     ]         bancho_file.cc:52       0| Successfully parsed bancho.toml.
2018-11-12 22:53:54.400 (   0.028s) [main thread     ]             db_file.cc:48       0| Successfully parsed database.toml.
2018-11-12 22:53:54.405 (   0.033s) [main thread     ]score_submission_file.c:157      0| Successfully parsed score_submission.toml.
2018-11-12 22:53:54.411 (   0.039s) [main thread     ]            database.cc:51       0| Successfully connected to MySQL database.
2018-11-12 22:54:05.177 (  10.805s) [main thread     ]            database.cc:137      0| Successfully created and structured tables in database.
2018-11-12 22:54:05.769 (  11.397s) [main thread     ]        user_manager.cc:35       0| User Shiro logged in successfully.
2018-11-12 22:54:05.772 (  11.400s) [main thread     ]                 bot.cc:152      0| Bot has been successfully registered as Shiro and is now online.
2018-11-12 22:54:05.775 (  11.403s) [main thread     ]                 bot.cc:163      0| Bot commands have been successfully loaded. 6 commands available.
2018-11-12 22:54:06.503 (  12.131s) [main thread     ]signal_handler_windows.:43       0| Signal handler was successfully installed.
2018-11-12 22:54:06.506 (  12.134s) [main thread     ]               shiro.cc:99       0| Welcome to Shiro. Listening on http://127.0.0.1:80/.
2018-11-12 22:54:06.509 (  12.137s) [main thread     ]               shiro.cc:100      0| Press CTRL + C to quit.
2018-11-12 22:54:25.103 (  30.731s) [                ]              geoloc.cc:60     ERR| Received invalid response from Gitea API: Peer certificate cannot be authenticated with given CA certificates.
2018-11-12 22:54:25.109 (  30.737s) [                ]        user_manager.cc:35       0| User F1ssi0N logged in successfully.
2018-11-12 22:55:45.458 ( 111.086s) [                ]              routes.cc:56     ERR| A exception occurred in web::submit_score::handle: Dynamic exception type: class nlohmann::detail::parse_error
std::exception::what: [json.exception.parse_error.101] parse error at 3: syntax error - unexpected '['; expected end of input

2018-11-12 22:55:46.885 ( 112.513s) [                ]              routes.cc:56     ERR| A exception occurred in web::submit_score::handle: Dynamic exception type: class nlohmann::detail::parse_error
std::exception::what: [json.exception.parse_error.101] parse error at 3: syntax error - unexpected '['; expected end of input

2018-11-12 22:55:52.465 ( 118.093s) [                ]              routes.cc:56     ERR| A exception occurred in web::submit_score::handle: Dynamic exception type: class nlohmann::detail::parse_error
std::exception::what: [json.exception.parse_error.101] parse error at 3: syntax error - unexpected '['; expected end of input

2018-11-12 22:56:57.977 ( 183.605s) [                ]              routes.cc:51     ERR| A exception occurred in root::handle: Dynamic exception type: class std::out_of_range
std::exception::what: invalid vector<T> subscript

2018-11-12 22:56:57.977 ( 183.605s) [                ]              routes.cc:51     ERR| A exception occurred in root::handle: Dynamic exception type: class std::out_of_range
std::exception::what: invalid vector<T> subscript

2018-11-12 22:58:16.393 ( 262.021s) [                ]              routes.cc:56     ERR| A exception occurred in web::submit_score::handle: Dynamic exception type: class sqlpp::exception
std::exception::what: MySQL: could not connect to server: Lost connection to MySQL server during query

2018-11-12 22:58:16.393 ( 262.021s) [                ]              routes.cc:56     ERR| A exception occurred in web::submit_score::handle: Dynamic exception type: class sqlpp::exception
std::exception::what: MySQL: could not connect to server: Lost connection to MySQL server during query

2018-11-12 22:58:16.394 ( 262.022s) [                ]              routes.cc:56     ERR| A exception occurred in web::submit_score::handle: Dynamic exception type: class sqlpp::exception
std::exception::what: MySQL: could not connect to server: SSL connection error: error:00000005:lib(0):func(0):DH lib

2018-11-12 22:58:16.394 ( 262.022s) [                ]              routes.cc:56     ERR| A exception occurred in web::submit_score::handle: Dynamic exception type: class sqlpp::exception
std::exception::what: MySQL: could not connect to server: Lost connection to MySQL server during query

2018-11-12 22:58:16.394 ( 262.022s) [                ]              routes.cc:56     ERR| A exception occurred in web::submit_score::handle: Dynamic exception type: class nlohmann::detail::parse_error
std::exception::what: [json.exception.parse_error.101] parse error at 3: syntax error - unexpected '['; expected end of input

2018-11-12 22:58:16.396 ( 262.024s) [                ]        user_manager.cc:50       0| User F1ssi0N logged out successfully.
2018-11-12 22:58:16.398 ( 262.026s) [                ]  submit_score_route.cc:137   WARN| Received score submission from offline user.
2018-11-12 22:58:16.430 ( 262.058s) [                ]  submit_score_route.cc:137   WARN| Received score submission from offline user.
2018-11-12 22:58:16.437 ( 262.065s) [                ]  submit_score_route.cc:137   WARN| Received score submission from offline user.
2018-11-12 22:58:16.553 ( 262.181s) [                ]              geoloc.cc:60     ERR| Received invalid response from Gitea API: Peer certificate cannot be authenticated with given CA certificates.
2018-11-12 22:58:16.558 ( 262.186s) [                ]        user_manager.cc:35       0| User F1ssi0N logged in successfully.
2018-11-12 22:58:16.561 ( 262.189s) [                ]              geoloc.cc:60     ERR| Received invalid response from Gitea API: Peer certificate cannot be authenticated with given CA certificates.
2018-11-12 22:58:16.567 ( 262.195s) [                ]        user_manager.cc:35       0| User F1ssi0N logged in successfully.
2018-11-12 22:58:16.568 ( 262.196s) [                ]              geoloc.cc:60     ERR| Received invalid response from Gitea API: Peer certificate cannot be authenticated with given CA certificates.
2018-11-12 22:58:16.576 ( 262.204s) [                ]        user_manager.cc:35       0| User F1ssi0N logged in successfully.
2018-11-12 22:58:36.021 ( 281.649s) [                ]              routes.cc:56     ERR| A exception occurred in web::submit_score::handle: Dynamic exception type: class nlohmann::detail::parse_error
std::exception::what: [json.exception.parse_error.101] parse error at 3: syntax error - unexpected '['; expected end of input

2018-11-12 22:58:39.912 ( 285.540s) [                ]              routes.cc:56     ERR| A exception occurred in web::submit_score::handle: Dynamic exception type: class nlohmann::detail::parse_error
std::exception::what: [json.exception.parse_error.101] parse error at 3: syntax error - unexpected '['; expected end of input

2018-11-12 22:59:14.127 ( 319.755s) [                ]        user_timeout.cc:39    WARN| User F1ssi0N didn't send a ping in 30 seconds, timing out.
2018-11-12 22:59:14.131 ( 319.759s) [                ]        user_manager.cc:50       0| User F1ssi0N logged out successfully.
2018-11-12 22:59:14.134 ( 319.762s) [                ]        user_timeout.cc:39    WARN| User F1ssi0N didn't send a ping in 30 seconds, timing out.
2018-11-12 22:59:14.138 ( 319.766s) [                ]        user_manager.cc:50       0| User F1ssi0N logged out successfully.
2018-11-12 22:59:20.477 ( 326.105s) [main thread     ]               shiro.cc:112      0| Thank you and goodbye.
emily33901 commented 5 years ago
File verbosity level: 0
date       time         ( uptime  ) [ thread name/id ]                   file:line     v| 
2018-11-12 22:59:25.084 (   0.001s) [                ]              loguru.hh:1896     0| Logging to 'logs/shiro 12-11-2018 22.59.25.log', mode: 'a', verbosity: 0
2018-11-12 22:59:25.090 (   0.007s) [main thread     ]              loguru.hh:1734     0| arguments: E:\\src\\shiro\\bin\\Debug\\shiro.exe
2018-11-12 22:59:25.092 (   0.009s) [main thread     ]              loguru.hh:1737     0| Current dir: E:\src\shiro\bin
2018-11-12 22:59:25.096 (   0.013s) [main thread     ]              loguru.hh:1739     0| stderr verbosity: 0
2018-11-12 22:59:25.098 (   0.015s) [main thread     ]              loguru.hh:1740     0| -----------------------------------
2018-11-12 22:59:25.100 (   0.017s) [main thread     ]              logger.cc:54       0| Logging was successfully initialized.
2018-11-12 22:59:25.105 (   0.022s) [main thread     ]            bot_file.cc:40       0| Successfully parsed bot.toml.
2018-11-12 22:59:25.108 (   0.025s) [main thread     ]         bancho_file.cc:52       0| Successfully parsed bancho.toml.
2018-11-12 22:59:25.111 (   0.028s) [main thread     ]             db_file.cc:48       0| Successfully parsed database.toml.
2018-11-12 22:59:25.117 (   0.034s) [main thread     ]score_submission_file.c:157      0| Successfully parsed score_submission.toml.
2018-11-12 22:59:25.123 (   0.040s) [main thread     ]            database.cc:51       0| Successfully connected to MySQL database.
2018-11-12 22:59:29.210 (   4.127s) [main thread     ]            database.cc:137      0| Successfully created and structured tables in database.
2018-11-12 22:59:29.391 (   4.308s) [main thread     ]        user_manager.cc:35       0| User Shiro logged in successfully.
2018-11-12 22:59:29.394 (   4.311s) [main thread     ]                 bot.cc:152      0| Bot has been successfully registered as Shiro and is now online.
2018-11-12 22:59:29.397 (   4.314s) [main thread     ]                 bot.cc:163      0| Bot commands have been successfully loaded. 6 commands available.
2018-11-12 22:59:29.799 (   4.716s) [main thread     ]signal_handler_windows.:43       0| Signal handler was successfully installed.
2018-11-12 22:59:29.804 (   4.721s) [main thread     ]               shiro.cc:99       0| Welcome to Shiro. Listening on http://127.0.0.1:80/.
2018-11-12 22:59:29.807 (   4.724s) [main thread     ]               shiro.cc:100      0| Press CTRL + C to quit.
2018-11-12 22:59:32.035 (   6.952s) [                ]              geoloc.cc:60     ERR| Received invalid response from Gitea API: Peer certificate cannot be authenticated with given CA certificates.
2018-11-12 22:59:32.040 (   6.957s) [                ]        user_manager.cc:35       0| User F1ssi0N logged in successfully.
2018-11-12 23:00:25.584 (  60.501s) [                ]              routes.cc:56     ERR| A exception occurred in web::submit_score::handle: Dynamic exception type: class nlohmann::detail::parse_error
std::exception::what: [json.exception.parse_error.101] parse error at 3: syntax error - unexpected '['; expected end of input

2018-11-12 23:00:26.955 (  61.872s) [                ]              routes.cc:56     ERR| A exception occurred in web::submit_score::handle: Dynamic exception type: class nlohmann::detail::parse_error
std::exception::what: [json.exception.parse_error.101] parse error at 3: syntax error - unexpected '['; expected end of input

2018-11-12 23:00:27.962 (  62.879s) [                ]              routes.cc:56     ERR| A exception occurred in web::submit_score::handle: Dynamic exception type: class nlohmann::detail::parse_error
std::exception::what: [json.exception.parse_error.101] parse error at 3: syntax error - unexpected '['; expected end of input

2018-11-12 23:00:36.390 (  71.307s) [                ]              routes.cc:56     ERR| A exception occurred in web::submit_score::handle: Dynamic exception type: class nlohmann::detail::parse_error
std::exception::what: [json.exception.parse_error.101] parse error at 3: syntax error - unexpected '['; expected end of input

2018-11-12 23:00:56.264 (  91.181s) [                ]              routes.cc:56     ERR| A exception occurred in web::submit_score::handle: Dynamic exception type: class nlohmann::detail::parse_error
std::exception::what: [json.exception.parse_error.101] parse error at 3: syntax error - unexpected '['; expected end of input

2018-11-12 23:01:36.814 ( 131.731s) [                ]              routes.cc:56     ERR| A exception occurred in web::submit_score::handle: Dynamic exception type: class nlohmann::detail::parse_error
std::exception::what: [json.exception.parse_error.101] parse error at 3: syntax error - unexpected '['; expected end of input

2018-11-12 23:07:35.713 ( 490.630s) [                ]        user_manager.cc:50       0| User F1ssi0N logged out successfully.
2018-11-12 23:07:35.953 ( 490.870s) [                ]              geoloc.cc:60     ERR| Received invalid response from Gitea API: Peer certificate cannot be authenticated with given CA certificates.
2018-11-12 23:07:35.958 ( 490.875s) [                ]        user_manager.cc:35       0| User F1ssi0N logged in successfully.
2018-11-12 23:07:35.968 ( 490.885s) [                ]              geoloc.cc:60     ERR| Received invalid response from Gitea API: Peer certificate cannot be authenticated with given CA certificates.
2018-11-12 23:07:35.973 ( 490.890s) [                ]        user_manager.cc:35       0| User F1ssi0N logged in successfully.
2018-11-12 23:07:35.976 ( 490.893s) [                ]              geoloc.cc:60     ERR| Received invalid response from Gitea API: Peer certificate cannot be authenticated with given CA certificates.
2018-11-12 23:07:35.983 ( 490.900s) [                ]        user_manager.cc:35       0| User F1ssi0N logged in successfully.
2018-11-12 23:07:35.984 ( 490.901s) [                ]              geoloc.cc:60     ERR| Received invalid response from Gitea API: Peer certificate cannot be authenticated with given CA certificates.
2018-11-12 23:07:35.990 ( 490.907s) [                ]        user_manager.cc:35       0| User F1ssi0N logged in successfully.
2018-11-12 23:07:35.992 ( 490.909s) [                ]              geoloc.cc:60     ERR| Received invalid response from Gitea API: Peer certificate cannot be authenticated with given CA certificates.
2018-11-12 23:07:35.999 ( 490.916s) [                ]        user_manager.cc:35       0| User F1ssi0N logged in successfully.
2018-11-12 23:07:36.003 ( 490.920s) [                ]              geoloc.cc:60     ERR| Received invalid response from Gitea API: Peer certificate cannot be authenticated with given CA certificates.
2018-11-12 23:07:36.008 ( 490.925s) [                ]        user_manager.cc:35       0| User F1ssi0N logged in successfully.
2018-11-12 23:07:36.150 ( 491.067s) [                ]              geoloc.cc:60     ERR| Received invalid response from Gitea API: Peer certificate cannot be authenticated with given CA certificates.
2018-11-12 23:07:36.155 ( 491.072s) [                ]        user_manager.cc:35       0| User F1ssi0N logged in successfully.
2018-11-12 23:07:36.349 ( 491.266s) [                ]              routes.cc:56     ERR| A exception occurred in web::submit_score::handle: Dynamic exception type: class nlohmann::detail::parse_error
std::exception::what: [json.exception.parse_error.101] parse error at 3: syntax error - unexpected '['; expected end of input

2018-11-12 23:07:36.474 ( 491.391s) [                ]              geoloc.cc:60     ERR| Received invalid response from Gitea API: Peer certificate cannot be authenticated with given CA certificates.
2018-11-12 23:07:36.479 ( 491.396s) [                ]        user_manager.cc:35       0| User F1ssi0N logged in successfully.
2018-11-12 23:08:33.028 ( 547.945s) [                ]              routes.cc:51     ERR| A exception occurred in root::handle: Dynamic exception type: class std::out_of_range
std::exception::what: invalid vector<T> subscript

2018-11-12 23:13:51.353 ( 866.270s) [                ]        user_manager.cc:50       0| User F1ssi0N logged out successfully.
2018-11-12 23:13:52.668 ( 867.585s) [                ]              routes.cc:56     ERR| A exception occurred in web::submit_score::handle: Dynamic exception type: class nlohmann::detail::parse_error
std::exception::what: [json.exception.parse_error.101] parse error at 3: syntax error - unexpected '['; expected end of input

2018-11-12 23:16:47.513 (1042.430s) [                ]              routes.cc:56     ERR| A exception occurred in web::submit_score::handle: Dynamic exception type: class sqlpp::exception
std::exception::what: MySQL: could not connect to server: Lost connection to MySQL server during query

2018-11-12 23:16:47.513 (1042.430s) [                ]              routes.cc:51     ERR| A exception occurred in root::handle: Dynamic exception type: class sqlpp::exception
std::exception::what: MySQL: could not connect to server: SSL connection error: error:00000001:lib(0):func(0):reason(1)

2018-11-12 23:16:47.520 (1042.437s) [                ]              routes.cc:51     ERR| A exception occurred in root::handle: Dynamic exception type: class sqlpp::exception
std::exception::what: MySQL: could not connect to server: SSL connection error: error:00000005:lib(0):func(0):DH lib

2018-11-12 23:16:47.521 (1042.438s) [                ]              routes.cc:56     ERR| A exception occurred in web::submit_score::handle: Dynamic exception type: class sqlpp::exception
std::exception::what: MySQL: could not connect to server: SSL connection error: error:00000005:lib(0):func(0):DH lib

2018-11-12 23:16:47.522 (1042.439s) [                ]              routes.cc:53     ERR| A exception occurred in web::bancho_connect::handle: Dynamic exception type: class sqlpp::exception
std::exception::what: MySQL: could not connect to server: SSL connection error: error:00000005:lib(0):func(0):DH lib

2018-11-12 23:16:47.694 (1042.611s) [                ]              geoloc.cc:60     ERR| Received invalid response from Gitea API: Peer certificate cannot be authenticated with given CA certificates.
2018-11-12 23:16:47.704 (1042.621s) [                ]        user_manager.cc:35       0| User F1ssi0N logged in successfully.
2018-11-12 23:16:47.745 (1042.662s) [                ]        user_timeout.cc:39    WARN| User F1ssi0N didn't send a ping in 30 seconds, timing out.
2018-11-12 23:16:47.749 (1042.666s) [                ]        user_manager.cc:50       0| User F1ssi0N logged out successfully.
2018-11-12 23:16:47.755 (1042.672s) [                ]        user_timeout.cc:39    WARN| User F1ssi0N didn't send a ping in 30 seconds, timing out.
2018-11-12 23:16:47.759 (1042.676s) [                ]        user_manager.cc:50       0| User F1ssi0N logged out successfully.
2018-11-12 23:16:47.762 (1042.679s) [                ]        user_timeout.cc:39    WARN| User F1ssi0N didn't send a ping in 30 seconds, timing out.
2018-11-12 23:16:47.767 (1042.684s) [                ]        user_manager.cc:50       0| User F1ssi0N logged out successfully.
2018-11-12 23:16:47.770 (1042.687s) [                ]        user_timeout.cc:39    WARN| User F1ssi0N didn't send a ping in 30 seconds, timing out.
2018-11-12 23:16:47.777 (1042.694s) [                ]              geoloc.cc:60     ERR| Received invalid response from Gitea API: Peer certificate cannot be authenticated with given CA certificates.
2018-11-12 23:16:47.777 (1042.694s) [                ]        user_manager.cc:50       0| User F1ssi0N logged out successfully.
2018-11-12 23:16:47.783 (1042.699s) [                ]        user_manager.cc:35       0| User F1ssi0N logged in successfully.
2018-11-12 23:16:47.790 (1042.707s) [                ]              geoloc.cc:60     ERR| Received invalid response from Gitea API: Peer certificate cannot be authenticated with given CA certificates.
2018-11-12 23:16:47.798 (1042.715s) [                ]              geoloc.cc:60     ERR| Received invalid response from Gitea API: Peer certificate cannot be authenticated with given CA certificates.
2018-11-12 23:16:47.799 (1042.716s) [                ]        user_manager.cc:35       0| User F1ssi0N logged in successfully.
2018-11-12 23:16:47.805 (1042.722s) [                ]        user_manager.cc:35       0| User F1ssi0N logged in successfully.
2018-11-12 23:16:47.814 (1042.731s) [                ]              geoloc.cc:60     ERR| Received invalid response from Gitea API: Peer certificate cannot be authenticated with given CA certificates.
2018-11-12 23:16:47.819 (1042.736s) [                ]        user_manager.cc:35       0| User F1ssi0N logged in successfully.
2018-11-12 23:16:47.827 (1042.744s) [                ]              geoloc.cc:60     ERR| Received invalid response from Gitea API: Peer certificate cannot be authenticated with given CA certificates.
2018-11-12 23:16:47.831 (1042.748s) [                ]        user_manager.cc:35       0| User F1ssi0N logged in successfully.
2018-11-12 23:16:47.836 (1042.753s) [                ]              geoloc.cc:60     ERR| Received invalid response from Gitea API: Peer certificate cannot be authenticated with given CA certificates.
2018-11-12 23:16:47.844 (1042.760s) [                ]        user_manager.cc:35       0| User F1ssi0N logged in successfully.
2018-11-12 23:16:47.888 (1042.805s) [                ]              geoloc.cc:60     ERR| Received invalid response from Gitea API: Peer certificate cannot be authenticated with given CA certificates.
2018-11-12 23:16:47.893 (1042.810s) [                ]        user_manager.cc:35       0| User F1ssi0N logged in successfully.
2018-11-12 23:16:47.897 (1042.814s) [                ]              geoloc.cc:60     ERR| Received invalid response from Gitea API: Peer certificate cannot be authenticated with given CA certificates.
2018-11-12 23:16:47.904 (1042.821s) [                ]        user_manager.cc:35       0| User F1ssi0N logged in successfully.
2018-11-12 23:16:47.976 (1042.893s) [                ]              geoloc.cc:60     ERR| Received invalid response from Gitea API: Peer certificate cannot be authenticated with given CA certificates.
2018-11-12 23:16:47.982 (1042.899s) [                ]        user_manager.cc:35       0| User F1ssi0N logged in successfully.
2018-11-12 23:16:48.004 (1042.921s) [                ]              geoloc.cc:60     ERR| Received invalid response from Gitea API: Peer certificate cannot be authenticated with given CA certificates.
2018-11-12 23:16:48.009 (1042.926s) [                ]        user_manager.cc:35       0| User F1ssi0N logged in successfully.
2018-11-12 23:16:48.061 (1042.978s) [                ]              geoloc.cc:60     ERR| Received invalid response from Gitea API: Peer certificate cannot be authenticated with given CA certificates.
2018-11-12 23:16:48.065 (1042.982s) [                ]        user_manager.cc:35       0| User F1ssi0N logged in successfully.
2018-11-12 23:16:48.541 (1043.458s) [                ]              routes.cc:56     ERR| A exception occurred in web::submit_score::handle: Dynamic exception type: class nlohmann::detail::parse_error
std::exception::what: [json.exception.parse_error.101] parse error at 3: syntax error - unexpected '['; expected end of input

2018-11-12 23:16:48.954 (1043.871s) [                ]              routes.cc:56     ERR| A exception occurred in web::submit_score::handle: Dynamic exception type: class nlohmann::detail::parse_error
std::exception::what: [json.exception.parse_error.101] parse error at 3: syntax error - unexpected '['; expected end of input

2018-11-12 23:16:49.003 (1043.920s) [                ]              routes.cc:56     ERR| A exception occurred in web::submit_score::handle: Dynamic exception type: class nlohmann::detail::parse_error
std::exception::what: [json.exception.parse_error.101] parse error at 3: syntax error - unexpected '['; expected end of input

2018-11-12 23:16:49.058 (1043.975s) [                ]              routes.cc:56     ERR| A exception occurred in web::submit_score::handle: Dynamic exception type: class nlohmann::detail::parse_error
std::exception::what: [json.exception.parse_error.101] parse error at 3: syntax error - unexpected '['; expected end of input

2018-11-12 23:16:49.106 (1044.023s) [                ]              routes.cc:56     ERR| A exception occurred in web::submit_score::handle: Dynamic exception type: class nlohmann::detail::parse_error
std::exception::what: [json.exception.parse_error.101] parse error at 3: syntax error - unexpected '['; expected end of input

2018-11-12 23:16:49.175 (1044.092s) [                ]              routes.cc:56     ERR| A exception occurred in web::submit_score::handle: Dynamic exception type: class nlohmann::detail::parse_error
std::exception::what: [json.exception.parse_error.101] parse error at 3: syntax error - unexpected '['; expected end of input

2018-11-12 23:16:49.227 (1044.144s) [                ]              routes.cc:56     ERR| A exception occurred in web::submit_score::handle: Dynamic exception type: class nlohmann::detail::parse_error
std::exception::what: [json.exception.parse_error.101] parse error at 3: syntax error - unexpected '['; expected end of input

2018-11-12 23:16:49.228 (1044.145s) [                ]              geoloc.cc:60     ERR| Received invalid response from Gitea API: Peer certificate cannot be authenticated with given CA certificates.
2018-11-12 23:16:49.239 (1044.156s) [                ]        user_manager.cc:35       0| User F1ssi0N logged in successfully.
2018-11-12 23:16:49.385 (1044.302s) [                ]              geoloc.cc:60     ERR| Received invalid response from Gitea API: Peer certificate cannot be authenticated with given CA certificates.
2018-11-12 23:16:49.390 (1044.307s) [                ]        user_manager.cc:35       0| User F1ssi0N logged in successfully.
2018-11-12 23:16:49.547 (1044.464s) [                ]              routes.cc:56     ERR| A exception occurred in web::submit_score::handle: Dynamic exception type: class nlohmann::detail::parse_error
std::exception::what: [json.exception.parse_error.101] parse error at 3: syntax error - unexpected '['; expected end of input

2018-11-12 23:17:05.902 (1060.819s) [main thread     ]               shiro.cc:112      0| Thank you and goodbye.
emily33901 commented 5 years ago

This is a race condition on the online_users vector. It could get modified mid-loop in get_user_by_token

    for (const std::shared_ptr<user> &user : online_users) {
        if (user->token == token)
            return user;
    }

paging #43!