MailRuChamps / raic-2019

Russian AI Cup — artificial intelligence programming contest. Official website: http://russianaicup.ru
GNU General Public License v3.0
73 stars 45 forks source link

Localrunner падает при отладке #14

Closed dbf256 closed 4 years ago

dbf256 commented 4 years ago

Обычно на втором шаге.

INFO - Loading "./assets/./guns/assault_rifle/shoot.wav"
ERROR - panicked at 'assertion failed: value.is_finite()', /builds/aicup/2019/app/.cache/.cargo/git/checkouts/batbox-bf0d12541f0f0764/cbe0f3c/src/num/real.rs:119:9
ERROR - stack backtrace:
   0: backtrace::backtrace::trace
   1: backtrace::capture::Backtrace::new
   2: batbox::logger::init_with_level::{{closure}}
   3: std::panicking::rust_panic_with_hook
             at src\libstd/panicking.rs:481
   4: std::panicking::begin_panic
   5: aicup2019::renderer::camera::Camera::screen_to_world
   6: <aicup2019::renderer::Renderer as codegame::Renderer<aicup2019::model::Game>>::draw
   7: <codegame::app::game_screen::GameScreen<G,R> as geng_core::state::State>::draw
   8: <geng_debug_overlay::DebugOverlay as geng_core::state::State>::draw
   9: geng_core::context::run
  10: geng::run
  11: aicup2019::run_with
  12: aicup2019::run
  13: std::rt::lang_start::{{closure}}
  14: std::rt::lang_start_internal::{{closure}}
             at src\libstd/rt.rs:49
      std::panicking::try::do_call
             at src\libstd/panicking.rs:296
  15: __rust_maybe_catch_panic
             at src\libpanic_unwind/lib.rs:80
  16: std::panicking::try
             at src\libstd/panicking.rs:275
      std::panic::catch_unwind
             at src\libstd/panic.rs:394
      std::rt::lang_start_internal
             at src\libstd/rt.rs:48
  17: main
  18: __tmainCRTStartup
             at ./mingw-w64-crt/crt/crtexe.c:339
  19: mainCRTStartup
             at ./mingw-w64-crt/crt/crtexe.c:223
  20: _report_error
  21: _report_error

Конфиг


{
  "options_preset": {
    "Custom": {
      "level": "Simple",
      "properties": null
    }
  },
  "players": [
    {
      "Tcp": {
        "host": null,
        "port": 31001,
        "accept_timeout": null,
        "timeout": null,
        "token": null
      }
    },
    {
      "Empty": null
    }
  ]
}
kuviman commented 4 years ago

Похоже вы передаете NaN/Inf как одно из значений

dbf256 commented 4 years ago

Код стратегии

public UnitAction getAction(Unit unit, Game game, Debug debug) { System.out.println("TICK: " + game.currentTick); return new UnitAction(10, false, false, new Vec2Double(0, 0), false, false,false); }

Иногда при запуске в debug падает сам

TICK: 153 TICK: 154 Exception in thread "main" java.net.SocketException: Connection reset at java.base/java.net.SocketInputStream.read(SocketInputStream.java:186) at java.base/java.net.SocketInputStream.read(SocketInputStream.java:140) at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:252)

Если поставить breakpoint, то отваливается после отправки действий с этого шага. Там нет какого-то таймаута, в течение которого он ждет ответа?

dbf256 commented 4 years ago

Закрываю т.к. тут точнее описание ошибки: https://github.com/MailRuChamps/raic-2019/issues/32